From 059f86cfc1712cdaf065dbcca6f87a102b58951d Mon Sep 17 00:00:00 2001 From: shile Date: Wed, 22 Apr 2026 17:48:10 +0800 Subject: [PATCH] update generated api docs and models Refresh the generated client sources, documentation, and test layout to match the latest API schema changes. Co-Authored-By: Claude Opus 4.7 --- docs/AccessToken.md | 1 + docs/Activity.md | 22 + docs/ActivitypubApi.md | 20 +- docs/AdminApi.md | 746 ++++- docs/BranchProtection.md | 3 +- docs/ChangeFileOperation.md | 23 + docs/ChangeFilesOptions.md | 17 + docs/Comment.md | 1 + docs/CommitAffectedFiles.md | 1 + docs/CreateAccessTokenOption.md | 3 +- docs/CreateBranchProtectionOption.md | 3 +- docs/CreateBranchRepoOption.md | 3 +- docs/CreateHookOption.md | 1 + docs/CreateLabelOption.md | 2 + docs/CreateOrUpdateSecretOption.md | 10 + docs/CreateOrgOption.md | 1 + docs/CreatePushMirrorOption.md | 1 + docs/CreateUserOption.md | 1 + docs/EditHookOption.md | 1 + docs/EditLabelOption.md | 2 + docs/EditOrgOption.md | 1 + docs/EditRepoOption.md | 4 + docs/Email.md | 2 + docs/FilesResponse.md | 12 + docs/GenerateRepoOption.md | 1 + docs/GitignoreTemplateInfo.md | 11 + docs/Hook.md | 2 + docs/Issue.md | 2 + docs/IssueApi.md | 1810 ++++++++++- docs/IssueConfig.md | 11 + docs/IssueConfigContactLink.md | 12 + docs/IssueConfigValidation.md | 11 + docs/IssueMeta.md | 12 + docs/Label.md | 2 + docs/LabelTemplate.md | 13 + docs/LicenseTemplateInfo.md | 14 + docs/LicensesTemplateListEntry.md | 12 + docs/MarkdownOption.md | 2 +- docs/MarkupOption.md | 14 + docs/MigrateRepoOptions.md | 4 + docs/MiscellaneousApi.md | 611 ++++ docs/ModelPackage.md | 1 + docs/NewIssuePinsAllowed.md | 11 + docs/Organization.md | 1 + docs/OrganizationApi.md | 643 ++++ docs/PackageApi.md | 2 +- docs/PullRequest.md | 2 + docs/PullReview.md | 1 + docs/PushMirror.md | 1 + docs/Release.md | 1 + docs/RenameUserOption.md | 10 + docs/Repository.md | 7 + docs/RepositoryApi.md | 1140 ++++++- docs/Secret.md | 11 + docs/UpdateRepoAvatarOption.md | 10 + docs/UpdateUserAvatarOption.md | 10 + docs/UserApi.md | 903 +++++- pom.xml | 44 +- .../java/io/gitea/api/ActivitypubApi.java | 76 +- src/main/java/io/gitea/api/AdminApi.java | 1079 +++++- src/main/java/io/gitea/api/IssueApi.java | 2881 ++++++++++++++++- .../java/io/gitea/api/MiscellaneousApi.java | 834 ++++- .../java/io/gitea/api/NotificationApi.java | 4 +- .../java/io/gitea/api/OrganizationApi.java | 930 +++++- src/main/java/io/gitea/api/PackageApi.java | 4 +- src/main/java/io/gitea/api/RepositoryApi.java | 1823 ++++++++++- src/main/java/io/gitea/api/SettingsApi.java | 4 +- src/main/java/io/gitea/api/UserApi.java | 1266 +++++++- src/main/java/io/gitea/model/APIError.java | 4 +- src/main/java/io/gitea/model/AccessToken.java | 39 +- src/main/java/io/gitea/model/Activity.java | 374 +++ src/main/java/io/gitea/model/ActivityPub.java | 4 +- .../io/gitea/model/AddCollaboratorOption.java | 4 +- .../java/io/gitea/model/AddTimeOption.java | 4 +- .../java/io/gitea/model/AnnotatedTag.java | 4 +- .../io/gitea/model/AnnotatedTagObject.java | 4 +- src/main/java/io/gitea/model/Attachment.java | 4 +- src/main/java/io/gitea/model/Branch.java | 4 +- .../java/io/gitea/model/BranchProtection.java | 33 +- .../io/gitea/model/ChangeFileOperation.java | 236 ++ .../io/gitea/model/ChangeFilesOptions.java | 266 ++ src/main/java/io/gitea/model/ChangedFile.java | 4 +- .../java/io/gitea/model/CombinedStatus.java | 4 +- src/main/java/io/gitea/model/Comment.java | 42 +- src/main/java/io/gitea/model/Commit.java | 4 +- .../io/gitea/model/CommitAffectedFiles.java | 31 +- .../io/gitea/model/CommitDateOptions.java | 4 +- src/main/java/io/gitea/model/CommitMeta.java | 4 +- src/main/java/io/gitea/model/CommitStats.java | 4 +- .../java/io/gitea/model/CommitStatus.java | 4 +- src/main/java/io/gitea/model/CommitUser.java | 4 +- .../java/io/gitea/model/ContentsResponse.java | 4 +- .../gitea/model/CreateAccessTokenOption.java | 43 +- .../model/CreateBranchProtectionOption.java | 33 +- .../gitea/model/CreateBranchRepoOption.java | 35 +- .../io/gitea/model/CreateEmailOption.java | 4 +- .../io/gitea/model/CreateFileOptions.java | 4 +- .../java/io/gitea/model/CreateForkOption.java | 4 +- .../io/gitea/model/CreateGPGKeyOption.java | 4 +- .../java/io/gitea/model/CreateHookOption.java | 29 +- .../gitea/model/CreateHookOptionConfig.java | 4 +- .../gitea/model/CreateIssueCommentOption.java | 4 +- .../io/gitea/model/CreateIssueOption.java | 4 +- .../java/io/gitea/model/CreateKeyOption.java | 4 +- .../io/gitea/model/CreateLabelOption.java | 52 +- .../io/gitea/model/CreateMilestoneOption.java | 4 +- .../model/CreateOAuth2ApplicationOptions.java | 4 +- .../model/CreateOrUpdateSecretOption.java | 95 + .../java/io/gitea/model/CreateOrgOption.java | 29 +- .../gitea/model/CreatePullRequestOption.java | 4 +- .../gitea/model/CreatePullReviewComment.java | 4 +- .../gitea/model/CreatePullReviewOptions.java | 4 +- .../gitea/model/CreatePushMirrorOption.java | 31 +- .../io/gitea/model/CreateReleaseOption.java | 4 +- .../java/io/gitea/model/CreateRepoOption.java | 4 +- .../io/gitea/model/CreateStatusOption.java | 4 +- .../java/io/gitea/model/CreateTagOption.java | 4 +- .../java/io/gitea/model/CreateTeamOption.java | 8 +- .../java/io/gitea/model/CreateUserOption.java | 32 +- .../io/gitea/model/CreateWikiPageOptions.java | 4 +- src/main/java/io/gitea/model/Cron.java | 4 +- .../io/gitea/model/DeleteEmailOption.java | 4 +- .../io/gitea/model/DeleteFileOptions.java | 4 +- src/main/java/io/gitea/model/DeployKey.java | 4 +- .../gitea/model/DismissPullReviewOptions.java | 4 +- .../io/gitea/model/EditAttachmentOptions.java | 4 +- .../model/EditBranchProtectionOption.java | 4 +- .../io/gitea/model/EditDeadlineOption.java | 4 +- .../io/gitea/model/EditGitHookOption.java | 4 +- .../java/io/gitea/model/EditHookOption.java | 29 +- .../gitea/model/EditIssueCommentOption.java | 4 +- .../java/io/gitea/model/EditIssueOption.java | 4 +- .../java/io/gitea/model/EditLabelOption.java | 54 +- .../io/gitea/model/EditMilestoneOption.java | 4 +- .../java/io/gitea/model/EditOrgOption.java | 29 +- .../io/gitea/model/EditPullRequestOption.java | 4 +- .../io/gitea/model/EditReactionOption.java | 4 +- .../io/gitea/model/EditReleaseOption.java | 4 +- .../java/io/gitea/model/EditRepoOption.java | 98 +- .../java/io/gitea/model/EditTeamOption.java | 4 +- .../java/io/gitea/model/EditUserOption.java | 4 +- src/main/java/io/gitea/model/Email.java | 52 +- .../java/io/gitea/model/ExternalTracker.java | 4 +- .../java/io/gitea/model/ExternalWiki.java | 4 +- .../io/gitea/model/FileCommitResponse.java | 4 +- .../io/gitea/model/FileDeleteResponse.java | 4 +- .../io/gitea/model/FileLinksResponse.java | 4 +- .../java/io/gitea/model/FileResponse.java | 4 +- .../java/io/gitea/model/FilesResponse.java | 154 + src/main/java/io/gitea/model/GPGKey.java | 4 +- src/main/java/io/gitea/model/GPGKeyEmail.java | 4 +- .../io/gitea/model/GeneralAPISettings.java | 4 +- .../model/GeneralAttachmentSettings.java | 4 +- .../io/gitea/model/GeneralRepoSettings.java | 4 +- .../io/gitea/model/GeneralUISettings.java | 4 +- .../io/gitea/model/GenerateRepoOption.java | 29 +- .../java/io/gitea/model/GitBlobResponse.java | 4 +- src/main/java/io/gitea/model/GitEntry.java | 4 +- src/main/java/io/gitea/model/GitHook.java | 4 +- src/main/java/io/gitea/model/GitObject.java | 4 +- .../java/io/gitea/model/GitTreeResponse.java | 4 +- .../io/gitea/model/GitignoreTemplateInfo.java | 118 + src/main/java/io/gitea/model/Hook.java | 52 +- src/main/java/io/gitea/model/Identity.java | 4 +- .../io/gitea/model/InlineResponse200.java | 4 +- .../io/gitea/model/InlineResponse2001.java | 4 +- .../java/io/gitea/model/InternalTracker.java | 4 +- src/main/java/io/gitea/model/Issue.java | 63 +- src/main/java/io/gitea/model/IssueConfig.java | 128 + .../gitea/model/IssueConfigContactLink.java | 140 + .../io/gitea/model/IssueConfigValidation.java | 117 + .../java/io/gitea/model/IssueDeadline.java | 4 +- .../java/io/gitea/model/IssueFormField.java | 4 +- .../io/gitea/model/IssueLabelsOption.java | 4 +- src/main/java/io/gitea/model/IssueMeta.java | 141 + .../java/io/gitea/model/IssueTemplate.java | 4 +- .../io/gitea/model/IssueTemplateLabels.java | 4 +- src/main/java/io/gitea/model/Label.java | 52 +- .../java/io/gitea/model/LabelTemplate.java | 164 + .../io/gitea/model/LicenseTemplateInfo.java | 187 ++ .../model/LicensesTemplateListEntry.java | 141 + .../java/io/gitea/model/MarkdownOption.java | 8 +- .../java/io/gitea/model/MarkupOption.java | 187 ++ .../gitea/model/MergePullRequestOption.java | 4 +- .../io/gitea/model/MigrateRepoOptions.java | 14 +- src/main/java/io/gitea/model/Milestone.java | 4 +- .../java/io/gitea/model/ModelPackage.java | 29 +- .../io/gitea/model/NewIssuePinsAllowed.java | 118 + src/main/java/io/gitea/model/NodeInfo.java | 4 +- .../java/io/gitea/model/NodeInfoServices.java | 4 +- .../java/io/gitea/model/NodeInfoSoftware.java | 4 +- .../java/io/gitea/model/NodeInfoUsage.java | 4 +- .../io/gitea/model/NodeInfoUsageUsers.java | 4 +- src/main/java/io/gitea/model/Note.java | 4 +- .../io/gitea/model/NotificationCount.java | 4 +- .../io/gitea/model/NotificationSubject.java | 4 +- .../io/gitea/model/NotificationThread.java | 4 +- .../io/gitea/model/OAuth2Application.java | 4 +- .../java/io/gitea/model/Organization.java | 29 +- .../gitea/model/OrganizationPermissions.java | 4 +- .../java/io/gitea/model/PRBranchInfo.java | 4 +- src/main/java/io/gitea/model/PackageFile.java | 4 +- .../java/io/gitea/model/PayloadCommit.java | 4 +- .../model/PayloadCommitVerification.java | 4 +- src/main/java/io/gitea/model/PayloadUser.java | 4 +- src/main/java/io/gitea/model/Permission.java | 4 +- src/main/java/io/gitea/model/PublicKey.java | 4 +- src/main/java/io/gitea/model/PullRequest.java | 60 +- .../java/io/gitea/model/PullRequestMeta.java | 4 +- src/main/java/io/gitea/model/PullReview.java | 29 +- .../io/gitea/model/PullReviewComment.java | 4 +- .../gitea/model/PullReviewRequestOptions.java | 4 +- src/main/java/io/gitea/model/PushMirror.java | 31 +- src/main/java/io/gitea/model/Reaction.java | 4 +- src/main/java/io/gitea/model/Reference.java | 4 +- src/main/java/io/gitea/model/Release.java | 29 +- .../java/io/gitea/model/RenameUserOption.java | 95 + .../model/RepoCollaboratorPermission.java | 4 +- src/main/java/io/gitea/model/RepoCommit.java | 4 +- .../java/io/gitea/model/RepoTopicOptions.java | 4 +- .../java/io/gitea/model/RepoTransfer.java | 4 +- src/main/java/io/gitea/model/Repository.java | 167 +- .../java/io/gitea/model/RepositoryMeta.java | 4 +- .../java/io/gitea/model/SearchResults.java | 4 +- src/main/java/io/gitea/model/Secret.java | 119 + .../java/io/gitea/model/ServerVersion.java | 4 +- src/main/java/io/gitea/model/StopWatch.java | 4 +- .../gitea/model/SubmitPullReviewOptions.java | 4 +- src/main/java/io/gitea/model/Tag.java | 4 +- src/main/java/io/gitea/model/Team.java | 4 +- .../java/io/gitea/model/TimelineComment.java | 4 +- src/main/java/io/gitea/model/TopicName.java | 4 +- .../java/io/gitea/model/TopicResponse.java | 4 +- src/main/java/io/gitea/model/TrackedTime.java | 4 +- .../io/gitea/model/TransferRepoOption.java | 4 +- .../io/gitea/model/UpdateFileOptions.java | 4 +- .../gitea/model/UpdateRepoAvatarOption.java | 95 + .../gitea/model/UpdateUserAvatarOption.java | 95 + src/main/java/io/gitea/model/User.java | 4 +- .../java/io/gitea/model/UserHeatmapData.java | 4 +- .../java/io/gitea/model/UserSettings.java | 4 +- .../io/gitea/model/UserSettingsOptions.java | 4 +- src/main/java/io/gitea/model/WatchInfo.java | 4 +- src/main/java/io/gitea/model/WikiCommit.java | 4 +- .../java/io/gitea/model/WikiCommitList.java | 4 +- src/main/java/io/gitea/model/WikiPage.java | 4 +- .../java/io/gitea/model/WikiPageMetaData.java | 4 +- .../java/io/gitea/api/ActivitypubApiTest.java | 12 +- src/test/java/io/gitea/api/AdminApiTest.java | 154 +- src/test/java/io/gitea/api/IssueApiTest.java | 374 ++- .../io/gitea/api/MiscellaneousApiTest.java | 118 +- .../io/gitea/api/NotificationApiTest.java | 4 +- .../io/gitea/api/OrganizationApiTest.java | 133 +- .../java/io/gitea/api/PackageApiTest.java | 4 +- .../java/io/gitea/api/RepositoryApiTest.java | 244 +- .../java/io/gitea/api/SettingsApiTest.java | 4 +- src/test/java/io/gitea/api/UserApiTest.java | 181 +- .../java/io/gitea/api/ActivitypubApiTest.java | 67 + src/test2/java/io/gitea/api/AdminApiTest.java | 280 ++ src/test2/java/io/gitea/api/IssueApiTest.java | 1355 ++++++++ .../java/io/gitea/api/IssueApiTest.java1 | 987 ++++++ .../io/gitea/api/MiscellaneousApiTest.java | 114 + .../io/gitea/api/NotificationApiTest.java | 171 + .../io/gitea/api/OrganizationApiTest.java | 777 +++++ .../java/io/gitea/api/PackageApiTest.java | 113 + .../java/io/gitea/api/RepositoryApiTest.java | 2598 +++++++++++++++ .../java/io/gitea/api/SettingsApiTest.java | 98 + src/test2/java/io/gitea/api/UserApiTest.java | 892 +++++ 268 files changed, 27954 insertions(+), 627 deletions(-) create mode 100644 docs/Activity.md create mode 100644 docs/ChangeFileOperation.md create mode 100644 docs/ChangeFilesOptions.md create mode 100644 docs/CreateOrUpdateSecretOption.md create mode 100644 docs/FilesResponse.md create mode 100644 docs/GitignoreTemplateInfo.md create mode 100644 docs/IssueConfig.md create mode 100644 docs/IssueConfigContactLink.md create mode 100644 docs/IssueConfigValidation.md create mode 100644 docs/IssueMeta.md create mode 100644 docs/LabelTemplate.md create mode 100644 docs/LicenseTemplateInfo.md create mode 100644 docs/LicensesTemplateListEntry.md create mode 100644 docs/MarkupOption.md create mode 100644 docs/NewIssuePinsAllowed.md create mode 100644 docs/RenameUserOption.md create mode 100644 docs/Secret.md create mode 100644 docs/UpdateRepoAvatarOption.md create mode 100644 docs/UpdateUserAvatarOption.md create mode 100644 src/main/java/io/gitea/model/Activity.java create mode 100644 src/main/java/io/gitea/model/ChangeFileOperation.java create mode 100644 src/main/java/io/gitea/model/ChangeFilesOptions.java create mode 100644 src/main/java/io/gitea/model/CreateOrUpdateSecretOption.java create mode 100644 src/main/java/io/gitea/model/FilesResponse.java create mode 100644 src/main/java/io/gitea/model/GitignoreTemplateInfo.java create mode 100644 src/main/java/io/gitea/model/IssueConfig.java create mode 100644 src/main/java/io/gitea/model/IssueConfigContactLink.java create mode 100644 src/main/java/io/gitea/model/IssueConfigValidation.java create mode 100644 src/main/java/io/gitea/model/IssueMeta.java create mode 100644 src/main/java/io/gitea/model/LabelTemplate.java create mode 100644 src/main/java/io/gitea/model/LicenseTemplateInfo.java create mode 100644 src/main/java/io/gitea/model/LicensesTemplateListEntry.java create mode 100644 src/main/java/io/gitea/model/MarkupOption.java create mode 100644 src/main/java/io/gitea/model/NewIssuePinsAllowed.java create mode 100644 src/main/java/io/gitea/model/RenameUserOption.java create mode 100644 src/main/java/io/gitea/model/Secret.java create mode 100644 src/main/java/io/gitea/model/UpdateRepoAvatarOption.java create mode 100644 src/main/java/io/gitea/model/UpdateUserAvatarOption.java create mode 100644 src/test2/java/io/gitea/api/ActivitypubApiTest.java create mode 100644 src/test2/java/io/gitea/api/AdminApiTest.java create mode 100644 src/test2/java/io/gitea/api/IssueApiTest.java create mode 100644 src/test2/java/io/gitea/api/IssueApiTest.java1 create mode 100644 src/test2/java/io/gitea/api/MiscellaneousApiTest.java create mode 100644 src/test2/java/io/gitea/api/NotificationApiTest.java create mode 100644 src/test2/java/io/gitea/api/OrganizationApiTest.java create mode 100644 src/test2/java/io/gitea/api/PackageApiTest.java create mode 100644 src/test2/java/io/gitea/api/RepositoryApiTest.java create mode 100644 src/test2/java/io/gitea/api/SettingsApiTest.java create mode 100644 src/test2/java/io/gitea/api/UserApiTest.java diff --git a/docs/AccessToken.md b/docs/AccessToken.md index 3e3cf50..264b1cc 100644 --- a/docs/AccessToken.md +++ b/docs/AccessToken.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **Long** | | [optional] **name** | **String** | | [optional] +**scopes** | **List<String>** | | [optional] **sha1** | **String** | | [optional] **tokenLastEight** | **String** | | [optional] diff --git a/docs/Activity.md b/docs/Activity.md new file mode 100644 index 0000000..35503ef --- /dev/null +++ b/docs/Activity.md @@ -0,0 +1,22 @@ + +# Activity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**actUser** | [**User**](User.md) | | [optional] +**actUserId** | **Long** | | [optional] +**comment** | [**Comment**](Comment.md) | | [optional] +**commentId** | **Long** | | [optional] +**content** | **String** | | [optional] +**created** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**id** | **Long** | | [optional] +**isPrivate** | **Boolean** | | [optional] +**opType** | **String** | | [optional] +**refName** | **String** | | [optional] +**repo** | [**Repository**](Repository.md) | | [optional] +**repoId** | **Long** | | [optional] +**userId** | **Long** | | [optional] + + + diff --git a/docs/ActivitypubApi.md b/docs/ActivitypubApi.md index f136396..c9a8923 100644 --- a/docs/ActivitypubApi.md +++ b/docs/ActivitypubApi.md @@ -4,13 +4,13 @@ All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- -[**activitypubPerson**](ActivitypubApi.md#activitypubPerson) | **GET** /activitypub/user/{username} | Returns the Person actor for a user -[**activitypubPersonInbox**](ActivitypubApi.md#activitypubPersonInbox) | **POST** /activitypub/user/{username}/inbox | Send to the inbox +[**activitypubPerson**](ActivitypubApi.md#activitypubPerson) | **GET** /activitypub/user-id/{user-id} | Returns the Person actor for a user +[**activitypubPersonInbox**](ActivitypubApi.md#activitypubPersonInbox) | **POST** /activitypub/user-id/{user-id}/inbox | Send to the inbox # **activitypubPerson** -> ActivityPub activitypubPerson(username) +> ActivityPub activitypubPerson(userId) Returns the Person actor for a user @@ -67,9 +67,9 @@ Token.setApiKey("YOUR API KEY"); //Token.setApiKeyPrefix("Token"); ActivitypubApi apiInstance = new ActivitypubApi(); -String username = "username_example"; // String | username of the user +Integer userId = 56; // Integer | user ID of the user try { - ActivityPub result = apiInstance.activitypubPerson(username); + ActivityPub result = apiInstance.activitypubPerson(userId); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling ActivitypubApi#activitypubPerson"); @@ -81,7 +81,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **String**| username of the user | + **userId** | **Integer**| user ID of the user | ### Return type @@ -98,7 +98,7 @@ Name | Type | Description | Notes # **activitypubPersonInbox** -> activitypubPersonInbox(username) +> activitypubPersonInbox(userId) Send to the inbox @@ -155,9 +155,9 @@ Token.setApiKey("YOUR API KEY"); //Token.setApiKeyPrefix("Token"); ActivitypubApi apiInstance = new ActivitypubApi(); -String username = "username_example"; // String | username of the user +Integer userId = 56; // Integer | user ID of the user try { - apiInstance.activitypubPersonInbox(username); + apiInstance.activitypubPersonInbox(userId); } catch (ApiException e) { System.err.println("Exception when calling ActivitypubApi#activitypubPersonInbox"); e.printStackTrace(); @@ -168,7 +168,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **username** | **String**| username of the user | + **userId** | **Integer**| user ID of the user | ### Return type diff --git a/docs/AdminApi.md b/docs/AdminApi.md index aefc57e..ae66c6c 100644 --- a/docs/AdminApi.md +++ b/docs/AdminApi.md @@ -5,18 +5,26 @@ All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**adminAdoptRepository**](AdminApi.md#adminAdoptRepository) | **POST** /admin/unadopted/{owner}/{repo} | Adopt unadopted files as a repository +[**adminCreateHook**](AdminApi.md#adminCreateHook) | **POST** /admin/hooks | Create a hook [**adminCreateOrg**](AdminApi.md#adminCreateOrg) | **POST** /admin/users/{username}/orgs | Create an organization [**adminCreatePublicKey**](AdminApi.md#adminCreatePublicKey) | **POST** /admin/users/{username}/keys | Add a public key on behalf of a user [**adminCreateRepo**](AdminApi.md#adminCreateRepo) | **POST** /admin/users/{username}/repos | Create a repository on behalf of a user [**adminCreateUser**](AdminApi.md#adminCreateUser) | **POST** /admin/users | Create a user [**adminCronList**](AdminApi.md#adminCronList) | **GET** /admin/cron | List cron tasks [**adminCronRun**](AdminApi.md#adminCronRun) | **POST** /admin/cron/{task} | Run cron task +[**adminDeleteHook**](AdminApi.md#adminDeleteHook) | **DELETE** /admin/hooks/{id} | Delete a hook [**adminDeleteUnadoptedRepository**](AdminApi.md#adminDeleteUnadoptedRepository) | **DELETE** /admin/unadopted/{owner}/{repo} | Delete unadopted files [**adminDeleteUser**](AdminApi.md#adminDeleteUser) | **DELETE** /admin/users/{username} | Delete a user [**adminDeleteUserPublicKey**](AdminApi.md#adminDeleteUserPublicKey) | **DELETE** /admin/users/{username}/keys/{id} | Delete a user's public key +[**adminEditHook**](AdminApi.md#adminEditHook) | **PATCH** /admin/hooks/{id} | Update a hook [**adminEditUser**](AdminApi.md#adminEditUser) | **PATCH** /admin/users/{username} | Edit an existing user +[**adminGetAllEmails**](AdminApi.md#adminGetAllEmails) | **GET** /admin/emails | List all emails [**adminGetAllOrgs**](AdminApi.md#adminGetAllOrgs) | **GET** /admin/orgs | List all organizations -[**adminGetAllUsers**](AdminApi.md#adminGetAllUsers) | **GET** /admin/users | List all users +[**adminGetHook**](AdminApi.md#adminGetHook) | **GET** /admin/hooks/{id} | Get a hook +[**adminListHooks**](AdminApi.md#adminListHooks) | **GET** /admin/hooks | List system's webhooks +[**adminRenameUser**](AdminApi.md#adminRenameUser) | **POST** /admin/users/{username}/rename | Rename a user +[**adminSearchEmails**](AdminApi.md#adminSearchEmails) | **GET** /admin/emails/search | Search all emails +[**adminSearchUsers**](AdminApi.md#adminSearchUsers) | **GET** /admin/users | Search users according filter conditions [**adminUnadoptedList**](AdminApi.md#adminUnadoptedList) | **GET** /admin/unadopted | List unadopted repositories @@ -109,6 +117,94 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **adminCreateHook** +> Hook adminCreateHook(body) + +Create a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +CreateHookOption body = new CreateHookOption(); // CreateHookOption | +try { + Hook result = apiInstance.adminCreateHook(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminCreateHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateHookOption**](CreateHookOption.md)| | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **adminCreateOrg** > Organization adminCreateOrg(username, organization) @@ -639,6 +735,93 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **adminDeleteHook** +> adminDeleteHook(id) + +Delete a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +Long id = 789L; // Long | id of the hook to delete +try { + apiInstance.adminDeleteHook(id); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminDeleteHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the hook to delete | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -735,7 +918,7 @@ null (empty response body) # **adminDeleteUser** -> adminDeleteUser(username) +> adminDeleteUser(username, purge) Delete a user @@ -793,8 +976,9 @@ Token.setApiKey("YOUR API KEY"); AdminApi apiInstance = new AdminApi(); String username = "username_example"; // String | username of user to delete +Boolean purge = true; // Boolean | purge the user from the system completely try { - apiInstance.adminDeleteUser(username); + apiInstance.adminDeleteUser(username, purge); } catch (ApiException e) { System.err.println("Exception when calling AdminApi#adminDeleteUser"); e.printStackTrace(); @@ -806,6 +990,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| username of user to delete | + **purge** | **Boolean**| purge the user from the system completely | [optional] ### Return type @@ -909,6 +1094,96 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **adminEditHook** +> Hook adminEditHook(id, body) + +Update a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +Long id = 789L; // Long | id of the hook to update +EditHookOption body = new EditHookOption(); // EditHookOption | +try { + Hook result = apiInstance.adminEditHook(id, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminEditHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the hook to update | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **adminEditUser** > User adminEditUser(username, body) @@ -999,6 +1274,96 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **adminGetAllEmails** +> List<Email> adminGetAllEmails(page, limit) + +List all emails + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.adminGetAllEmails(page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminGetAllEmails"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Email>**](Email.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **adminGetAllOrgs** > List<Organization> adminGetAllOrgs(page, limit) @@ -1089,11 +1454,99 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **adminGetAllUsers** -> List<User> adminGetAllUsers(page, limit) + +# **adminGetHook** +> Hook adminGetHook(id) -List all users +Get a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +Long id = 789L; // Long | id of the hook to get +try { + Hook result = apiInstance.adminGetHook(id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminGetHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the hook to get | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **adminListHooks** +> List<Hook> adminListHooks(page, limit) + +List system's webhooks ### Example ```java @@ -1151,10 +1604,10 @@ AdminApi apiInstance = new AdminApi(); Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results try { - List result = apiInstance.adminGetAllUsers(page, limit); + List result = apiInstance.adminListHooks(page, limit); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling AdminApi#adminGetAllUsers"); + System.err.println("Exception when calling AdminApi#adminListHooks"); e.printStackTrace(); } ``` @@ -1168,6 +1621,281 @@ Name | Type | Description | Notes ### Return type +[**List<Hook>**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **adminRenameUser** +> adminRenameUser(username, body) + +Rename a user + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +String username = "username_example"; // String | existing username of user +RenameUserOption body = new RenameUserOption(); // RenameUserOption | +try { + apiInstance.adminRenameUser(username, body); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminRenameUser"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| existing username of user | + **body** | [**RenameUserOption**](RenameUserOption.md)| | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **adminSearchEmails** +> List<Email> adminSearchEmails(q, page, limit) + +Search all emails + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +String q = "q_example"; // String | keyword +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.adminSearchEmails(q, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminSearchEmails"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **q** | **String**| keyword | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Email>**](Email.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **adminSearchUsers** +> List<User> adminSearchUsers(sourceId, loginName, page, limit) + +Search users according filter conditions + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.AdminApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +AdminApi apiInstance = new AdminApi(); +Long sourceId = 789L; // Long | ID of the user's login source to search for +String loginName = "loginName_example"; // String | user's login name to search for +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.adminSearchUsers(sourceId, loginName, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminSearchUsers"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **sourceId** | **Long**| ID of the user's login source to search for | [optional] + **loginName** | **String**| user's login name to search for | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + [**List<User>**](User.md) ### Authorization diff --git a/docs/BranchProtection.md b/docs/BranchProtection.md index 2fefe65..ca4a68a 100644 --- a/docs/BranchProtection.md +++ b/docs/BranchProtection.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **blockOnOfficialReviewRequests** | **Boolean** | | [optional] **blockOnOutdatedBranch** | **Boolean** | | [optional] **blockOnRejectedReviews** | **Boolean** | | [optional] -**branchName** | **String** | | [optional] +**branchName** | **String** | Deprecated: true | [optional] **createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **dismissStaleApprovals** | **Boolean** | | [optional] **enableApprovalsWhitelist** | **Boolean** | | [optional] @@ -25,6 +25,7 @@ Name | Type | Description | Notes **pushWhitelistUsernames** | **List<String>** | | [optional] **requireSignedCommits** | **Boolean** | | [optional] **requiredApprovals** | **Long** | | [optional] +**ruleName** | **String** | | [optional] **statusCheckContexts** | **List<String>** | | [optional] **unprotectedFilePatterns** | **String** | | [optional] **updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] diff --git a/docs/ChangeFileOperation.md b/docs/ChangeFileOperation.md new file mode 100644 index 0000000..0c12c6f --- /dev/null +++ b/docs/ChangeFileOperation.md @@ -0,0 +1,23 @@ + +# ChangeFileOperation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **String** | new or updated file content, must be base64 encoded | [optional] +**fromPath** | **String** | old path of the file to move | [optional] +**operation** | [**OperationEnum**](#OperationEnum) | indicates what to do with the file | +**path** | **String** | path to the existing or new file | +**sha** | **String** | sha is the SHA for the file that already exists, required for update or delete | [optional] + + + +## Enum: OperationEnum +Name | Value +---- | ----- +CREATE | "create" +UPDATE | "update" +DELETE | "delete" + + + diff --git a/docs/ChangeFilesOptions.md b/docs/ChangeFilesOptions.md new file mode 100644 index 0000000..27e8aad --- /dev/null +++ b/docs/ChangeFilesOptions.md @@ -0,0 +1,17 @@ + +# ChangeFilesOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**Identity**](Identity.md) | | [optional] +**branch** | **String** | branch (optional) to base this file from. if not given, the default branch is used | [optional] +**committer** | [**Identity**](Identity.md) | | [optional] +**dates** | [**CommitDateOptions**](CommitDateOptions.md) | | [optional] +**files** | [**List<ChangeFileOperation>**](ChangeFileOperation.md) | list of file operations | +**message** | **String** | message (optional) for the commit of this file. if not supplied, a default message will be used | [optional] +**newBranch** | **String** | new_branch (optional) will make a new branch from `branch` before creating the file | [optional] +**signoff** | **Boolean** | Add a Signed-off-by trailer by the committer at the end of the commit log message. | [optional] + + + diff --git a/docs/Comment.md b/docs/Comment.md index fb3bafa..b66bc33 100644 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -4,6 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**assets** | [**List<Attachment>**](Attachment.md) | | [optional] **body** | **String** | | [optional] **createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **htmlUrl** | **String** | | [optional] diff --git a/docs/CommitAffectedFiles.md b/docs/CommitAffectedFiles.md index 7a3b15b..fc44d57 100644 --- a/docs/CommitAffectedFiles.md +++ b/docs/CommitAffectedFiles.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **filename** | **String** | | [optional] +**status** | **String** | | [optional] diff --git a/docs/CreateAccessTokenOption.md b/docs/CreateAccessTokenOption.md index c9deb3a..4103798 100644 --- a/docs/CreateAccessTokenOption.md +++ b/docs/CreateAccessTokenOption.md @@ -4,7 +4,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | | [optional] +**name** | **String** | | +**scopes** | **List<String>** | | [optional] diff --git a/docs/CreateBranchProtectionOption.md b/docs/CreateBranchProtectionOption.md index 97a4015..15897ca 100644 --- a/docs/CreateBranchProtectionOption.md +++ b/docs/CreateBranchProtectionOption.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **blockOnOfficialReviewRequests** | **Boolean** | | [optional] **blockOnOutdatedBranch** | **Boolean** | | [optional] **blockOnRejectedReviews** | **Boolean** | | [optional] -**branchName** | **String** | | [optional] +**branchName** | **String** | Deprecated: true | [optional] **dismissStaleApprovals** | **Boolean** | | [optional] **enableApprovalsWhitelist** | **Boolean** | | [optional] **enableMergeWhitelist** | **Boolean** | | [optional] @@ -24,6 +24,7 @@ Name | Type | Description | Notes **pushWhitelistUsernames** | **List<String>** | | [optional] **requireSignedCommits** | **Boolean** | | [optional] **requiredApprovals** | **Long** | | [optional] +**ruleName** | **String** | | [optional] **statusCheckContexts** | **List<String>** | | [optional] **unprotectedFilePatterns** | **String** | | [optional] diff --git a/docs/CreateBranchRepoOption.md b/docs/CreateBranchRepoOption.md index c08d982..b6827f1 100644 --- a/docs/CreateBranchRepoOption.md +++ b/docs/CreateBranchRepoOption.md @@ -5,7 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **newBranchName** | **String** | Name of the branch to create | -**oldBranchName** | **String** | Name of the old branch to create from | [optional] +**oldBranchName** | **String** | Deprecated: true Name of the old branch to create from | [optional] +**oldRefName** | **String** | Name of the old branch/tag/commit to create from | [optional] diff --git a/docs/CreateHookOption.md b/docs/CreateHookOption.md index e59a1ef..04c9827 100644 --- a/docs/CreateHookOption.md +++ b/docs/CreateHookOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **Boolean** | | [optional] +**authorizationHeader** | **String** | | [optional] **branchFilter** | **String** | | [optional] **config** | [**CreateHookOptionConfig**](CreateHookOptionConfig.md) | | **events** | **List<String>** | | [optional] diff --git a/docs/CreateLabelOption.md b/docs/CreateLabelOption.md index 5393f74..127ec97 100644 --- a/docs/CreateLabelOption.md +++ b/docs/CreateLabelOption.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **color** | **String** | | **description** | **String** | | [optional] +**exclusive** | **Boolean** | | [optional] +**isArchived** | **Boolean** | | [optional] **name** | **String** | | diff --git a/docs/CreateOrUpdateSecretOption.md b/docs/CreateOrUpdateSecretOption.md new file mode 100644 index 0000000..b535e38 --- /dev/null +++ b/docs/CreateOrUpdateSecretOption.md @@ -0,0 +1,10 @@ + +# CreateOrUpdateSecretOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | **String** | Data of the secret to update | + + + diff --git a/docs/CreateOrgOption.md b/docs/CreateOrgOption.md index 1145120..8f09590 100644 --- a/docs/CreateOrgOption.md +++ b/docs/CreateOrgOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **String** | | [optional] +**email** | **String** | | [optional] **fullName** | **String** | | [optional] **location** | **String** | | [optional] **repoAdminChangeTeamAccess** | **Boolean** | | [optional] diff --git a/docs/CreatePushMirrorOption.md b/docs/CreatePushMirrorOption.md index fc347ef..2fa7310 100644 --- a/docs/CreatePushMirrorOption.md +++ b/docs/CreatePushMirrorOption.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes **remoteAddress** | **String** | | [optional] **remotePassword** | **String** | | [optional] **remoteUsername** | **String** | | [optional] +**syncOnCommit** | **Boolean** | | [optional] diff --git a/docs/CreateUserOption.md b/docs/CreateUserOption.md index c5f9e11..f6c7e53 100644 --- a/docs/CreateUserOption.md +++ b/docs/CreateUserOption.md @@ -4,6 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | 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** | | **fullName** | **String** | | [optional] **loginName** | **String** | | [optional] diff --git a/docs/EditHookOption.md b/docs/EditHookOption.md index 7db1044..39d2239 100644 --- a/docs/EditHookOption.md +++ b/docs/EditHookOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **Boolean** | | [optional] +**authorizationHeader** | **String** | | [optional] **branchFilter** | **String** | | [optional] **config** | **Map<String, String>** | | [optional] **events** | **List<String>** | | [optional] diff --git a/docs/EditLabelOption.md b/docs/EditLabelOption.md index 15f442c..591fc87 100644 --- a/docs/EditLabelOption.md +++ b/docs/EditLabelOption.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **color** | **String** | | [optional] **description** | **String** | | [optional] +**exclusive** | **Boolean** | | [optional] +**isArchived** | **Boolean** | | [optional] **name** | **String** | | [optional] diff --git a/docs/EditOrgOption.md b/docs/EditOrgOption.md index 5341e21..e3536d9 100644 --- a/docs/EditOrgOption.md +++ b/docs/EditOrgOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **description** | **String** | | [optional] +**email** | **String** | | [optional] **fullName** | **String** | | [optional] **location** | **String** | | [optional] **repoAdminChangeTeamAccess** | **Boolean** | | [optional] diff --git a/docs/EditRepoOption.md b/docs/EditRepoOption.md index bcaa102..f20d5f3 100644 --- a/docs/EditRepoOption.md +++ b/docs/EditRepoOption.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **allowSquashMerge** | **Boolean** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. | [optional] **archived** | **Boolean** | set to `true` to archive this repository. | [optional] **autodetectManualMerge** | **Boolean** | either `true` to enable AutodetectManualMerge, or `false` to prevent it. Note: In some special cases, misjudgments can occur. | [optional] +**defaultAllowMaintainerEdit** | **Boolean** | set to `true` to allow edits from maintainers by default | [optional] **defaultBranch** | **String** | sets the default branch for this repository. | [optional] **defaultDeleteBranchAfterMerge** | **Boolean** | set to `true` to delete pr branch after merge by default | [optional] **defaultMergeStyle** | **String** | set to a merge style to be used by this repository: \"merge\", \"rebase\", \"rebase-merge\", or \"squash\". | [optional] @@ -19,9 +20,12 @@ Name | Type | Description | Notes **enablePrune** | **Boolean** | enable prune - remove obsolete remote-tracking references | [optional] **externalTracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] **externalWiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] +**hasActions** | **Boolean** | either `true` to enable actions unit, or `false` to disable them. | [optional] **hasIssues** | **Boolean** | either `true` to enable issues for this repository or `false` to disable them. | [optional] +**hasPackages** | **Boolean** | either `true` to enable packages unit, or `false` to disable them. | [optional] **hasProjects** | **Boolean** | either `true` to enable project unit, or `false` to disable them. | [optional] **hasPullRequests** | **Boolean** | either `true` to allow pull requests, or `false` to prevent pull request. | [optional] +**hasReleases** | **Boolean** | either `true` to enable releases unit, or `false` to disable them. | [optional] **hasWiki** | **Boolean** | either `true` to enable the wiki for this repository or `false` to disable it. | [optional] **ignoreWhitespaceConflicts** | **Boolean** | either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. | [optional] **internalTracker** | [**InternalTracker**](InternalTracker.md) | | [optional] diff --git a/docs/Email.md b/docs/Email.md index adc9f87..56cee1d 100644 --- a/docs/Email.md +++ b/docs/Email.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **email** | **String** | | [optional] **primary** | **Boolean** | | [optional] +**userId** | **Long** | | [optional] +**username** | **String** | | [optional] **verified** | **Boolean** | | [optional] diff --git a/docs/FilesResponse.md b/docs/FilesResponse.md new file mode 100644 index 0000000..e1e76cf --- /dev/null +++ b/docs/FilesResponse.md @@ -0,0 +1,12 @@ + +# FilesResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**files** | [**List<ContentsResponse>**](ContentsResponse.md) | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] + + + diff --git a/docs/GenerateRepoOption.md b/docs/GenerateRepoOption.md index 5e28176..b7199c4 100644 --- a/docs/GenerateRepoOption.md +++ b/docs/GenerateRepoOption.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **name** | **String** | Name of the repository to create | **owner** | **String** | The organization or person who will own the new repository | **_private** | **Boolean** | Whether the repository is private | [optional] +**protectedBranch** | **Boolean** | include protected branches in template repo | [optional] **topics** | **Boolean** | include topics in template repo | [optional] **webhooks** | **Boolean** | include webhooks in template repo | [optional] diff --git a/docs/GitignoreTemplateInfo.md b/docs/GitignoreTemplateInfo.md new file mode 100644 index 0000000..5efd524 --- /dev/null +++ b/docs/GitignoreTemplateInfo.md @@ -0,0 +1,11 @@ + +# GitignoreTemplateInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **String** | | [optional] +**source** | **String** | | [optional] + + + diff --git a/docs/Hook.md b/docs/Hook.md index 8df8c58..49f9a09 100644 --- a/docs/Hook.md +++ b/docs/Hook.md @@ -5,6 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **Boolean** | | [optional] +**authorizationHeader** | **String** | | [optional] +**branchFilter** | **String** | | [optional] **config** | **Map<String, String>** | | [optional] **createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **events** | **List<String>** | | [optional] diff --git a/docs/Issue.md b/docs/Issue.md index 47de7d8..2a2f4c5 100644 --- a/docs/Issue.md +++ b/docs/Issue.md @@ -4,6 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**assets** | [**List<Attachment>**](Attachment.md) | | [optional] **assignee** | [**User**](User.md) | | [optional] **assignees** | [**List<User>**](User.md) | | [optional] **body** | **String** | | [optional] @@ -19,6 +20,7 @@ Name | Type | Description | Notes **number** | **Long** | | [optional] **originalAuthor** | **String** | | [optional] **originalAuthorId** | **Long** | | [optional] +**pinOrder** | **Long** | | [optional] **pullRequest** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional] **ref** | **String** | | [optional] **repository** | [**RepositoryMeta**](RepositoryMeta.md) | | [optional] diff --git a/docs/IssueApi.md b/docs/IssueApi.md index 3224934..09cefb8 100644 --- a/docs/IssueApi.md +++ b/docs/IssueApi.md @@ -11,12 +11,18 @@ Method | HTTP request | Description [**issueClearLabels**](IssueApi.md#issueClearLabels) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels | Remove all labels from an issue [**issueCreateComment**](IssueApi.md#issueCreateComment) | **POST** /repos/{owner}/{repo}/issues/{index}/comments | Add a comment to an issue [**issueCreateIssue**](IssueApi.md#issueCreateIssue) | **POST** /repos/{owner}/{repo}/issues | Create an issue. If using deadline only the date will be taken into account, and time of day ignored. +[**issueCreateIssueAttachment**](IssueApi.md#issueCreateIssueAttachment) | **POST** /repos/{owner}/{repo}/issues/{index}/assets | Create an issue attachment +[**issueCreateIssueBlocking**](IssueApi.md#issueCreateIssueBlocking) | **POST** /repos/{owner}/{repo}/issues/{index}/blocks | Block the issue given in the body by the issue in path +[**issueCreateIssueCommentAttachment**](IssueApi.md#issueCreateIssueCommentAttachment) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/assets | Create a comment attachment +[**issueCreateIssueDependencies**](IssueApi.md#issueCreateIssueDependencies) | **POST** /repos/{owner}/{repo}/issues/{index}/dependencies | Make the issue in the url depend on the issue in the form. [**issueCreateLabel**](IssueApi.md#issueCreateLabel) | **POST** /repos/{owner}/{repo}/labels | Create a label [**issueCreateMilestone**](IssueApi.md#issueCreateMilestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone [**issueDelete**](IssueApi.md#issueDelete) | **DELETE** /repos/{owner}/{repo}/issues/{index} | Delete an issue [**issueDeleteComment**](IssueApi.md#issueDeleteComment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment [**issueDeleteCommentDeprecated**](IssueApi.md#issueDeleteCommentDeprecated) | **DELETE** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Delete a comment [**issueDeleteCommentReaction**](IssueApi.md#issueDeleteCommentReaction) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Remove a reaction from a comment of an issue +[**issueDeleteIssueAttachment**](IssueApi.md#issueDeleteIssueAttachment) | **DELETE** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Delete an issue attachment +[**issueDeleteIssueCommentAttachment**](IssueApi.md#issueDeleteIssueCommentAttachment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Delete a comment attachment [**issueDeleteIssueReaction**](IssueApi.md#issueDeleteIssueReaction) | **DELETE** /repos/{owner}/{repo}/issues/{index}/reactions | Remove a reaction from an issue [**issueDeleteLabel**](IssueApi.md#issueDeleteLabel) | **DELETE** /repos/{owner}/{repo}/labels/{id} | Delete a label [**issueDeleteMilestone**](IssueApi.md#issueDeleteMilestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone @@ -26,6 +32,8 @@ Method | HTTP request | Description [**issueEditComment**](IssueApi.md#issueEditComment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id} | Edit a comment [**issueEditCommentDeprecated**](IssueApi.md#issueEditCommentDeprecated) | **PATCH** /repos/{owner}/{repo}/issues/{index}/comments/{id} | Edit a comment [**issueEditIssue**](IssueApi.md#issueEditIssue) | **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. +[**issueEditIssueAttachment**](IssueApi.md#issueEditIssueAttachment) | **PATCH** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Edit an issue attachment +[**issueEditIssueCommentAttachment**](IssueApi.md#issueEditIssueCommentAttachment) | **PATCH** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Edit a comment attachment [**issueEditIssueDeadline**](IssueApi.md#issueEditIssueDeadline) | **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. [**issueEditLabel**](IssueApi.md#issueEditLabel) | **PATCH** /repos/{owner}/{repo}/labels/{id} | Update a label [**issueEditMilestone**](IssueApi.md#issueEditMilestone) | **PATCH** /repos/{owner}/{repo}/milestones/{id} | Update a milestone @@ -34,16 +42,24 @@ Method | HTTP request | Description [**issueGetComments**](IssueApi.md#issueGetComments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue [**issueGetCommentsAndTimeline**](IssueApi.md#issueGetCommentsAndTimeline) | **GET** /repos/{owner}/{repo}/issues/{index}/timeline | List all comments and events on an issue [**issueGetIssue**](IssueApi.md#issueGetIssue) | **GET** /repos/{owner}/{repo}/issues/{index} | Get an issue +[**issueGetIssueAttachment**](IssueApi.md#issueGetIssueAttachment) | **GET** /repos/{owner}/{repo}/issues/{index}/assets/{attachment_id} | Get an issue attachment +[**issueGetIssueCommentAttachment**](IssueApi.md#issueGetIssueCommentAttachment) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id} | Get a comment attachment [**issueGetIssueReactions**](IssueApi.md#issueGetIssueReactions) | **GET** /repos/{owner}/{repo}/issues/{index}/reactions | Get a list reactions of an issue [**issueGetLabel**](IssueApi.md#issueGetLabel) | **GET** /repos/{owner}/{repo}/labels/{id} | Get a single label [**issueGetLabels**](IssueApi.md#issueGetLabels) | **GET** /repos/{owner}/{repo}/issues/{index}/labels | Get an issue's labels [**issueGetMilestone**](IssueApi.md#issueGetMilestone) | **GET** /repos/{owner}/{repo}/milestones/{id} | Get a milestone [**issueGetMilestonesList**](IssueApi.md#issueGetMilestonesList) | **GET** /repos/{owner}/{repo}/milestones | Get all of a repository's opened milestones [**issueGetRepoComments**](IssueApi.md#issueGetRepoComments) | **GET** /repos/{owner}/{repo}/issues/comments | List all comments in a repository +[**issueListBlocks**](IssueApi.md#issueListBlocks) | **GET** /repos/{owner}/{repo}/issues/{index}/blocks | List issues that are blocked by this issue +[**issueListIssueAttachments**](IssueApi.md#issueListIssueAttachments) | **GET** /repos/{owner}/{repo}/issues/{index}/assets | List issue's attachments +[**issueListIssueCommentAttachments**](IssueApi.md#issueListIssueCommentAttachments) | **GET** /repos/{owner}/{repo}/issues/comments/{id}/assets | List comment's attachments +[**issueListIssueDependencies**](IssueApi.md#issueListIssueDependencies) | **GET** /repos/{owner}/{repo}/issues/{index}/dependencies | List an issue's dependencies, i.e all issues that block this issue. [**issueListIssues**](IssueApi.md#issueListIssues) | **GET** /repos/{owner}/{repo}/issues | List a repository's issues [**issueListLabels**](IssueApi.md#issueListLabels) | **GET** /repos/{owner}/{repo}/labels | Get all of a repository's labels [**issuePostCommentReaction**](IssueApi.md#issuePostCommentReaction) | **POST** /repos/{owner}/{repo}/issues/comments/{id}/reactions | Add a reaction to a comment of an issue [**issuePostIssueReaction**](IssueApi.md#issuePostIssueReaction) | **POST** /repos/{owner}/{repo}/issues/{index}/reactions | Add a reaction to an issue +[**issueRemoveIssueBlocking**](IssueApi.md#issueRemoveIssueBlocking) | **DELETE** /repos/{owner}/{repo}/issues/{index}/blocks | Unblock the issue given in the body by the issue in path +[**issueRemoveIssueDependencies**](IssueApi.md#issueRemoveIssueDependencies) | **DELETE** /repos/{owner}/{repo}/issues/{index}/dependencies | Remove an issue dependency [**issueRemoveLabel**](IssueApi.md#issueRemoveLabel) | **DELETE** /repos/{owner}/{repo}/issues/{index}/labels/{id} | Remove a label from an issue [**issueReplaceLabels**](IssueApi.md#issueReplaceLabels) | **PUT** /repos/{owner}/{repo}/issues/{index}/labels | Replace an issue's labels [**issueResetTime**](IssueApi.md#issueResetTime) | **DELETE** /repos/{owner}/{repo}/issues/{index}/times | Reset a tracked time of an issue @@ -52,6 +68,9 @@ Method | HTTP request | Description [**issueStopStopWatch**](IssueApi.md#issueStopStopWatch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. [**issueSubscriptions**](IssueApi.md#issueSubscriptions) | **GET** /repos/{owner}/{repo}/issues/{index}/subscriptions | Get users who subscribed on an issue. [**issueTrackedTimes**](IssueApi.md#issueTrackedTimes) | **GET** /repos/{owner}/{repo}/issues/{index}/times | List an issue's tracked times +[**moveIssuePin**](IssueApi.md#moveIssuePin) | **PATCH** /repos/{owner}/{repo}/issues/{index}/pin/{position} | Moves the Pin to the given Position +[**pinIssue**](IssueApi.md#pinIssue) | **POST** /repos/{owner}/{repo}/issues/{index}/pin | Pin an Issue +[**unpinIssue**](IssueApi.md#unpinIssue) | **DELETE** /repos/{owner}/{repo}/issues/{index}/pin | Unpin an Issue @@ -704,6 +723,386 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **issueCreateIssueAttachment** +> Attachment issueCreateIssueAttachment(owner, repo, index, attachment, name) + +Create an issue attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +File attachment = new File("/path/to/file.txt"); // File | attachment to upload +String name = "name_example"; // String | name of the attachment +try { + Attachment result = apiInstance.issueCreateIssueAttachment(owner, repo, index, attachment, name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueCreateIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachment** | **File**| attachment to upload | + **name** | **String**| name of the attachment | [optional] + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +# **issueCreateIssueBlocking** +> Issue issueCreateIssueBlocking(owner, repo, index, body) + +Block the issue given in the body by the issue in path + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String index = "index_example"; // String | index of the issue +IssueMeta body = new IssueMeta(); // IssueMeta | +try { + Issue result = apiInstance.issueCreateIssueBlocking(owner, repo, index, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueCreateIssueBlocking"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **String**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueCreateIssueCommentAttachment** +> Attachment issueCreateIssueCommentAttachment(owner, repo, id, attachment, name) + +Create a comment attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +File attachment = new File("/path/to/file.txt"); // File | attachment to upload +String name = "name_example"; // String | name of the attachment +try { + Attachment result = apiInstance.issueCreateIssueCommentAttachment(owner, repo, id, attachment, name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueCreateIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachment** | **File**| attachment to upload | + **name** | **String**| name of the attachment | [optional] + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +# **issueCreateIssueDependencies** +> Issue issueCreateIssueDependencies(owner, repo, index, body) + +Make the issue in the url depend on the issue in the form. + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String index = "index_example"; // String | index of the issue +IssueMeta body = new IssueMeta(); // IssueMeta | +try { + Issue result = apiInstance.issueCreateIssueDependencies(owner, repo, index, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueCreateIssueDependencies"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **String**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **issueCreateLabel** > Label issueCreateLabel(owner, repo, body) @@ -1256,6 +1655,192 @@ null (empty response body) - **Content-Type**: application/json - **Accept**: application/json + +# **issueDeleteIssueAttachment** +> issueDeleteIssueAttachment(owner, repo, index, attachmentId) + +Delete an issue attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +Long attachmentId = 789L; // Long | id of the attachment to delete +try { + apiInstance.issueDeleteIssueAttachment(owner, repo, index, attachmentId); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueDeleteIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachmentId** | **Long**| id of the attachment to delete | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueDeleteIssueCommentAttachment** +> issueDeleteIssueCommentAttachment(owner, repo, id, attachmentId) + +Delete a comment attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +Long attachmentId = 789L; // Long | id of the attachment to delete +try { + apiInstance.issueDeleteIssueCommentAttachment(owner, repo, id, attachmentId); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueDeleteIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachmentId** | **Long**| id of the attachment to delete | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **issueDeleteIssueReaction** > issueDeleteIssueReaction(owner, repo, index, content) @@ -2087,6 +2672,198 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **issueEditIssueAttachment** +> Attachment issueEditIssueAttachment(owner, repo, index, attachmentId, body) + +Edit an issue attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +Long attachmentId = 789L; // Long | id of the attachment to edit +EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions | +try { + Attachment result = apiInstance.issueEditIssueAttachment(owner, repo, index, attachmentId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueEditIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachmentId** | **Long**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **issueEditIssueCommentAttachment** +> Attachment issueEditIssueCommentAttachment(owner, repo, id, attachmentId, body) + +Edit a comment attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +Long attachmentId = 789L; // Long | id of the attachment to edit +EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions | +try { + Attachment result = apiInstance.issueEditIssueCommentAttachment(owner, repo, id, attachmentId, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueEditIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachmentId** | **Long**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json @@ -2841,6 +3618,194 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueGetIssueAttachment** +> Attachment issueGetIssueAttachment(owner, repo, index, attachmentId) + +Get an issue attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +Long attachmentId = 789L; // Long | id of the attachment to get +try { + Attachment result = apiInstance.issueGetIssueAttachment(owner, repo, index, attachmentId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueGetIssueAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + **attachmentId** | **Long**| id of the attachment to get | + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueGetIssueCommentAttachment** +> Attachment issueGetIssueCommentAttachment(owner, repo, id, attachmentId) + +Get a comment attachment + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +Long attachmentId = 789L; // Long | id of the attachment to get +try { + Attachment result = apiInstance.issueGetIssueCommentAttachment(owner, repo, id, attachmentId); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueGetIssueCommentAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + **attachmentId** | **Long**| id of the attachment to get | + +### Return type + +[**Attachment**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3409,6 +4374,382 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueListBlocks** +> List<Issue> issueListBlocks(owner, repo, index, page, limit) + +List issues that are blocked by this issue + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String index = "index_example"; // String | index of the issue +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.issueListBlocks(owner, repo, index, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueListBlocks"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **String**| index of the issue | + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Issue>**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueListIssueAttachments** +> List<Attachment> issueListIssueAttachments(owner, repo, index) + +List issue's attachments + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of the issue +try { + List result = apiInstance.issueListIssueAttachments(owner, repo, index); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueListIssueAttachments"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of the issue | + +### Return type + +[**List<Attachment>**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueListIssueCommentAttachments** +> List<Attachment> issueListIssueCommentAttachments(owner, repo, id) + +List comment's attachments + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long id = 789L; // Long | id of the comment +try { + List result = apiInstance.issueListIssueCommentAttachments(owner, repo, id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueListIssueCommentAttachments"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the comment | + +### Return type + +[**List<Attachment>**](Attachment.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueListIssueDependencies** +> List<Issue> issueListIssueDependencies(owner, repo, index, page, limit) + +List an issue's dependencies, i.e all issues that block this issue. + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String index = "index_example"; // String | index of the issue +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.issueListIssueDependencies(owner, repo, index, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueListIssueDependencies"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **String**| index of the issue | + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Issue>**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3810,6 +5151,194 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **issueRemoveIssueBlocking** +> Issue issueRemoveIssueBlocking(owner, repo, index, body) + +Unblock the issue given in the body by the issue in path + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String index = "index_example"; // String | index of the issue +IssueMeta body = new IssueMeta(); // IssueMeta | +try { + Issue result = apiInstance.issueRemoveIssueBlocking(owner, repo, index, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueRemoveIssueBlocking"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **String**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **issueRemoveIssueDependencies** +> Issue issueRemoveIssueDependencies(owner, repo, index, body) + +Remove an issue dependency + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String index = "index_example"; // String | index of the issue +IssueMeta body = new IssueMeta(); // IssueMeta | +try { + Issue result = apiInstance.issueRemoveIssueDependencies(owner, repo, index, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueRemoveIssueDependencies"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **String**| index of the issue | + **body** | [**IssueMeta**](IssueMeta.md)| | [optional] + +### Return type + +[**Issue**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **issueRemoveLabel** > issueRemoveLabel(owner, repo, index, id) @@ -4090,7 +5619,7 @@ null (empty response body) # **issueSearchIssues** -> List<Issue> issueSearchIssues(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit) +> List<Issue> issueSearchIssues(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit) Search for issues across the repositories that the user has access to @@ -4159,12 +5688,13 @@ Boolean assigned = true; // Boolean | filter (issues / pulls) assigned to you, d Boolean created = true; // Boolean | filter (issues / pulls) created by you, default is false Boolean mentioned = true; // Boolean | filter (issues / pulls) mentioning you, default is false Boolean reviewRequested = true; // Boolean | filter pulls requesting your review, default is false +Boolean reviewed = true; // Boolean | filter pulls reviewed by you, default is false String owner = "owner_example"; // String | filter by owner String team = "team_example"; // String | filter by team (requires organization owner parameter to be provided) Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results try { - List result = apiInstance.issueSearchIssues(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit); + List result = apiInstance.issueSearchIssues(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IssueApi#issueSearchIssues"); @@ -4188,6 +5718,7 @@ Name | Type | Description | Notes **created** | **Boolean**| filter (issues / pulls) created by you, default is false | [optional] **mentioned** | **Boolean**| filter (issues / pulls) mentioning you, default is false | [optional] **reviewRequested** | **Boolean**| filter pulls requesting your review, default is false | [optional] + **reviewed** | **Boolean**| filter pulls reviewed by you, default is false | [optional] **owner** | **String**| filter by owner | [optional] **team** | **String**| filter by team (requires organization owner parameter to be provided) | [optional] **page** | **Integer**| page number of results to return (1-based) | [optional] @@ -4586,3 +6117,278 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **moveIssuePin** +> moveIssuePin(owner, repo, index, position) + +Moves the Pin to the given Position + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of issue +Long position = 789L; // Long | the new position +try { + apiInstance.moveIssuePin(owner, repo, index, position); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#moveIssuePin"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of issue | + **position** | **Long**| the new position | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + + +# **pinIssue** +> pinIssue(owner, repo, index) + +Pin an Issue + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of issue to pin +try { + apiInstance.pinIssue(owner, repo, index); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#pinIssue"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of issue to pin | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + + +# **unpinIssue** +> unpinIssue(owner, repo, index) + +Unpin an Issue + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.IssueApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +IssueApi apiInstance = new IssueApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +Long index = 789L; // Long | index of issue to unpin +try { + apiInstance.unpinIssue(owner, repo, index); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#unpinIssue"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **index** | **Long**| index of issue to unpin | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + diff --git a/docs/IssueConfig.md b/docs/IssueConfig.md new file mode 100644 index 0000000..d5e82a2 --- /dev/null +++ b/docs/IssueConfig.md @@ -0,0 +1,11 @@ + +# IssueConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**blankIssuesEnabled** | **Boolean** | | [optional] +**contactLinks** | [**List<IssueConfigContactLink>**](IssueConfigContactLink.md) | | [optional] + + + diff --git a/docs/IssueConfigContactLink.md b/docs/IssueConfigContactLink.md new file mode 100644 index 0000000..4d59231 --- /dev/null +++ b/docs/IssueConfigContactLink.md @@ -0,0 +1,12 @@ + +# IssueConfigContactLink + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**about** | **String** | | [optional] +**name** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/IssueConfigValidation.md b/docs/IssueConfigValidation.md new file mode 100644 index 0000000..3cecd88 --- /dev/null +++ b/docs/IssueConfigValidation.md @@ -0,0 +1,11 @@ + +# IssueConfigValidation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **String** | | [optional] +**valid** | **Boolean** | | [optional] + + + diff --git a/docs/IssueMeta.md b/docs/IssueMeta.md new file mode 100644 index 0000000..d567b44 --- /dev/null +++ b/docs/IssueMeta.md @@ -0,0 +1,12 @@ + +# IssueMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index** | **Long** | | [optional] +**owner** | **String** | | [optional] +**repo** | **String** | | [optional] + + + diff --git a/docs/Label.md b/docs/Label.md index faa999b..557e0fe 100644 --- a/docs/Label.md +++ b/docs/Label.md @@ -6,7 +6,9 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **color** | **String** | | [optional] **description** | **String** | | [optional] +**exclusive** | **Boolean** | | [optional] **id** | **Long** | | [optional] +**isArchived** | **Boolean** | | [optional] **name** | **String** | | [optional] **url** | **String** | | [optional] diff --git a/docs/LabelTemplate.md b/docs/LabelTemplate.md new file mode 100644 index 0000000..778d7a9 --- /dev/null +++ b/docs/LabelTemplate.md @@ -0,0 +1,13 @@ + +# LabelTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**color** | **String** | | [optional] +**description** | **String** | | [optional] +**exclusive** | **Boolean** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/docs/LicenseTemplateInfo.md b/docs/LicenseTemplateInfo.md new file mode 100644 index 0000000..cdc68cf --- /dev/null +++ b/docs/LicenseTemplateInfo.md @@ -0,0 +1,14 @@ + +# LicenseTemplateInfo + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**body** | **String** | | [optional] +**implementation** | **String** | | [optional] +**key** | **String** | | [optional] +**name** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/LicensesTemplateListEntry.md b/docs/LicensesTemplateListEntry.md new file mode 100644 index 0000000..355d2c9 --- /dev/null +++ b/docs/LicensesTemplateListEntry.md @@ -0,0 +1,12 @@ + +# LicensesTemplateListEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**key** | **String** | | [optional] +**name** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/MarkdownOption.md b/docs/MarkdownOption.md index 7d7282e..c30d831 100644 --- a/docs/MarkdownOption.md +++ b/docs/MarkdownOption.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **context** | **String** | Context to render in: body | [optional] -**mode** | **String** | Mode to render in: body | [optional] +**mode** | **String** | Mode to render (comment, gfm, markdown) in: body | [optional] **text** | **String** | Text markdown to render in: body | [optional] **wiki** | **Boolean** | Is it a wiki page ? in: body | [optional] diff --git a/docs/MarkupOption.md b/docs/MarkupOption.md new file mode 100644 index 0000000..638edb3 --- /dev/null +++ b/docs/MarkupOption.md @@ -0,0 +1,14 @@ + +# MarkupOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**context** | **String** | Context to render in: body | [optional] +**filePath** | **String** | File path for detecting extension in file mode in: body | [optional] +**mode** | **String** | Mode to render (comment, gfm, markdown, file) in: body | [optional] +**text** | **String** | Text markup to render in: body | [optional] +**wiki** | **Boolean** | Is it a wiki page ? in: body | [optional] + + + diff --git a/docs/MigrateRepoOptions.md b/docs/MigrateRepoOptions.md index 7b8c7ad..1da6b6e 100644 --- a/docs/MigrateRepoOptions.md +++ b/docs/MigrateRepoOptions.md @@ -34,6 +34,10 @@ GIT | "git" GITHUB | "github" GITEA | "gitea" GITLAB | "gitlab" +GOGS | "gogs" +ONEDEV | "onedev" +GITBUCKET | "gitbucket" +CODEBASE | "codebase" diff --git a/docs/MiscellaneousApi.md b/docs/MiscellaneousApi.md index 5d8bec9..bbc1be0 100644 --- a/docs/MiscellaneousApi.md +++ b/docs/MiscellaneousApi.md @@ -4,13 +4,284 @@ All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- +[**getGitignoreTemplateInfo**](MiscellaneousApi.md#getGitignoreTemplateInfo) | **GET** /gitignore/templates/{name} | Returns information about a gitignore template +[**getLabelTemplateInfo**](MiscellaneousApi.md#getLabelTemplateInfo) | **GET** /label/templates/{name} | Returns all labels in a template +[**getLicenseTemplateInfo**](MiscellaneousApi.md#getLicenseTemplateInfo) | **GET** /licenses/{name} | Returns information about a license template [**getNodeInfo**](MiscellaneousApi.md#getNodeInfo) | **GET** /nodeinfo | Returns the nodeinfo of the Gitea application [**getSigningKey**](MiscellaneousApi.md#getSigningKey) | **GET** /signing-key.gpg | Get default signing-key.gpg [**getVersion**](MiscellaneousApi.md#getVersion) | **GET** /version | Returns the version of the Gitea application +[**listGitignoresTemplates**](MiscellaneousApi.md#listGitignoresTemplates) | **GET** /gitignore/templates | Returns a list of all gitignore templates +[**listLabelTemplates**](MiscellaneousApi.md#listLabelTemplates) | **GET** /label/templates | Returns a list of all label templates +[**listLicenseTemplates**](MiscellaneousApi.md#listLicenseTemplates) | **GET** /licenses | Returns a list of all license templates [**renderMarkdown**](MiscellaneousApi.md#renderMarkdown) | **POST** /markdown | Render a markdown document as HTML [**renderMarkdownRaw**](MiscellaneousApi.md#renderMarkdownRaw) | **POST** /markdown/raw | Render raw markdown as HTML +[**renderMarkup**](MiscellaneousApi.md#renderMarkup) | **POST** /markup | Render a markup document as HTML + +# **getGitignoreTemplateInfo** +> GitignoreTemplateInfo getGitignoreTemplateInfo(name) + +Returns information about a gitignore template + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +String name = "name_example"; // String | name of the template +try { + GitignoreTemplateInfo result = apiInstance.getGitignoreTemplateInfo(name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#getGitignoreTemplateInfo"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the template | + +### Return type + +[**GitignoreTemplateInfo**](GitignoreTemplateInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **getLabelTemplateInfo** +> List<LabelTemplate> getLabelTemplateInfo(name) + +Returns all labels in a template + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +String name = "name_example"; // String | name of the template +try { + List result = apiInstance.getLabelTemplateInfo(name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#getLabelTemplateInfo"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the template | + +### Return type + +[**List<LabelTemplate>**](LabelTemplate.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **getLicenseTemplateInfo** +> LicenseTemplateInfo getLicenseTemplateInfo(name) + +Returns information about a license template + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +String name = "name_example"; // String | name of the license +try { + LicenseTemplateInfo result = apiInstance.getLicenseTemplateInfo(name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#getLicenseTemplateInfo"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **name** | **String**| name of the license | + +### Return type + +[**LicenseTemplateInfo**](LicenseTemplateInfo.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **getNodeInfo** > NodeInfo getNodeInfo() @@ -258,6 +529,258 @@ This endpoint does not need any parameter. [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **listGitignoresTemplates** +> List<String> listGitignoresTemplates() + +Returns a list of all gitignore templates + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +try { + List result = apiInstance.listGitignoresTemplates(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#listGitignoresTemplates"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**List<String>** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **listLabelTemplates** +> List<String> listLabelTemplates() + +Returns a list of all label templates + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +try { + List result = apiInstance.listLabelTemplates(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#listLabelTemplates"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +**List<String>** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **listLicenseTemplates** +> List<LicensesTemplateListEntry> listLicenseTemplates() + +Returns a list of all license templates + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +try { + List result = apiInstance.listLicenseTemplates(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#listLicenseTemplates"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<LicensesTemplateListEntry>**](LicensesTemplateListEntry.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -439,3 +962,91 @@ Name | Type | Description | Notes - **Content-Type**: text/plain - **Accept**: text/html + +# **renderMarkup** +> String renderMarkup(body) + +Render a markup document as HTML + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.MiscellaneousApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +MiscellaneousApi apiInstance = new MiscellaneousApi(); +MarkupOption body = new MarkupOption(); // MarkupOption | +try { + String result = apiInstance.renderMarkup(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling MiscellaneousApi#renderMarkup"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**MarkupOption**](MarkupOption.md)| | [optional] + +### Return type + +**String** + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: text/html + diff --git a/docs/ModelPackage.md b/docs/ModelPackage.md index 0c07c8a..bbd7dfe 100644 --- a/docs/ModelPackage.md +++ b/docs/ModelPackage.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **creator** | [**User**](User.md) | | [optional] +**htmlUrl** | **String** | | [optional] **id** | **Long** | | [optional] **name** | **String** | | [optional] **owner** | [**User**](User.md) | | [optional] diff --git a/docs/NewIssuePinsAllowed.md b/docs/NewIssuePinsAllowed.md new file mode 100644 index 0000000..9ec01c1 --- /dev/null +++ b/docs/NewIssuePinsAllowed.md @@ -0,0 +1,11 @@ + +# NewIssuePinsAllowed + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**issues** | **Boolean** | | [optional] +**pullRequests** | **Boolean** | | [optional] + + + diff --git a/docs/Organization.md b/docs/Organization.md index 3430a23..ccec1c5 100644 --- a/docs/Organization.md +++ b/docs/Organization.md @@ -6,6 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avatarUrl** | **String** | | [optional] **description** | **String** | | [optional] +**email** | **String** | | [optional] **fullName** | **String** | | [optional] **id** | **Long** | | [optional] **location** | **String** | | [optional] diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index 65fec66..e727471 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -6,6 +6,7 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**createOrgRepo**](OrganizationApi.md#createOrgRepo) | **POST** /orgs/{org}/repos | Create a repository in an organization [**createOrgRepoDeprecated**](OrganizationApi.md#createOrgRepoDeprecated) | **POST** /org/{org}/repos | Create a repository in an organization +[**deleteOrgSecret**](OrganizationApi.md#deleteOrgSecret) | **DELETE** /orgs/{org}/actions/secrets/{secretname} | Delete a secret in an organization [**orgAddTeamMember**](OrganizationApi.md#orgAddTeamMember) | **PUT** /teams/{id}/members/{username} | Add a team member [**orgAddTeamRepository**](OrganizationApi.md#orgAddTeamRepository) | **PUT** /teams/{id}/repos/{org}/{repo} | Add a repository to a team [**orgConcealMember**](OrganizationApi.md#orgConcealMember) | **DELETE** /orgs/{org}/public_members/{username} | Conceal a user's membership @@ -14,6 +15,7 @@ Method | HTTP request | Description [**orgCreateLabel**](OrganizationApi.md#orgCreateLabel) | **POST** /orgs/{org}/labels | Create a label for an organization [**orgCreateTeam**](OrganizationApi.md#orgCreateTeam) | **POST** /orgs/{org}/teams | Create a team [**orgDelete**](OrganizationApi.md#orgDelete) | **DELETE** /orgs/{org} | Delete an organization +[**orgDeleteAvatar**](OrganizationApi.md#orgDeleteAvatar) | **DELETE** /orgs/{org}/avatar | Delete Avatar [**orgDeleteHook**](OrganizationApi.md#orgDeleteHook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook [**orgDeleteLabel**](OrganizationApi.md#orgDeleteLabel) | **DELETE** /orgs/{org}/labels/{id} | Delete a label [**orgDeleteMember**](OrganizationApi.md#orgDeleteMember) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization @@ -30,12 +32,15 @@ Method | HTTP request | Description [**orgGetUserPermissions**](OrganizationApi.md#orgGetUserPermissions) | **GET** /users/{username}/orgs/{org}/permissions | Get user permissions in organization [**orgIsMember**](OrganizationApi.md#orgIsMember) | **GET** /orgs/{org}/members/{username} | Check if a user is a member of an organization [**orgIsPublicMember**](OrganizationApi.md#orgIsPublicMember) | **GET** /orgs/{org}/public_members/{username} | Check if a user is a public member of an organization +[**orgListActionsSecrets**](OrganizationApi.md#orgListActionsSecrets) | **GET** /orgs/{org}/actions/secrets | List an organization's actions secrets +[**orgListActivityFeeds**](OrganizationApi.md#orgListActivityFeeds) | **GET** /orgs/{org}/activities/feeds | List an organization's activity feeds [**orgListCurrentUserOrgs**](OrganizationApi.md#orgListCurrentUserOrgs) | **GET** /user/orgs | List the current user's organizations [**orgListHooks**](OrganizationApi.md#orgListHooks) | **GET** /orgs/{org}/hooks | List an organization's webhooks [**orgListLabels**](OrganizationApi.md#orgListLabels) | **GET** /orgs/{org}/labels | List an organization's labels [**orgListMembers**](OrganizationApi.md#orgListMembers) | **GET** /orgs/{org}/members | List an organization's members [**orgListPublicMembers**](OrganizationApi.md#orgListPublicMembers) | **GET** /orgs/{org}/public_members | List an organization's public members [**orgListRepos**](OrganizationApi.md#orgListRepos) | **GET** /orgs/{org}/repos | List an organization's repos +[**orgListTeamActivityFeeds**](OrganizationApi.md#orgListTeamActivityFeeds) | **GET** /teams/{id}/activities/feeds | List a team's activity feeds [**orgListTeamMember**](OrganizationApi.md#orgListTeamMember) | **GET** /teams/{id}/members/{username} | List a particular member of team [**orgListTeamMembers**](OrganizationApi.md#orgListTeamMembers) | **GET** /teams/{id}/members | List a team's members [**orgListTeamRepo**](OrganizationApi.md#orgListTeamRepo) | **GET** /teams/{id}/repos/{org}/{repo} | List a particular repo of team @@ -45,7 +50,9 @@ Method | HTTP request | Description [**orgPublicizeMember**](OrganizationApi.md#orgPublicizeMember) | **PUT** /orgs/{org}/public_members/{username} | Publicize a user's membership [**orgRemoveTeamMember**](OrganizationApi.md#orgRemoveTeamMember) | **DELETE** /teams/{id}/members/{username} | Remove a team member [**orgRemoveTeamRepository**](OrganizationApi.md#orgRemoveTeamRepository) | **DELETE** /teams/{id}/repos/{org}/{repo} | Remove a repository from a team +[**orgUpdateAvatar**](OrganizationApi.md#orgUpdateAvatar) | **POST** /orgs/{org}/avatar | Update Avatar [**teamSearch**](OrganizationApi.md#teamSearch) | **GET** /orgs/{org}/teams/search | Search for teams within an organization +[**updateOrgSecret**](OrganizationApi.md#updateOrgSecret) | **PUT** /orgs/{org}/actions/secrets/{secretname} | Create or Update a secret value in an organization @@ -223,6 +230,95 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteOrgSecret** +> deleteOrgSecret(org, secretname) + +Delete a secret in an organization + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +String org = "org_example"; // String | name of organization +String secretname = "secretname_example"; // String | name of the secret +try { + apiInstance.deleteOrgSecret(org, secretname); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#deleteOrgSecret"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of organization | + **secretname** | **String**| name of the secret | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json @@ -937,6 +1033,93 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **orgDeleteAvatar** +> orgDeleteAvatar(org) + +Delete Avatar + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +String org = "org_example"; // String | name of the organization +try { + apiInstance.orgDeleteAvatar(org); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgDeleteAvatar"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of the organization | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -2374,6 +2557,192 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json, text/html + +# **orgListActionsSecrets** +> List<Secret> orgListActionsSecrets(org, page, limit) + +List an organization's actions secrets + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +String org = "org_example"; // String | name of the organization +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.orgListActionsSecrets(org, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListActionsSecrets"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of the organization | + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Secret>**](Secret.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **orgListActivityFeeds** +> List<Activity> orgListActivityFeeds(org, date, page, limit) + +List an organization's activity feeds + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +String org = "org_example"; // String | name of the org +LocalDate date = LocalDate.now(); // LocalDate | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.orgListActivityFeeds(org, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of the org | + **date** | **LocalDate**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **orgListCurrentUserOrgs** > List<Organization> orgListCurrentUserOrgs(page, limit) @@ -2919,6 +3288,100 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **orgListTeamActivityFeeds** +> List<Activity> orgListTeamActivityFeeds(id, date, page, limit) + +List a team's activity feeds + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +Long id = 789L; // Long | id of the team +LocalDate date = LocalDate.now(); // LocalDate | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.orgListTeamActivityFeeds(id, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListTeamActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the team | + **date** | **LocalDate**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3740,6 +4203,95 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **orgUpdateAvatar** +> orgUpdateAvatar(org, body) + +Update Avatar + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +String org = "org_example"; // String | name of the organization +UpdateUserAvatarOption body = new UpdateUserAvatarOption(); // UpdateUserAvatarOption | +try { + apiInstance.orgUpdateAvatar(org, body); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgUpdateAvatar"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of the organization | + **body** | [**UpdateUserAvatarOption**](UpdateUserAvatarOption.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3841,3 +4393,94 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **updateOrgSecret** +> updateOrgSecret(org, secretname, body) + +Create or Update a secret value in an organization + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.OrganizationApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +OrganizationApi apiInstance = new OrganizationApi(); +String org = "org_example"; // String | name of organization +String secretname = "secretname_example"; // String | name of the secret +CreateOrUpdateSecretOption body = new CreateOrUpdateSecretOption(); // CreateOrUpdateSecretOption | +try { + apiInstance.updateOrgSecret(org, secretname, body); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#updateOrgSecret"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of organization | + **secretname** | **String**| name of the secret | + **body** | [**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + diff --git a/docs/PackageApi.md b/docs/PackageApi.md index 358e52e..ed2a095 100644 --- a/docs/PackageApi.md +++ b/docs/PackageApi.md @@ -371,7 +371,7 @@ Name | Type | Description | Notes **owner** | **String**| owner of the packages | **page** | **Integer**| page number of results to return (1-based) | [optional] **limit** | **Integer**| page size of results | [optional] - **type** | **String**| package type filter | [optional] [enum: composer, conan, container, generic, helm, maven, npm, nuget, pub, pypi, rubygems, vagrant] + **type** | **String**| package type filter | [optional] [enum: alpine, cargo, chef, composer, conan, conda, container, cran, debian, generic, go, helm, maven, npm, nuget, pub, pypi, rpm, rubygems, swift, vagrant] **q** | **String**| name filter | [optional] ### Return type diff --git a/docs/PullRequest.md b/docs/PullRequest.md index 74fa0cd..dabd75c 100644 --- a/docs/PullRequest.md +++ b/docs/PullRequest.md @@ -28,6 +28,8 @@ Name | Type | Description | Notes **milestone** | [**Milestone**](Milestone.md) | | [optional] **number** | **Long** | | [optional] **patchUrl** | **String** | | [optional] +**pinOrder** | **Long** | | [optional] +**requestedReviewers** | [**List<User>**](User.md) | | [optional] **state** | **String** | | [optional] **title** | **String** | | [optional] **updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] diff --git a/docs/PullReview.md b/docs/PullReview.md index 749e581..3f47466 100644 --- a/docs/PullReview.md +++ b/docs/PullReview.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **state** | **String** | | [optional] **submittedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **team** | [**Team**](Team.md) | | [optional] +**updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **user** | [**User**](User.md) | | [optional] diff --git a/docs/PushMirror.md b/docs/PushMirror.md index f04a345..d297cd0 100644 --- a/docs/PushMirror.md +++ b/docs/PushMirror.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **remoteAddress** | **String** | | [optional] **remoteName** | **String** | | [optional] **repoName** | **String** | | [optional] +**syncOnCommit** | **Boolean** | | [optional] diff --git a/docs/Release.md b/docs/Release.md index 93d7a32..21a3ee3 100644 --- a/docs/Release.md +++ b/docs/Release.md @@ -17,6 +17,7 @@ Name | Type | Description | Notes **tagName** | **String** | | [optional] **tarballUrl** | **String** | | [optional] **targetCommitish** | **String** | | [optional] +**uploadUrl** | **String** | | [optional] **url** | **String** | | [optional] **zipballUrl** | **String** | | [optional] diff --git a/docs/RenameUserOption.md b/docs/RenameUserOption.md new file mode 100644 index 0000000..102182c --- /dev/null +++ b/docs/RenameUserOption.md @@ -0,0 +1,10 @@ + +# RenameUserOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**newUsername** | **String** | New username for this user. This name cannot be in use yet by any other user. | + + + diff --git a/docs/Repository.md b/docs/Repository.md index b91bedb..02f2442 100644 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -10,9 +10,11 @@ Name | Type | Description | Notes **allowRebaseUpdate** | **Boolean** | | [optional] **allowSquashMerge** | **Boolean** | | [optional] **archived** | **Boolean** | | [optional] +**archivedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **avatarUrl** | **String** | | [optional] **cloneUrl** | **String** | | [optional] **createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**defaultAllowMaintainerEdit** | **Boolean** | | [optional] **defaultBranch** | **String** | | [optional] **defaultDeleteBranchAfterMerge** | **Boolean** | | [optional] **defaultMergeStyle** | **String** | | [optional] @@ -23,9 +25,12 @@ Name | Type | Description | Notes **fork** | **Boolean** | | [optional] **forksCount** | **Long** | | [optional] **fullName** | **String** | | [optional] +**hasActions** | **Boolean** | | [optional] **hasIssues** | **Boolean** | | [optional] +**hasPackages** | **Boolean** | | [optional] **hasProjects** | **Boolean** | | [optional] **hasPullRequests** | **Boolean** | | [optional] +**hasReleases** | **Boolean** | | [optional] **hasWiki** | **Boolean** | | [optional] **htmlUrl** | **String** | | [optional] **id** | **Long** | | [optional] @@ -34,6 +39,7 @@ Name | Type | Description | Notes **internalTracker** | [**InternalTracker**](InternalTracker.md) | | [optional] **language** | **String** | | [optional] **languagesUrl** | **String** | | [optional] +**link** | **String** | | [optional] **mirror** | **Boolean** | | [optional] **mirrorInterval** | **String** | | [optional] **mirrorUpdated** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] @@ -52,6 +58,7 @@ Name | Type | Description | Notes **starsCount** | **Long** | | [optional] **template** | **Boolean** | | [optional] **updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**url** | **String** | | [optional] **watchersCount** | **Long** | | [optional] **website** | **String** | | [optional] diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index ea21229..7270f67 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**acceptRepoTransfer**](RepositoryApi.md#acceptRepoTransfer) | **POST** /repos/{owner}/{repo}/transfer/accept | Accept a repo transfer [**createCurrentUserRepo**](RepositoryApi.md#createCurrentUserRepo) | **POST** /user/repos | Create a repository [**createFork**](RepositoryApi.md#createFork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +[**deleteRepoSecret**](RepositoryApi.md#deleteRepoSecret) | **DELETE** /repos/{owner}/{repo}/actions/secrets/{secretname} | Delete a secret in a repository [**generateRepo**](RepositoryApi.md#generateRepo) | **POST** /repos/{template_owner}/{template_repo}/generate | Create a repository using a template [**getAnnotatedTag**](RepositoryApi.md#getAnnotatedTag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) [**getBlob**](RepositoryApi.md#getBlob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. @@ -19,6 +20,7 @@ Method | HTTP request | Description [**repoAddTopic**](RepositoryApi.md#repoAddTopic) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository [**repoApplyDiffPatch**](RepositoryApi.md#repoApplyDiffPatch) | **POST** /repos/{owner}/{repo}/diffpatch | Apply diff patch to repository [**repoCancelScheduledAutoMerge**](RepositoryApi.md#repoCancelScheduledAutoMerge) | **DELETE** /repos/{owner}/{repo}/pulls/{index}/merge | Cancel the scheduled auto merge for the given pull request +[**repoChangeFiles**](RepositoryApi.md#repoChangeFiles) | **POST** /repos/{owner}/{repo}/contents | Modify multiple files in a repository [**repoCheckCollaborator**](RepositoryApi.md#repoCheckCollaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository [**repoCheckTeam**](RepositoryApi.md#repoCheckTeam) | **GET** /repos/{owner}/{repo}/teams/{team} | Check if a team is assigned to a repository [**repoCreateBranch**](RepositoryApi.md#repoCreateBranch) | **POST** /repos/{owner}/{repo}/branches | Create a branch @@ -35,6 +37,7 @@ Method | HTTP request | Description [**repoCreateTag**](RepositoryApi.md#repoCreateTag) | **POST** /repos/{owner}/{repo}/tags | Create a new git tag in a repository [**repoCreateWikiPage**](RepositoryApi.md#repoCreateWikiPage) | **POST** /repos/{owner}/{repo}/wiki/new | Create a wiki page [**repoDelete**](RepositoryApi.md#repoDelete) | **DELETE** /repos/{owner}/{repo} | Delete a repository +[**repoDeleteAvatar**](RepositoryApi.md#repoDeleteAvatar) | **DELETE** /repos/{owner}/{repo}/avatar | Delete avatar [**repoDeleteBranch**](RepositoryApi.md#repoDeleteBranch) | **DELETE** /repos/{owner}/{repo}/branches/{branch} | Delete a specific branch from a repository [**repoDeleteBranchProtection**](RepositoryApi.md#repoDeleteBranchProtection) | **DELETE** /repos/{owner}/{repo}/branch_protections/{name} | Delete a specific branch protection for the repository [**repoDeleteCollaborator**](RepositoryApi.md#repoDeleteCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository @@ -76,9 +79,11 @@ Method | HTTP request | Description [**repoGetEditorConfig**](RepositoryApi.md#repoGetEditorConfig) | **GET** /repos/{owner}/{repo}/editorconfig/{filepath} | Get the EditorConfig definitions of a file in a repository [**repoGetGitHook**](RepositoryApi.md#repoGetGitHook) | **GET** /repos/{owner}/{repo}/hooks/git/{id} | Get a Git hook [**repoGetHook**](RepositoryApi.md#repoGetHook) | **GET** /repos/{owner}/{repo}/hooks/{id} | Get a hook +[**repoGetIssueConfig**](RepositoryApi.md#repoGetIssueConfig) | **GET** /repos/{owner}/{repo}/issue_config | Returns the issue config for a repo [**repoGetIssueTemplates**](RepositoryApi.md#repoGetIssueTemplates) | **GET** /repos/{owner}/{repo}/issue_templates | Get available issue templates for a repository [**repoGetKey**](RepositoryApi.md#repoGetKey) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id [**repoGetLanguages**](RepositoryApi.md#repoGetLanguages) | **GET** /repos/{owner}/{repo}/languages | Get languages and number of bytes of code written +[**repoGetLatestRelease**](RepositoryApi.md#repoGetLatestRelease) | **GET** /repos/{owner}/{repo}/releases/latest | Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at [**repoGetNote**](RepositoryApi.md#repoGetNote) | **GET** /repos/{owner}/{repo}/git/notes/{sha} | Get a note corresponding to a single commit from a repository [**repoGetPullRequest**](RepositoryApi.md#repoGetPullRequest) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request [**repoGetPullRequestCommits**](RepositoryApi.md#repoGetPullRequestCommits) | **GET** /repos/{owner}/{repo}/pulls/{index}/commits | Get commits for a pull request @@ -98,6 +103,7 @@ Method | HTTP request | Description [**repoGetWikiPage**](RepositoryApi.md#repoGetWikiPage) | **GET** /repos/{owner}/{repo}/wiki/page/{pageName} | Get a wiki page [**repoGetWikiPageRevisions**](RepositoryApi.md#repoGetWikiPageRevisions) | **GET** /repos/{owner}/{repo}/wiki/revisions/{pageName} | Get revisions of a wiki page [**repoGetWikiPages**](RepositoryApi.md#repoGetWikiPages) | **GET** /repos/{owner}/{repo}/wiki/pages | Get all wiki pages +[**repoListActivityFeeds**](RepositoryApi.md#repoListActivityFeeds) | **GET** /repos/{owner}/{repo}/activities/feeds | List a repository's activity feeds [**repoListAllGitRefs**](RepositoryApi.md#repoListAllGitRefs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs [**repoListBranchProtection**](RepositoryApi.md#repoListBranchProtection) | **GET** /repos/{owner}/{repo}/branch_protections | List branch protections for a repository [**repoListBranches**](RepositoryApi.md#repoListBranches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches @@ -106,6 +112,8 @@ Method | HTTP request | Description [**repoListGitRefs**](RepositoryApi.md#repoListGitRefs) | **GET** /repos/{owner}/{repo}/git/refs/{ref} | Get specified ref or filtered repository's refs [**repoListHooks**](RepositoryApi.md#repoListHooks) | **GET** /repos/{owner}/{repo}/hooks | List the hooks in a repository [**repoListKeys**](RepositoryApi.md#repoListKeys) | **GET** /repos/{owner}/{repo}/keys | List a repository's keys +[**repoListPinnedIssues**](RepositoryApi.md#repoListPinnedIssues) | **GET** /repos/{owner}/{repo}/issues/pinned | List a repo's pinned issues +[**repoListPinnedPullRequests**](RepositoryApi.md#repoListPinnedPullRequests) | **GET** /repos/{owner}/{repo}/pulls/pinned | List a repo's pinned pull requests [**repoListPullRequests**](RepositoryApi.md#repoListPullRequests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests [**repoListPullReviews**](RepositoryApi.md#repoListPullReviews) | **GET** /repos/{owner}/{repo}/pulls/{index}/reviews | List all reviews for a pull request [**repoListPushMirrors**](RepositoryApi.md#repoListPushMirrors) | **GET** /repos/{owner}/{repo}/push_mirrors | Get all push mirrors of the repository @@ -121,6 +129,7 @@ Method | HTTP request | Description [**repoMergePullRequest**](RepositoryApi.md#repoMergePullRequest) | **POST** /repos/{owner}/{repo}/pulls/{index}/merge | Merge a pull request [**repoMigrate**](RepositoryApi.md#repoMigrate) | **POST** /repos/migrate | Migrate a remote git repository [**repoMirrorSync**](RepositoryApi.md#repoMirrorSync) | **POST** /repos/{owner}/{repo}/mirror-sync | Sync a mirrored repository +[**repoNewPinAllowed**](RepositoryApi.md#repoNewPinAllowed) | **GET** /repos/{owner}/{repo}/new_pin_allowed | Returns if new Issue Pins are allowed [**repoPullRequestIsMerged**](RepositoryApi.md#repoPullRequestIsMerged) | **GET** /repos/{owner}/{repo}/pulls/{index}/merge | Check if a pull request has been merged [**repoPushMirrorSync**](RepositoryApi.md#repoPushMirrorSync) | **POST** /repos/{owner}/{repo}/push_mirrors-sync | Sync all push mirrored repository [**repoSearch**](RepositoryApi.md#repoSearch) | **GET** /repos/search | Search for repositories @@ -130,10 +139,13 @@ Method | HTTP request | Description [**repoTrackedTimes**](RepositoryApi.md#repoTrackedTimes) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times [**repoTransfer**](RepositoryApi.md#repoTransfer) | **POST** /repos/{owner}/{repo}/transfer | Transfer a repo ownership [**repoUnDismissPullReview**](RepositoryApi.md#repoUnDismissPullReview) | **POST** /repos/{owner}/{repo}/pulls/{index}/reviews/{id}/undismissals | Cancel to dismiss a review for a pull request +[**repoUpdateAvatar**](RepositoryApi.md#repoUpdateAvatar) | **POST** /repos/{owner}/{repo}/avatar | Update avatar [**repoUpdateFile**](RepositoryApi.md#repoUpdateFile) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository [**repoUpdatePullRequest**](RepositoryApi.md#repoUpdatePullRequest) | **POST** /repos/{owner}/{repo}/pulls/{index}/update | Merge PR's baseBranch into headBranch [**repoUpdateTopics**](RepositoryApi.md#repoUpdateTopics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository +[**repoValidateIssueConfig**](RepositoryApi.md#repoValidateIssueConfig) | **GET** /repos/{owner}/{repo}/issue_config/validate | Returns the validation information for a issue config [**topicSearch**](RepositoryApi.md#topicSearch) | **GET** /topics/search | search topics via keyword +[**updateRepoSecret**](RepositoryApi.md#updateRepoSecret) | **PUT** /repos/{owner}/{repo}/actions/secrets/{secretname} | Create or Update a secret value in a repository [**userCurrentCheckSubscription**](RepositoryApi.md#userCurrentCheckSubscription) | **GET** /repos/{owner}/{repo}/subscription | Check if the current user is watching a repo [**userCurrentDeleteSubscription**](RepositoryApi.md#userCurrentDeleteSubscription) | **DELETE** /repos/{owner}/{repo}/subscription | Unwatch a repo [**userCurrentPutSubscription**](RepositoryApi.md#userCurrentPutSubscription) | **PUT** /repos/{owner}/{repo}/subscription | Watch a repo @@ -410,6 +422,97 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **deleteRepoSecret** +> deleteRepoSecret(owner, repo, secretname) + +Delete a secret in a repository + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +String secretname = "secretname_example"; // String | name of the secret +try { + apiInstance.deleteRepoSecret(owner, repo, secretname); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#deleteRepoSecret"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **secretname** | **String**| name of the secret | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **generateRepo** > Repository generateRepo(templateOwner, templateRepo, body) @@ -1518,6 +1621,98 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **repoChangeFiles** +> FilesResponse repoChangeFiles(owner, repo, body) + +Modify multiple files in a repository + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +ChangeFilesOptions body = new ChangeFilesOptions(); // ChangeFilesOptions | +try { + FilesResponse result = apiInstance.repoChangeFiles(owner, repo, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoChangeFiles"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**ChangeFilesOptions**](ChangeFilesOptions.md)| | + +### Return type + +[**FilesResponse**](FilesResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **repoCheckCollaborator** > repoCheckCollaborator(owner, repo, collaborator) @@ -2993,6 +3188,95 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDeleteAvatar** +> repoDeleteAvatar(owner, repo) + +Delete avatar + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + apiInstance.repoDeleteAvatar(owner, repo); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteAvatar"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -5684,7 +5968,7 @@ Name | Type | Description | Notes # **repoGetAllCommits** -> List<Commit> repoGetAllCommits(owner, repo, sha, path, stat, page, limit) +> List<Commit> repoGetAllCommits(owner, repo, sha, path, stat, verification, files, page, limit, not) Get a list of all commits from a repository @@ -5746,10 +6030,13 @@ String repo = "repo_example"; // String | name of the repo String sha = "sha_example"; // String | SHA or branch to start listing commits from (usually 'master') String path = "path_example"; // String | filepath of a file/dir Boolean stat = true; // Boolean | include diff stats for every commit (disable for speedup, default 'true') +Boolean verification = true; // Boolean | include verification for every commit (disable for speedup, default 'true') +Boolean files = true; // Boolean | include a list of affected files for every commit (disable for speedup, default 'true') Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results (ignored if used with 'path') +String not = "not_example"; // String | commits that match the given specifier will not be listed. try { - List result = apiInstance.repoGetAllCommits(owner, repo, sha, path, stat, page, limit); + List result = apiInstance.repoGetAllCommits(owner, repo, sha, path, stat, verification, files, page, limit, not); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#repoGetAllCommits"); @@ -5766,8 +6053,11 @@ Name | Type | Description | Notes **sha** | **String**| SHA or branch to start listing commits from (usually 'master') | [optional] **path** | **String**| filepath of a file/dir | [optional] **stat** | **Boolean**| include diff stats for every commit (disable for speedup, default 'true') | [optional] + **verification** | **Boolean**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **Boolean**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] **page** | **Integer**| page number of results to return (1-based) | [optional] **limit** | **Integer**| page size of results (ignored if used with 'path') | [optional] + **not** | **String**| commits that match the given specifier will not be listed. | [optional] ### Return type @@ -6789,6 +7079,96 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoGetIssueConfig** +> IssueConfig repoGetIssueConfig(owner, repo) + +Returns the issue config for a repo + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + IssueConfig result = apiInstance.repoGetIssueConfig(owner, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoGetIssueConfig"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +[**IssueConfig**](IssueConfig.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -7061,6 +7441,96 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoGetLatestRelease** +> Release repoGetLatestRelease(owner, repo) + +Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + Release result = apiInstance.repoGetLatestRelease(owner, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoGetLatestRelease"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +[**Release**](Release.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -7068,7 +7538,7 @@ Name | Type | Description | Notes # **repoGetNote** -> Note repoGetNote(owner, repo, sha) +> Note repoGetNote(owner, repo, sha, verification, files) Get a note corresponding to a single commit from a repository @@ -7128,8 +7598,10 @@ RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo String sha = "sha_example"; // String | a git ref or commit sha +Boolean verification = true; // Boolean | include verification for every commit (disable for speedup, default 'true') +Boolean files = true; // Boolean | include a list of affected files for every commit (disable for speedup, default 'true') try { - Note result = apiInstance.repoGetNote(owner, repo, sha); + Note result = apiInstance.repoGetNote(owner, repo, sha, verification, files); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#repoGetNote"); @@ -7144,6 +7616,8 @@ Name | Type | Description | Notes **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | **sha** | **String**| a git ref or commit sha | + **verification** | **Boolean**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **Boolean**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] ### Return type @@ -7252,7 +7726,7 @@ Name | Type | Description | Notes # **repoGetPullRequestCommits** -> List<Commit> repoGetPullRequestCommits(owner, repo, index, page, limit) +> List<Commit> repoGetPullRequestCommits(owner, repo, index, page, limit, verification, files) Get commits for a pull request @@ -7314,8 +7788,10 @@ String repo = "repo_example"; // String | name of the repo Long index = 789L; // Long | index of the pull request to get Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results +Boolean verification = true; // Boolean | include verification for every commit (disable for speedup, default 'true') +Boolean files = true; // Boolean | include a list of affected files for every commit (disable for speedup, default 'true') try { - List result = apiInstance.repoGetPullRequestCommits(owner, repo, index, page, limit); + List result = apiInstance.repoGetPullRequestCommits(owner, repo, index, page, limit, verification, files); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#repoGetPullRequestCommits"); @@ -7332,6 +7808,8 @@ Name | Type | Description | Notes **index** | **Long**| index of the pull request to get | **page** | **Integer**| page number of results to return (1-based) | [optional] **limit** | **Integer**| page size of results | [optional] + **verification** | **Boolean**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **Boolean**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] ### Return type @@ -8374,7 +8852,7 @@ Name | Type | Description | Notes # **repoGetSingleCommit** -> Commit repoGetSingleCommit(owner, repo, sha) +> Commit repoGetSingleCommit(owner, repo, sha, stat, verification, files) Get a single commit from a repository @@ -8434,8 +8912,11 @@ RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo String sha = "sha_example"; // String | a git ref or commit sha +Boolean stat = true; // Boolean | include diff stats for every commit (disable for speedup, default 'true') +Boolean verification = true; // Boolean | include verification for every commit (disable for speedup, default 'true') +Boolean files = true; // Boolean | include a list of affected files for every commit (disable for speedup, default 'true') try { - Commit result = apiInstance.repoGetSingleCommit(owner, repo, sha); + Commit result = apiInstance.repoGetSingleCommit(owner, repo, sha, stat, verification, files); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#repoGetSingleCommit"); @@ -8450,6 +8931,9 @@ Name | Type | Description | Notes **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | **sha** | **String**| a git ref or commit sha | + **stat** | **Boolean**| include diff stats for every commit (disable for speedup, default 'true') | [optional] + **verification** | **Boolean**| include verification for every commit (disable for speedup, default 'true') | [optional] + **files** | **Boolean**| include a list of affected files for every commit (disable for speedup, default 'true') | [optional] ### Return type @@ -8831,6 +9315,102 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoListActivityFeeds** +> List<Activity> repoListActivityFeeds(owner, repo, date, page, limit) + +List a repository's activity feeds + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +LocalDate date = LocalDate.now(); // LocalDate | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.repoListActivityFeeds(owner, repo, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoListActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **date** | **LocalDate**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -9573,6 +10153,186 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoListPinnedIssues** +> List<Issue> repoListPinnedIssues(owner, repo) + +List a repo's pinned issues + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + List result = apiInstance.repoListPinnedIssues(owner, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoListPinnedIssues"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +[**List<Issue>**](Issue.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoListPinnedPullRequests** +> List<PullRequest> repoListPinnedPullRequests(owner, repo) + +List a repo's pinned pull requests + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + List result = apiInstance.repoListPinnedPullRequests(owner, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoListPinnedPullRequests"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +[**List<PullRequest>**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -10993,6 +11753,96 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoNewPinAllowed** +> NewIssuePinsAllowed repoNewPinAllowed(owner, repo) + +Returns if new Issue Pins are allowed + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + NewIssuePinsAllowed result = apiInstance.repoNewPinAllowed(owner, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoNewPinAllowed"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +[**NewIssuePinsAllowed**](NewIssuePinsAllowed.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -11858,6 +12708,97 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoUpdateAvatar** +> repoUpdateAvatar(owner, repo, body) + +Update avatar + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +UpdateRepoAvatarOption body = new UpdateRepoAvatarOption(); // UpdateRepoAvatarOption | +try { + apiInstance.repoUpdateAvatar(owner, repo, body); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoUpdateAvatar"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**UpdateRepoAvatarOption**](UpdateRepoAvatarOption.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -12136,6 +13077,96 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoValidateIssueConfig** +> IssueConfigValidation repoValidateIssueConfig(owner, repo) + +Returns the validation information for a issue config + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +try { + IssueConfigValidation result = apiInstance.repoValidateIssueConfig(owner, repo); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoValidateIssueConfig"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + +### Return type + +[**IssueConfigValidation**](IssueConfigValidation.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -12233,6 +13264,99 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **updateRepoSecret** +> updateRepoSecret(owner, repo, secretname, body) + +Create or Update a secret value in a repository + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.RepositoryApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +RepositoryApi apiInstance = new RepositoryApi(); +String owner = "owner_example"; // String | owner of the repository +String repo = "repo_example"; // String | name of the repository +String secretname = "secretname_example"; // String | name of the secret +CreateOrUpdateSecretOption body = new CreateOrUpdateSecretOption(); // CreateOrUpdateSecretOption | +try { + apiInstance.updateRepoSecret(owner, repo, secretname, body); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#updateRepoSecret"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repository | + **repo** | **String**| name of the repository | + **secretname** | **String**| name of the secret | + **body** | [**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **userCurrentCheckSubscription** > WatchInfo userCurrentCheckSubscription(owner, repo) diff --git a/docs/Secret.md b/docs/Secret.md new file mode 100644 index 0000000..179d4e4 --- /dev/null +++ b/docs/Secret.md @@ -0,0 +1,11 @@ + +# Secret + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**name** | **String** | the secret's name | [optional] + + + diff --git a/docs/UpdateRepoAvatarOption.md b/docs/UpdateRepoAvatarOption.md new file mode 100644 index 0000000..81fdeb8 --- /dev/null +++ b/docs/UpdateRepoAvatarOption.md @@ -0,0 +1,10 @@ + +# UpdateRepoAvatarOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **String** | image must be base64 encoded | [optional] + + + diff --git a/docs/UpdateUserAvatarOption.md b/docs/UpdateUserAvatarOption.md new file mode 100644 index 0000000..e79ed24 --- /dev/null +++ b/docs/UpdateUserAvatarOption.md @@ -0,0 +1,10 @@ + +# UpdateUserAvatarOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**image** | **String** | image must be base64 encoded | [optional] + + + diff --git a/docs/UserApi.md b/docs/UserApi.md index 352dc11..e6275f4 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -5,11 +5,14 @@ All URIs are relative to *http://localhost/api/v1* Method | HTTP request | Description ------------- | ------------- | ------------- [**createCurrentUserRepo**](UserApi.md#createCurrentUserRepo) | **POST** /user/repos | Create a repository +[**deleteUserSecret**](UserApi.md#deleteUserSecret) | **DELETE** /user/actions/secrets/{secretname} | Delete a secret in a user scope [**getUserSettings**](UserApi.md#getUserSettings) | **GET** /user/settings | Get user settings [**getVerificationToken**](UserApi.md#getVerificationToken) | **GET** /user/gpg_key_token | Get a Token to verify +[**updateUserSecret**](UserApi.md#updateUserSecret) | **PUT** /user/actions/secrets/{secretname} | Create or Update a secret value in a user scope [**updateUserSettings**](UserApi.md#updateUserSettings) | **PATCH** /user/settings | Update user settings [**userAddEmail**](UserApi.md#userAddEmail) | **POST** /user/emails | Add email addresses [**userCheckFollowing**](UserApi.md#userCheckFollowing) | **GET** /users/{username}/following/{target} | Check if one user is following another user +[**userCreateHook**](UserApi.md#userCreateHook) | **POST** /user/hooks | Create a hook [**userCreateOAuth2Application**](UserApi.md#userCreateOAuth2Application) | **POST** /user/applications/oauth2 | creates a new OAuth2 application [**userCreateToken**](UserApi.md#userCreateToken) | **POST** /users/{username}/tokens | Create an access token [**userCurrentCheckFollowing**](UserApi.md#userCurrentCheckFollowing) | **GET** /user/following/{username} | Check whether a user is followed by the authenticated user @@ -33,25 +36,32 @@ Method | HTTP request | Description [**userCurrentPutStar**](UserApi.md#userCurrentPutStar) | **PUT** /user/starred/{owner}/{repo} | Star the given repo [**userCurrentTrackedTimes**](UserApi.md#userCurrentTrackedTimes) | **GET** /user/times | List the current user's tracked times [**userDeleteAccessToken**](UserApi.md#userDeleteAccessToken) | **DELETE** /users/{username}/tokens/{token} | delete an access token +[**userDeleteAvatar**](UserApi.md#userDeleteAvatar) | **DELETE** /user/avatar | Delete Avatar [**userDeleteEmail**](UserApi.md#userDeleteEmail) | **DELETE** /user/emails | Delete email addresses +[**userDeleteHook**](UserApi.md#userDeleteHook) | **DELETE** /user/hooks/{id} | Delete a hook [**userDeleteOAuth2Application**](UserApi.md#userDeleteOAuth2Application) | **DELETE** /user/applications/oauth2/{id} | delete an OAuth2 Application +[**userEditHook**](UserApi.md#userEditHook) | **PATCH** /user/hooks/{id} | Update a hook [**userGet**](UserApi.md#userGet) | **GET** /users/{username} | Get a user [**userGetCurrent**](UserApi.md#userGetCurrent) | **GET** /user | Get the authenticated user [**userGetHeatmapData**](UserApi.md#userGetHeatmapData) | **GET** /users/{username}/heatmap | Get a user's heatmap +[**userGetHook**](UserApi.md#userGetHook) | **GET** /user/hooks/{id} | Get a hook [**userGetOAuth2Application**](UserApi.md#userGetOAuth2Application) | **GET** /user/applications/oauth2/{id} | get an OAuth2 Application [**userGetOauth2Application**](UserApi.md#userGetOauth2Application) | **GET** /user/applications/oauth2 | List the authenticated user's oauth2 applications [**userGetStopWatches**](UserApi.md#userGetStopWatches) | **GET** /user/stopwatches | Get list of all existing stopwatches [**userGetTokens**](UserApi.md#userGetTokens) | **GET** /users/{username}/tokens | List the authenticated user's access tokens +[**userListActivityFeeds**](UserApi.md#userListActivityFeeds) | **GET** /users/{username}/activities/feeds | List a user's activity feeds [**userListEmails**](UserApi.md#userListEmails) | **GET** /user/emails | List the authenticated user's email addresses [**userListFollowers**](UserApi.md#userListFollowers) | **GET** /users/{username}/followers | List the given user's followers [**userListFollowing**](UserApi.md#userListFollowing) | **GET** /users/{username}/following | List the users that the given user is following [**userListGPGKeys**](UserApi.md#userListGPGKeys) | **GET** /users/{username}/gpg_keys | List the given user's GPG keys +[**userListHooks**](UserApi.md#userListHooks) | **GET** /user/hooks | List the authenticated user's webhooks [**userListKeys**](UserApi.md#userListKeys) | **GET** /users/{username}/keys | List the given user's public keys [**userListRepos**](UserApi.md#userListRepos) | **GET** /users/{username}/repos | List the repos owned by the given user [**userListStarred**](UserApi.md#userListStarred) | **GET** /users/{username}/starred | The repos that the given user has starred [**userListSubscriptions**](UserApi.md#userListSubscriptions) | **GET** /users/{username}/subscriptions | List the repositories watched by a user [**userListTeams**](UserApi.md#userListTeams) | **GET** /user/teams | List all the teams a user belongs to [**userSearch**](UserApi.md#userSearch) | **GET** /users/search | Search for users +[**userUpdateAvatar**](UserApi.md#userUpdateAvatar) | **POST** /user/avatar | Update Avatar [**userUpdateOAuth2Application**](UserApi.md#userUpdateOAuth2Application) | **PATCH** /user/applications/oauth2/{id} | update an OAuth2 Application, this includes regenerating the client secret [**userVerifyGPGKey**](UserApi.md#userVerifyGPGKey) | **POST** /user/gpg_key_verify | Verify a GPG key @@ -139,6 +149,93 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **deleteUserSecret** +> deleteUserSecret(secretname) + +Delete a secret in a user scope + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +String secretname = "secretname_example"; // String | name of the secret +try { + apiInstance.deleteUserSecret(secretname); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#deleteUserSecret"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **secretname** | **String**| name of the secret | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json @@ -312,6 +409,95 @@ This endpoint does not need any parameter. - **Content-Type**: application/json, text/plain - **Accept**: text/plain + +# **updateUserSecret** +> updateUserSecret(secretname, body) + +Create or Update a secret value in a user scope + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +String secretname = "secretname_example"; // String | name of the secret +CreateOrUpdateSecretOption body = new CreateOrUpdateSecretOption(); // CreateOrUpdateSecretOption | +try { + apiInstance.updateUserSecret(secretname, body); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#updateUserSecret"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **secretname** | **String**| name of the secret | + **body** | [**CreateOrUpdateSecretOption**](CreateOrUpdateSecretOption.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **updateUserSettings** > List<UserSettings> updateUserSettings(body) @@ -577,6 +763,94 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json, text/html + +# **userCreateHook** +> Hook userCreateHook(body) + +Create a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +CreateHookOption body = new CreateHookOption(); // CreateHookOption | +try { + Hook result = apiInstance.userCreateHook(body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userCreateHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**CreateHookOption**](CreateHookOption.md)| | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **userCreateOAuth2Application** > OAuth2Application userCreateOAuth2Application(body) @@ -667,7 +941,7 @@ Name | Type | Description | Notes # **userCreateToken** -> AccessToken userCreateToken(username, userCreateToken) +> AccessToken userCreateToken(username, body) Create an access token @@ -725,9 +999,9 @@ Token.setApiKey("YOUR API KEY"); UserApi apiInstance = new UserApi(); String username = "username_example"; // String | username of user -CreateAccessTokenOption userCreateToken = new CreateAccessTokenOption(); // CreateAccessTokenOption | +CreateAccessTokenOption body = new CreateAccessTokenOption(); // CreateAccessTokenOption | try { - AccessToken result = apiInstance.userCreateToken(username, userCreateToken); + AccessToken result = apiInstance.userCreateToken(username, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#userCreateToken"); @@ -740,7 +1014,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| username of user | - **userCreateToken** | [**CreateAccessTokenOption**](CreateAccessTokenOption.md)| | [optional] + **body** | [**CreateAccessTokenOption**](CreateAccessTokenOption.md)| | [optional] ### Return type @@ -2619,6 +2893,89 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userDeleteAvatar** +> userDeleteAvatar() + +Delete Avatar + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +try { + apiInstance.userDeleteAvatar(); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userDeleteAvatar"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -2706,6 +3063,93 @@ null (empty response body) [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userDeleteHook** +> userDeleteHook(id) + +Delete a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +Long id = 789L; // Long | id of the hook to delete +try { + apiInstance.userDeleteHook(id); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userDeleteHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the hook to delete | + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -2798,6 +3242,96 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **userEditHook** +> Hook userEditHook(id, body) + +Update a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +Long id = 789L; // Long | id of the hook to update +EditHookOption body = new EditHookOption(); // EditHookOption | +try { + Hook result = apiInstance.userEditHook(id, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userEditHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the hook to update | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **userGet** > User userGet(username) @@ -3053,6 +3587,94 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userGetHook** +> Hook userGetHook(id) + +Get a hook + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +Long id = 789L; // Long | id of the hook to get +try { + Hook result = apiInstance.userGetHook(id); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userGetHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the hook to get | + +### Return type + +[**Hook**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3413,6 +4035,102 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userListActivityFeeds** +> List<Activity> userListActivityFeeds(username, onlyPerformedBy, date, page, limit) + +List a user's activity feeds + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +String username = "username_example"; // String | username of user +Boolean onlyPerformedBy = true; // Boolean | if true, only show actions performed by the requested user +LocalDate date = LocalDate.now(); // LocalDate | the date of the activities to be found +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.userListActivityFeeds(username, onlyPerformedBy, date, page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userListActivityFeeds"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **username** | **String**| username of user | + **onlyPerformedBy** | **Boolean**| if true, only show actions performed by the requested user | [optional] + **date** | **LocalDate**| the date of the activities to be found | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Activity>**](Activity.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3773,6 +4491,96 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userListHooks** +> List<Hook> userListHooks(page, limit) + +List the authenticated user's webhooks + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +Integer page = 56; // Integer | page number of results to return (1-based) +Integer limit = 56; // Integer | page size of results +try { + List result = apiInstance.userListHooks(page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userListHooks"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results | [optional] + +### Return type + +[**List<Hook>**](Hook.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -4327,6 +5135,93 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userUpdateAvatar** +> userUpdateAvatar(body) + +Update Avatar + +### Example +```java +// Import classes: +//import io.gitea.ApiClient; +//import io.gitea.ApiException; +//import io.gitea.Configuration; +//import io.gitea.auth.*; +//import io.gitea.api.UserApi; + +ApiClient defaultClient = Configuration.getDefaultApiClient(); + +// Configure API key authorization: AccessToken +ApiKeyAuth AccessToken = (ApiKeyAuth) defaultClient.getAuthentication("AccessToken"); +AccessToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AccessToken.setApiKeyPrefix("Token"); + +// Configure API key authorization: AuthorizationHeaderToken +ApiKeyAuth AuthorizationHeaderToken = (ApiKeyAuth) defaultClient.getAuthentication("AuthorizationHeaderToken"); +AuthorizationHeaderToken.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//AuthorizationHeaderToken.setApiKeyPrefix("Token"); + +// Configure HTTP basic authorization: BasicAuth +HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth"); +BasicAuth.setUsername("YOUR USERNAME"); +BasicAuth.setPassword("YOUR PASSWORD"); + +// Configure API key authorization: SudoHeader +ApiKeyAuth SudoHeader = (ApiKeyAuth) defaultClient.getAuthentication("SudoHeader"); +SudoHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: SudoParam +ApiKeyAuth SudoParam = (ApiKeyAuth) defaultClient.getAuthentication("SudoParam"); +SudoParam.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//SudoParam.setApiKeyPrefix("Token"); + +// Configure API key authorization: TOTPHeader +ApiKeyAuth TOTPHeader = (ApiKeyAuth) defaultClient.getAuthentication("TOTPHeader"); +TOTPHeader.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//TOTPHeader.setApiKeyPrefix("Token"); + +// Configure API key authorization: Token +ApiKeyAuth Token = (ApiKeyAuth) defaultClient.getAuthentication("Token"); +Token.setApiKey("YOUR API KEY"); +// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) +//Token.setApiKeyPrefix("Token"); + +UserApi apiInstance = new UserApi(); +UpdateUserAvatarOption body = new UpdateUserAvatarOption(); // UpdateUserAvatarOption | +try { + apiInstance.userUpdateAvatar(body); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userUpdateAvatar"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **body** | [**UpdateUserAvatarOption**](UpdateUserAvatarOption.md)| | [optional] + +### Return type + +null (empty response body) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [TOTPHeader](../README.md#TOTPHeader), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain diff --git a/pom.xml b/pom.xml index f413417..22b4e74 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ java-gitea-api jar java-gitea-api - 1.19.0-SNAPSHOT + 1.21.1 https://github.com/zeripath/java-gitea-api Swagger Java Client for Gitea @@ -221,17 +221,17 @@ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://oss.sonatype.org/ - true - - + + + + + + + + + + + @@ -332,16 +332,16 @@ ${javax-annotation.version} - - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ - - + + + + + + + + + + 1.8 ${java.version} diff --git a/src/main/java/io/gitea/api/ActivitypubApi.java b/src/main/java/io/gitea/api/ActivitypubApi.java index c43b69f..88183a2 100644 --- a/src/main/java/io/gitea/api/ActivitypubApi.java +++ b/src/main/java/io/gitea/api/ActivitypubApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -56,18 +56,18 @@ public class ActivitypubApi { /** * Build call for activitypubPerson - * @param username username of the user (required) + * @param userId user ID of the user (required) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call activitypubPersonCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call activitypubPersonCall(Integer userId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/activitypub/user/{username}" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/activitypub/user-id/{user-id}" + .replaceAll("\\{" + "user-id" + "\\}", apiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -105,15 +105,15 @@ public class ActivitypubApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call activitypubPersonValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call activitypubPersonValidateBeforeCall(Integer userId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling activitypubPerson(Async)"); + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling activitypubPerson(Async)"); } - com.squareup.okhttp.Call call = activitypubPersonCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = activitypubPersonCall(userId, progressListener, progressRequestListener); return call; } @@ -121,24 +121,24 @@ public class ActivitypubApi { /** * Returns the Person actor for a user * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @return ActivityPub * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ActivityPub activitypubPerson(String username) throws ApiException { - ApiResponse resp = activitypubPersonWithHttpInfo(username); + public ActivityPub activitypubPerson(Integer userId) throws ApiException { + ApiResponse resp = activitypubPersonWithHttpInfo(userId); return resp.getData(); } /** * Returns the Person actor for a user * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @return ApiResponse<ActivityPub> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse activitypubPersonWithHttpInfo(String username) throws ApiException { - com.squareup.okhttp.Call call = activitypubPersonValidateBeforeCall(username, null, null); + public ApiResponse activitypubPersonWithHttpInfo(Integer userId) throws ApiException { + com.squareup.okhttp.Call call = activitypubPersonValidateBeforeCall(userId, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -146,12 +146,12 @@ public class ActivitypubApi { /** * Returns the Person actor for a user (asynchronously) * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call activitypubPersonAsync(String username, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call activitypubPersonAsync(Integer userId, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -172,25 +172,25 @@ public class ActivitypubApi { }; } - com.squareup.okhttp.Call call = activitypubPersonValidateBeforeCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = activitypubPersonValidateBeforeCall(userId, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** * Build call for activitypubPersonInbox - * @param username username of the user (required) + * @param userId user ID of the user (required) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call activitypubPersonInboxCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call activitypubPersonInboxCall(Integer userId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/activitypub/user/{username}/inbox" - .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + String localVarPath = "/activitypub/user-id/{user-id}/inbox" + .replaceAll("\\{" + "user-id" + "\\}", apiClient.escapeString(userId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -228,15 +228,15 @@ public class ActivitypubApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call activitypubPersonInboxValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call activitypubPersonInboxValidateBeforeCall(Integer userId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - // verify the required parameter 'username' is set - if (username == null) { - throw new ApiException("Missing the required parameter 'username' when calling activitypubPersonInbox(Async)"); + // verify the required parameter 'userId' is set + if (userId == null) { + throw new ApiException("Missing the required parameter 'userId' when calling activitypubPersonInbox(Async)"); } - com.squareup.okhttp.Call call = activitypubPersonInboxCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = activitypubPersonInboxCall(userId, progressListener, progressRequestListener); return call; } @@ -244,34 +244,34 @@ public class ActivitypubApi { /** * Send to the inbox * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void activitypubPersonInbox(String username) throws ApiException { - activitypubPersonInboxWithHttpInfo(username); + public void activitypubPersonInbox(Integer userId) throws ApiException { + activitypubPersonInboxWithHttpInfo(userId); } /** * Send to the inbox * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse activitypubPersonInboxWithHttpInfo(String username) throws ApiException { - com.squareup.okhttp.Call call = activitypubPersonInboxValidateBeforeCall(username, null, null); + public ApiResponse activitypubPersonInboxWithHttpInfo(Integer userId) throws ApiException { + com.squareup.okhttp.Call call = activitypubPersonInboxValidateBeforeCall(userId, null, null); return apiClient.execute(call); } /** * Send to the inbox (asynchronously) * - * @param username username of the user (required) + * @param userId user ID of the user (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call activitypubPersonInboxAsync(String username, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call activitypubPersonInboxAsync(Integer userId, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -292,7 +292,7 @@ public class ActivitypubApi { }; } - com.squareup.okhttp.Call call = activitypubPersonInboxValidateBeforeCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = activitypubPersonInboxValidateBeforeCall(userId, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } diff --git a/src/main/java/io/gitea/api/AdminApi.java b/src/main/java/io/gitea/api/AdminApi.java index 6247e40..78fb7c7 100644 --- a/src/main/java/io/gitea/api/AdminApi.java +++ b/src/main/java/io/gitea/api/AdminApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,14 +27,19 @@ import com.google.gson.reflect.TypeToken; import java.io.IOException; +import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; import io.gitea.model.CreateOrgOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.CreateUserOption; import io.gitea.model.Cron; +import io.gitea.model.EditHookOption; import io.gitea.model.EditUserOption; +import io.gitea.model.Email; +import io.gitea.model.Hook; import io.gitea.model.Organization; import io.gitea.model.PublicKey; +import io.gitea.model.RenameUserOption; import io.gitea.model.Repository; import io.gitea.model.User; @@ -192,6 +197,128 @@ public class AdminApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for adminCreateHook + * @param body (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminCreateHookCall(CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/admin/hooks"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminCreateHookValidateBeforeCall(CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling adminCreateHook(Async)"); + } + + + com.squareup.okhttp.Call call = adminCreateHookCall(body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a hook + * + * @param body (required) + * @return Hook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Hook adminCreateHook(CreateHookOption body) throws ApiException { + ApiResponse resp = adminCreateHookWithHttpInfo(body); + return resp.getData(); + } + + /** + * Create a hook + * + * @param body (required) + * @return ApiResponse<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse adminCreateHookWithHttpInfo(CreateHookOption body) throws ApiException { + com.squareup.okhttp.Call call = adminCreateHookValidateBeforeCall(body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a hook (asynchronously) + * + * @param body (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminCreateHookAsync(CreateHookOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminCreateHookValidateBeforeCall(body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for adminCreateOrg * @param username username of the user that will own the created organization (required) @@ -944,6 +1071,125 @@ public class AdminApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for adminDeleteHook + * @param id id of the hook to delete (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminDeleteHookCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/hooks/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminDeleteHookValidateBeforeCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling adminDeleteHook(Async)"); + } + + + com.squareup.okhttp.Call call = adminDeleteHookCall(id, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a hook + * + * @param id id of the hook to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void adminDeleteHook(Long id) throws ApiException { + adminDeleteHookWithHttpInfo(id); + } + + /** + * Delete a hook + * + * @param id id of the hook to delete (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse adminDeleteHookWithHttpInfo(Long id) throws ApiException { + com.squareup.okhttp.Call call = adminDeleteHookValidateBeforeCall(id, null, null); + return apiClient.execute(call); + } + + /** + * Delete a hook (asynchronously) + * + * @param id id of the hook to delete (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminDeleteHookAsync(Long id, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminDeleteHookValidateBeforeCall(id, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for adminDeleteUnadoptedRepository * @param owner owner of the repo (required) @@ -1076,12 +1322,13 @@ public class AdminApi { /** * Build call for adminDeleteUser * @param username username of user to delete (required) + * @param purge purge the user from the system completely (optional) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call adminDeleteUserCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call adminDeleteUserCall(String username, Boolean purge, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -1090,6 +1337,8 @@ public class AdminApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (purge != null) + localVarQueryParams.addAll(apiClient.parameterToPair("purge", purge)); Map localVarHeaderParams = new HashMap(); @@ -1124,7 +1373,7 @@ public class AdminApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call adminDeleteUserValidateBeforeCall(String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call adminDeleteUserValidateBeforeCall(String username, Boolean purge, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -1132,7 +1381,7 @@ public class AdminApi { } - com.squareup.okhttp.Call call = adminDeleteUserCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = adminDeleteUserCall(username, purge, progressListener, progressRequestListener); return call; } @@ -1141,21 +1390,23 @@ public class AdminApi { * Delete a user * * @param username username of user to delete (required) + * @param purge purge the user from the system completely (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void adminDeleteUser(String username) throws ApiException { - adminDeleteUserWithHttpInfo(username); + public void adminDeleteUser(String username, Boolean purge) throws ApiException { + adminDeleteUserWithHttpInfo(username, purge); } /** * Delete a user * * @param username username of user to delete (required) + * @param purge purge the user from the system completely (optional) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse adminDeleteUserWithHttpInfo(String username) throws ApiException { - com.squareup.okhttp.Call call = adminDeleteUserValidateBeforeCall(username, null, null); + public ApiResponse adminDeleteUserWithHttpInfo(String username, Boolean purge) throws ApiException { + com.squareup.okhttp.Call call = adminDeleteUserValidateBeforeCall(username, purge, null, null); return apiClient.execute(call); } @@ -1163,11 +1414,12 @@ public class AdminApi { * Delete a user (asynchronously) * * @param username username of user to delete (required) + * @param purge purge the user from the system completely (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call adminDeleteUserAsync(String username, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call adminDeleteUserAsync(String username, Boolean purge, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1188,7 +1440,7 @@ public class AdminApi { }; } - com.squareup.okhttp.Call call = adminDeleteUserValidateBeforeCall(username, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = adminDeleteUserValidateBeforeCall(username, purge, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } @@ -1321,6 +1573,133 @@ public class AdminApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for adminEditHook + * @param id id of the hook to update (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminEditHookCall(Long id, EditHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/admin/hooks/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminEditHookValidateBeforeCall(Long id, EditHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling adminEditHook(Async)"); + } + + + com.squareup.okhttp.Call call = adminEditHookCall(id, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a hook + * + * @param id id of the hook to update (required) + * @param body (optional) + * @return Hook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Hook adminEditHook(Long id, EditHookOption body) throws ApiException { + ApiResponse resp = adminEditHookWithHttpInfo(id, body); + return resp.getData(); + } + + /** + * Update a hook + * + * @param id id of the hook to update (required) + * @param body (optional) + * @return ApiResponse<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse adminEditHookWithHttpInfo(Long id, EditHookOption body) throws ApiException { + com.squareup.okhttp.Call call = adminEditHookValidateBeforeCall(id, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Update a hook (asynchronously) + * + * @param id id of the hook to update (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminEditHookAsync(Long id, EditHookOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminEditHookValidateBeforeCall(id, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for adminEditUser * @param username username of user to edit (required) @@ -1448,6 +1827,131 @@ public class AdminApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for adminGetAllEmails + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminGetAllEmailsCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/emails"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminGetAllEmailsValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = adminGetAllEmailsCall(page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List all emails + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Email> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List adminGetAllEmails(Integer page, Integer limit) throws ApiException { + ApiResponse> resp = adminGetAllEmailsWithHttpInfo(page, limit); + return resp.getData(); + } + + /** + * List all emails + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Email>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> adminGetAllEmailsWithHttpInfo(Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = adminGetAllEmailsValidateBeforeCall(page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List all emails (asynchronously) + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminGetAllEmailsAsync(Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminGetAllEmailsValidateBeforeCall(page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for adminGetAllOrgs * @param page page number of results to return (1-based) (optional) @@ -1574,7 +2078,130 @@ public class AdminApi { return call; } /** - * Build call for adminGetAllUsers + * Build call for adminGetHook + * @param id id of the hook to get (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminGetHookCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/hooks/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminGetHookValidateBeforeCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling adminGetHook(Async)"); + } + + + com.squareup.okhttp.Call call = adminGetHookCall(id, progressListener, progressRequestListener); + return call; + + } + + /** + * Get a hook + * + * @param id id of the hook to get (required) + * @return Hook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Hook adminGetHook(Long id) throws ApiException { + ApiResponse resp = adminGetHookWithHttpInfo(id); + return resp.getData(); + } + + /** + * Get a hook + * + * @param id id of the hook to get (required) + * @return ApiResponse<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse adminGetHookWithHttpInfo(Long id) throws ApiException { + com.squareup.okhttp.Call call = adminGetHookValidateBeforeCall(id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get a hook (asynchronously) + * + * @param id id of the hook to get (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminGetHookAsync(Long id, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminGetHookValidateBeforeCall(id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for adminListHooks * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) * @param progressListener Progress listener @@ -1582,11 +2209,11 @@ public class AdminApi { * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call adminGetAllUsersCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call adminListHooksCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/admin/users"; + String localVarPath = "/admin/hooks"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1628,43 +2255,43 @@ public class AdminApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call adminGetAllUsersValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call adminListHooksValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - com.squareup.okhttp.Call call = adminGetAllUsersCall(page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = adminListHooksCall(page, limit, progressListener, progressRequestListener); return call; } /** - * List all users + * List system's webhooks * * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) - * @return List<User> + * @return List<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List adminGetAllUsers(Integer page, Integer limit) throws ApiException { - ApiResponse> resp = adminGetAllUsersWithHttpInfo(page, limit); + public List adminListHooks(Integer page, Integer limit) throws ApiException { + ApiResponse> resp = adminListHooksWithHttpInfo(page, limit); return resp.getData(); } /** - * List all users + * List system's webhooks * * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) - * @return ApiResponse<List<User>> + * @return ApiResponse<List<Hook>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> adminGetAllUsersWithHttpInfo(Integer page, Integer limit) throws ApiException { - com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(page, limit, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> adminListHooksWithHttpInfo(Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = adminListHooksValidateBeforeCall(page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * List all users (asynchronously) + * List system's webhooks (asynchronously) * * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) @@ -1672,7 +2299,7 @@ public class AdminApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call adminGetAllUsersAsync(Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call adminListHooksAsync(Integer page, Integer limit, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1693,7 +2320,403 @@ public class AdminApi { }; } - com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = adminListHooksValidateBeforeCall(page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for adminRenameUser + * @param username existing username of user (required) + * @param body (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminRenameUserCall(String username, RenameUserOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/admin/users/{username}/rename" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminRenameUserValidateBeforeCall(String username, RenameUserOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling adminRenameUser(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling adminRenameUser(Async)"); + } + + + com.squareup.okhttp.Call call = adminRenameUserCall(username, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Rename a user + * + * @param username existing username of user (required) + * @param body (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void adminRenameUser(String username, RenameUserOption body) throws ApiException { + adminRenameUserWithHttpInfo(username, body); + } + + /** + * Rename a user + * + * @param username existing username of user (required) + * @param body (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse adminRenameUserWithHttpInfo(String username, RenameUserOption body) throws ApiException { + com.squareup.okhttp.Call call = adminRenameUserValidateBeforeCall(username, body, null, null); + return apiClient.execute(call); + } + + /** + * Rename a user (asynchronously) + * + * @param username existing username of user (required) + * @param body (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminRenameUserAsync(String username, RenameUserOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminRenameUserValidateBeforeCall(username, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for adminSearchEmails + * @param q keyword (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminSearchEmailsCall(String q, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/emails/search"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (q != null) + localVarQueryParams.addAll(apiClient.parameterToPair("q", q)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminSearchEmailsValidateBeforeCall(String q, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = adminSearchEmailsCall(q, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * Search all emails + * + * @param q keyword (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Email> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List adminSearchEmails(String q, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = adminSearchEmailsWithHttpInfo(q, page, limit); + return resp.getData(); + } + + /** + * Search all emails + * + * @param q keyword (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Email>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> adminSearchEmailsWithHttpInfo(String q, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = adminSearchEmailsValidateBeforeCall(q, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Search all emails (asynchronously) + * + * @param q keyword (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminSearchEmailsAsync(String q, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminSearchEmailsValidateBeforeCall(q, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for adminSearchUsers + * @param sourceId ID of the user's login source to search for (optional) + * @param loginName user's login name to search for (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call adminSearchUsersCall(Long sourceId, String loginName, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/admin/users"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (sourceId != null) + localVarQueryParams.addAll(apiClient.parameterToPair("source_id", sourceId)); + if (loginName != null) + localVarQueryParams.addAll(apiClient.parameterToPair("login_name", loginName)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminSearchUsersValidateBeforeCall(Long sourceId, String loginName, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = adminSearchUsersCall(sourceId, loginName, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * Search users according filter conditions + * + * @param sourceId ID of the user's login source to search for (optional) + * @param loginName user's login name to search for (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List adminSearchUsers(Long sourceId, String loginName, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = adminSearchUsersWithHttpInfo(sourceId, loginName, page, limit); + return resp.getData(); + } + + /** + * Search users according filter conditions + * + * @param sourceId ID of the user's login source to search for (optional) + * @param loginName user's login name to search for (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<User>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> adminSearchUsersWithHttpInfo(Long sourceId, String loginName, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = adminSearchUsersValidateBeforeCall(sourceId, loginName, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Search users according filter conditions (asynchronously) + * + * @param sourceId ID of the user's login source to search for (optional) + * @param loginName user's login name to search for (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call adminSearchUsersAsync(Long sourceId, String loginName, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = adminSearchUsersValidateBeforeCall(sourceId, loginName, page, limit, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; diff --git a/src/main/java/io/gitea/api/IssueApi.java b/src/main/java/io/gitea/api/IssueApi.java index 2a41a45..ce50f26 100644 --- a/src/main/java/io/gitea/api/IssueApi.java +++ b/src/main/java/io/gitea/api/IssueApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -28,20 +28,24 @@ import java.io.IOException; import io.gitea.model.AddTimeOption; +import io.gitea.model.Attachment; import io.gitea.model.Comment; import io.gitea.model.CreateIssueCommentOption; import io.gitea.model.CreateIssueOption; import io.gitea.model.CreateLabelOption; import io.gitea.model.CreateMilestoneOption; +import io.gitea.model.EditAttachmentOptions; import io.gitea.model.EditDeadlineOption; import io.gitea.model.EditIssueCommentOption; import io.gitea.model.EditIssueOption; import io.gitea.model.EditLabelOption; import io.gitea.model.EditMilestoneOption; import io.gitea.model.EditReactionOption; +import java.io.File; import io.gitea.model.Issue; import io.gitea.model.IssueDeadline; import io.gitea.model.IssueLabelsOption; +import io.gitea.model.IssueMeta; import io.gitea.model.Label; import io.gitea.model.Milestone; import org.threeten.bp.OffsetDateTime; @@ -1085,6 +1089,620 @@ public class IssueApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for issueCreateIssueAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueAttachmentCall(String owner, String repo, Long index, File attachment, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/assets" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (name != null) + localVarQueryParams.addAll(apiClient.parameterToPair("name", name)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (attachment != null) + localVarFormParams.put("attachment", attachment); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueCreateIssueAttachmentValidateBeforeCall(String owner, String repo, Long index, File attachment, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueCreateIssueAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueCreateIssueAttachment(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueCreateIssueAttachment(Async)"); + } + + // verify the required parameter 'attachment' is set + if (attachment == null) { + throw new ApiException("Missing the required parameter 'attachment' when calling issueCreateIssueAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueCreateIssueAttachmentCall(owner, repo, index, attachment, name, progressListener, progressRequestListener); + return call; + + } + + /** + * Create an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @return Attachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Attachment issueCreateIssueAttachment(String owner, String repo, Long index, File attachment, String name) throws ApiException { + ApiResponse resp = issueCreateIssueAttachmentWithHttpInfo(owner, repo, index, attachment, name); + return resp.getData(); + } + + /** + * Create an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @return ApiResponse<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueCreateIssueAttachmentWithHttpInfo(String owner, String repo, Long index, File attachment, String name) throws ApiException { + com.squareup.okhttp.Call call = issueCreateIssueAttachmentValidateBeforeCall(owner, repo, index, attachment, name, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create an issue attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueAttachmentAsync(String owner, String repo, Long index, File attachment, String name, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueCreateIssueAttachmentValidateBeforeCall(owner, repo, index, attachment, name, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueCreateIssueBlocking + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueBlockingCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/blocks" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueCreateIssueBlockingValidateBeforeCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueCreateIssueBlocking(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueCreateIssueBlocking(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueCreateIssueBlocking(Async)"); + } + + + com.squareup.okhttp.Call call = issueCreateIssueBlockingCall(owner, repo, index, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Block the issue given in the body by the issue in path + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return Issue + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Issue issueCreateIssueBlocking(String owner, String repo, String index, IssueMeta body) throws ApiException { + ApiResponse resp = issueCreateIssueBlockingWithHttpInfo(owner, repo, index, body); + return resp.getData(); + } + + /** + * Block the issue given in the body by the issue in path + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return ApiResponse<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueCreateIssueBlockingWithHttpInfo(String owner, String repo, String index, IssueMeta body) throws ApiException { + com.squareup.okhttp.Call call = issueCreateIssueBlockingValidateBeforeCall(owner, repo, index, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Block the issue given in the body by the issue in path (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueBlockingAsync(String owner, String repo, String index, IssueMeta body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueCreateIssueBlockingValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueCreateIssueCommentAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueCommentAttachmentCall(String owner, String repo, Long id, File attachment, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/comments/{id}/assets" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (name != null) + localVarQueryParams.addAll(apiClient.parameterToPair("name", name)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + if (attachment != null) + localVarFormParams.put("attachment", attachment); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "multipart/form-data" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueCreateIssueCommentAttachmentValidateBeforeCall(String owner, String repo, Long id, File attachment, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueCreateIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueCreateIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling issueCreateIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'attachment' is set + if (attachment == null) { + throw new ApiException("Missing the required parameter 'attachment' when calling issueCreateIssueCommentAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueCreateIssueCommentAttachmentCall(owner, repo, id, attachment, name, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @return Attachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Attachment issueCreateIssueCommentAttachment(String owner, String repo, Long id, File attachment, String name) throws ApiException { + ApiResponse resp = issueCreateIssueCommentAttachmentWithHttpInfo(owner, repo, id, attachment, name); + return resp.getData(); + } + + /** + * Create a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @return ApiResponse<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueCreateIssueCommentAttachmentWithHttpInfo(String owner, String repo, Long id, File attachment, String name) throws ApiException { + com.squareup.okhttp.Call call = issueCreateIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachment, name, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a comment attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachment attachment to upload (required) + * @param name name of the attachment (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueCommentAttachmentAsync(String owner, String repo, Long id, File attachment, String name, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueCreateIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachment, name, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueCreateIssueDependencies + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueDependenciesCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/dependencies" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueCreateIssueDependenciesValidateBeforeCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueCreateIssueDependencies(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueCreateIssueDependencies(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueCreateIssueDependencies(Async)"); + } + + + com.squareup.okhttp.Call call = issueCreateIssueDependenciesCall(owner, repo, index, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Make the issue in the url depend on the issue in the form. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return Issue + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Issue issueCreateIssueDependencies(String owner, String repo, String index, IssueMeta body) throws ApiException { + ApiResponse resp = issueCreateIssueDependenciesWithHttpInfo(owner, repo, index, body); + return resp.getData(); + } + + /** + * Make the issue in the url depend on the issue in the form. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return ApiResponse<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueCreateIssueDependenciesWithHttpInfo(String owner, String repo, String index, IssueMeta body) throws ApiException { + com.squareup.okhttp.Call call = issueCreateIssueDependenciesValidateBeforeCall(owner, repo, index, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Make the issue in the url depend on the issue in the form. (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueCreateIssueDependenciesAsync(String owner, String repo, String index, IssueMeta body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueCreateIssueDependenciesValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for issueCreateLabel * @param owner owner of the repo (required) @@ -1938,6 +2556,304 @@ public class IssueApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for issueDeleteIssueAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to delete (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueDeleteIssueAttachmentCall(String owner, String repo, Long index, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueDeleteIssueAttachmentValidateBeforeCall(String owner, String repo, Long index, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueDeleteIssueAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueDeleteIssueAttachment(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueDeleteIssueAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling issueDeleteIssueAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueDeleteIssueAttachmentCall(owner, repo, index, attachmentId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void issueDeleteIssueAttachment(String owner, String repo, Long index, Long attachmentId) throws ApiException { + issueDeleteIssueAttachmentWithHttpInfo(owner, repo, index, attachmentId); + } + + /** + * Delete an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to delete (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueDeleteIssueAttachmentWithHttpInfo(String owner, String repo, Long index, Long attachmentId) throws ApiException { + com.squareup.okhttp.Call call = issueDeleteIssueAttachmentValidateBeforeCall(owner, repo, index, attachmentId, null, null); + return apiClient.execute(call); + } + + /** + * Delete an issue attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to delete (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueDeleteIssueAttachmentAsync(String owner, String repo, Long index, Long attachmentId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueDeleteIssueAttachmentValidateBeforeCall(owner, repo, index, attachmentId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for issueDeleteIssueCommentAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to delete (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueDeleteIssueCommentAttachmentCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueDeleteIssueCommentAttachmentValidateBeforeCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueDeleteIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueDeleteIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling issueDeleteIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling issueDeleteIssueCommentAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueDeleteIssueCommentAttachmentCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void issueDeleteIssueCommentAttachment(String owner, String repo, Long id, Long attachmentId) throws ApiException { + issueDeleteIssueCommentAttachmentWithHttpInfo(owner, repo, id, attachmentId); + } + + /** + * Delete a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to delete (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueDeleteIssueCommentAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId) throws ApiException { + com.squareup.okhttp.Call call = issueDeleteIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachmentId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a comment attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to delete (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueDeleteIssueCommentAttachmentAsync(String owner, String repo, Long id, Long attachmentId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueDeleteIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for issueDeleteIssueReaction * @param owner owner of the repo (required) @@ -3256,6 +4172,320 @@ public class IssueApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for issueEditIssueAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueEditIssueAttachmentCall(String owner, String repo, Long index, Long attachmentId, EditAttachmentOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueEditIssueAttachmentValidateBeforeCall(String owner, String repo, Long index, Long attachmentId, EditAttachmentOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueEditIssueAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueEditIssueAttachment(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueEditIssueAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling issueEditIssueAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueEditIssueAttachmentCall(owner, repo, index, attachmentId, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Edit an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @return Attachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Attachment issueEditIssueAttachment(String owner, String repo, Long index, Long attachmentId, EditAttachmentOptions body) throws ApiException { + ApiResponse resp = issueEditIssueAttachmentWithHttpInfo(owner, repo, index, attachmentId, body); + return resp.getData(); + } + + /** + * Edit an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @return ApiResponse<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueEditIssueAttachmentWithHttpInfo(String owner, String repo, Long index, Long attachmentId, EditAttachmentOptions body) throws ApiException { + com.squareup.okhttp.Call call = issueEditIssueAttachmentValidateBeforeCall(owner, repo, index, attachmentId, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Edit an issue attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueEditIssueAttachmentAsync(String owner, String repo, Long index, Long attachmentId, EditAttachmentOptions body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueEditIssueAttachmentValidateBeforeCall(owner, repo, index, attachmentId, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueEditIssueCommentAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueEditIssueCommentAttachmentCall(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueEditIssueCommentAttachmentValidateBeforeCall(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueEditIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueEditIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling issueEditIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling issueEditIssueCommentAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueEditIssueCommentAttachmentCall(owner, repo, id, attachmentId, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Edit a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @return Attachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Attachment issueEditIssueCommentAttachment(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body) throws ApiException { + ApiResponse resp = issueEditIssueCommentAttachmentWithHttpInfo(owner, repo, id, attachmentId, body); + return resp.getData(); + } + + /** + * Edit a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @return ApiResponse<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueEditIssueCommentAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body) throws ApiException { + com.squareup.okhttp.Call call = issueEditIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachmentId, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Edit a comment attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to edit (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueEditIssueCommentAttachmentAsync(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueEditIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachmentId, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for issueEditIssueDeadline * @param owner owner of the repo (required) @@ -4448,6 +5678,312 @@ public class IssueApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for issueGetIssueAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to get (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueGetIssueAttachmentCall(String owner, String repo, Long index, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/assets/{attachment_id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueGetIssueAttachmentValidateBeforeCall(String owner, String repo, Long index, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueGetIssueAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueGetIssueAttachment(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueGetIssueAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling issueGetIssueAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueGetIssueAttachmentCall(owner, repo, index, attachmentId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to get (required) + * @return Attachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Attachment issueGetIssueAttachment(String owner, String repo, Long index, Long attachmentId) throws ApiException { + ApiResponse resp = issueGetIssueAttachmentWithHttpInfo(owner, repo, index, attachmentId); + return resp.getData(); + } + + /** + * Get an issue attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to get (required) + * @return ApiResponse<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueGetIssueAttachmentWithHttpInfo(String owner, String repo, Long index, Long attachmentId) throws ApiException { + com.squareup.okhttp.Call call = issueGetIssueAttachmentValidateBeforeCall(owner, repo, index, attachmentId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get an issue attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param attachmentId id of the attachment to get (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueGetIssueAttachmentAsync(String owner, String repo, Long index, Long attachmentId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueGetIssueAttachmentValidateBeforeCall(owner, repo, index, attachmentId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueGetIssueCommentAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to get (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueGetIssueCommentAttachmentCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/comments/{id}/assets/{attachment_id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueGetIssueCommentAttachmentValidateBeforeCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueGetIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueGetIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling issueGetIssueCommentAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling issueGetIssueCommentAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = issueGetIssueCommentAttachmentCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + return call; + + } + + /** + * Get a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to get (required) + * @return Attachment + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Attachment issueGetIssueCommentAttachment(String owner, String repo, Long id, Long attachmentId) throws ApiException { + ApiResponse resp = issueGetIssueCommentAttachmentWithHttpInfo(owner, repo, id, attachmentId); + return resp.getData(); + } + + /** + * Get a comment attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to get (required) + * @return ApiResponse<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueGetIssueCommentAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId) throws ApiException { + com.squareup.okhttp.Call call = issueGetIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachmentId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get a comment attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param attachmentId id of the attachment to get (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueGetIssueCommentAttachmentAsync(String owner, String repo, Long id, Long attachmentId, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueGetIssueCommentAttachmentValidateBeforeCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for issueGetIssueReactions * @param owner owner of the repo (required) @@ -5346,6 +6882,602 @@ public class IssueApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for issueListBlocks + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueListBlocksCall(String owner, String repo, String index, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/blocks" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueListBlocksValidateBeforeCall(String owner, String repo, String index, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueListBlocks(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueListBlocks(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueListBlocks(Async)"); + } + + + com.squareup.okhttp.Call call = issueListBlocksCall(owner, repo, index, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List issues that are blocked by this issue + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List issueListBlocks(String owner, String repo, String index, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = issueListBlocksWithHttpInfo(owner, repo, index, page, limit); + return resp.getData(); + } + + /** + * List issues that are blocked by this issue + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Issue>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> issueListBlocksWithHttpInfo(String owner, String repo, String index, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = issueListBlocksValidateBeforeCall(owner, repo, index, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List issues that are blocked by this issue (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueListBlocksAsync(String owner, String repo, String index, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueListBlocksValidateBeforeCall(owner, repo, index, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueListIssueAttachments + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueListIssueAttachmentsCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/assets" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueListIssueAttachmentsValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueListIssueAttachments(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueListIssueAttachments(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueListIssueAttachments(Async)"); + } + + + com.squareup.okhttp.Call call = issueListIssueAttachmentsCall(owner, repo, index, progressListener, progressRequestListener); + return call; + + } + + /** + * List issue's attachments + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @return List<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List issueListIssueAttachments(String owner, String repo, Long index) throws ApiException { + ApiResponse> resp = issueListIssueAttachmentsWithHttpInfo(owner, repo, index); + return resp.getData(); + } + + /** + * List issue's attachments + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @return ApiResponse<List<Attachment>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> issueListIssueAttachmentsWithHttpInfo(String owner, String repo, Long index) throws ApiException { + com.squareup.okhttp.Call call = issueListIssueAttachmentsValidateBeforeCall(owner, repo, index, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List issue's attachments (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueListIssueAttachmentsAsync(String owner, String repo, Long index, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueListIssueAttachmentsValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueListIssueCommentAttachments + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueListIssueCommentAttachmentsCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/comments/{id}/assets" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueListIssueCommentAttachmentsValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueListIssueCommentAttachments(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueListIssueCommentAttachments(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling issueListIssueCommentAttachments(Async)"); + } + + + com.squareup.okhttp.Call call = issueListIssueCommentAttachmentsCall(owner, repo, id, progressListener, progressRequestListener); + return call; + + } + + /** + * List comment's attachments + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @return List<Attachment> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List issueListIssueCommentAttachments(String owner, String repo, Long id) throws ApiException { + ApiResponse> resp = issueListIssueCommentAttachmentsWithHttpInfo(owner, repo, id); + return resp.getData(); + } + + /** + * List comment's attachments + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @return ApiResponse<List<Attachment>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> issueListIssueCommentAttachmentsWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = issueListIssueCommentAttachmentsValidateBeforeCall(owner, repo, id, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List comment's attachments (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the comment (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueListIssueCommentAttachmentsAsync(String owner, String repo, Long id, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueListIssueCommentAttachmentsValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueListIssueDependencies + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueListIssueDependenciesCall(String owner, String repo, String index, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/dependencies" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueListIssueDependenciesValidateBeforeCall(String owner, String repo, String index, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueListIssueDependencies(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueListIssueDependencies(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueListIssueDependencies(Async)"); + } + + + com.squareup.okhttp.Call call = issueListIssueDependenciesCall(owner, repo, index, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List an issue's dependencies, i.e all issues that block this issue. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List issueListIssueDependencies(String owner, String repo, String index, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = issueListIssueDependenciesWithHttpInfo(owner, repo, index, page, limit); + return resp.getData(); + } + + /** + * List an issue's dependencies, i.e all issues that block this issue. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Issue>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> issueListIssueDependenciesWithHttpInfo(String owner, String repo, String index, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = issueListIssueDependenciesValidateBeforeCall(owner, repo, index, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List an issue's dependencies, i.e all issues that block this issue. (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueListIssueDependenciesAsync(String owner, String repo, String index, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueListIssueDependenciesValidateBeforeCall(owner, repo, index, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for issueListIssues * @param owner owner of the repo (required) @@ -5990,6 +8122,300 @@ public class IssueApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for issueRemoveIssueBlocking + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueRemoveIssueBlockingCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/blocks" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueRemoveIssueBlockingValidateBeforeCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueRemoveIssueBlocking(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueRemoveIssueBlocking(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueRemoveIssueBlocking(Async)"); + } + + + com.squareup.okhttp.Call call = issueRemoveIssueBlockingCall(owner, repo, index, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Unblock the issue given in the body by the issue in path + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return Issue + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Issue issueRemoveIssueBlocking(String owner, String repo, String index, IssueMeta body) throws ApiException { + ApiResponse resp = issueRemoveIssueBlockingWithHttpInfo(owner, repo, index, body); + return resp.getData(); + } + + /** + * Unblock the issue given in the body by the issue in path + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return ApiResponse<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueRemoveIssueBlockingWithHttpInfo(String owner, String repo, String index, IssueMeta body) throws ApiException { + com.squareup.okhttp.Call call = issueRemoveIssueBlockingValidateBeforeCall(owner, repo, index, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Unblock the issue given in the body by the issue in path (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueRemoveIssueBlockingAsync(String owner, String repo, String index, IssueMeta body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueRemoveIssueBlockingValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for issueRemoveIssueDependencies + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call issueRemoveIssueDependenciesCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/dependencies" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueRemoveIssueDependenciesValidateBeforeCall(String owner, String repo, String index, IssueMeta body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling issueRemoveIssueDependencies(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueRemoveIssueDependencies(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueRemoveIssueDependencies(Async)"); + } + + + com.squareup.okhttp.Call call = issueRemoveIssueDependenciesCall(owner, repo, index, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Remove an issue dependency + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return Issue + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Issue issueRemoveIssueDependencies(String owner, String repo, String index, IssueMeta body) throws ApiException { + ApiResponse resp = issueRemoveIssueDependenciesWithHttpInfo(owner, repo, index, body); + return resp.getData(); + } + + /** + * Remove an issue dependency + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @return ApiResponse<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueRemoveIssueDependenciesWithHttpInfo(String owner, String repo, String index, IssueMeta body) throws ApiException { + com.squareup.okhttp.Call call = issueRemoveIssueDependenciesValidateBeforeCall(owner, repo, index, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Remove an issue dependency (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call issueRemoveIssueDependenciesAsync(String owner, String repo, String index, IssueMeta body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = issueRemoveIssueDependenciesValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for issueRemoveLabel * @param owner owner of the repo (required) @@ -6439,6 +8865,7 @@ public class IssueApi { * @param created filter (issues / pulls) created by you, default is false (optional) * @param mentioned filter (issues / pulls) mentioning you, default is false (optional) * @param reviewRequested filter pulls requesting your review, default is false (optional) + * @param reviewed filter pulls reviewed by you, default is false (optional) * @param owner filter by owner (optional) * @param team filter by team (requires organization owner parameter to be provided) (optional) * @param page page number of results to return (1-based) (optional) @@ -6448,7 +8875,7 @@ public class IssueApi { * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call issueSearchIssuesCall(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, String owner, String team, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call issueSearchIssuesCall(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, Boolean reviewed, String owner, String team, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -6480,6 +8907,8 @@ public class IssueApi { localVarQueryParams.addAll(apiClient.parameterToPair("mentioned", mentioned)); if (reviewRequested != null) localVarQueryParams.addAll(apiClient.parameterToPair("review_requested", reviewRequested)); + if (reviewed != null) + localVarQueryParams.addAll(apiClient.parameterToPair("reviewed", reviewed)); if (owner != null) localVarQueryParams.addAll(apiClient.parameterToPair("owner", owner)); if (team != null) @@ -6522,10 +8951,10 @@ public class IssueApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call issueSearchIssuesValidateBeforeCall(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, String owner, String team, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call issueSearchIssuesValidateBeforeCall(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, Boolean reviewed, String owner, String team, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - com.squareup.okhttp.Call call = issueSearchIssuesCall(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = issueSearchIssuesCall(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit, progressListener, progressRequestListener); return call; } @@ -6545,6 +8974,7 @@ public class IssueApi { * @param created filter (issues / pulls) created by you, default is false (optional) * @param mentioned filter (issues / pulls) mentioning you, default is false (optional) * @param reviewRequested filter pulls requesting your review, default is false (optional) + * @param reviewed filter pulls reviewed by you, default is false (optional) * @param owner filter by owner (optional) * @param team filter by team (requires organization owner parameter to be provided) (optional) * @param page page number of results to return (1-based) (optional) @@ -6552,8 +8982,8 @@ public class IssueApi { * @return List<Issue> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List issueSearchIssues(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, String owner, String team, Integer page, Integer limit) throws ApiException { - ApiResponse> resp = issueSearchIssuesWithHttpInfo(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit); + public List issueSearchIssues(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, Boolean reviewed, String owner, String team, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = issueSearchIssuesWithHttpInfo(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit); return resp.getData(); } @@ -6572,6 +9002,7 @@ public class IssueApi { * @param created filter (issues / pulls) created by you, default is false (optional) * @param mentioned filter (issues / pulls) mentioning you, default is false (optional) * @param reviewRequested filter pulls requesting your review, default is false (optional) + * @param reviewed filter pulls reviewed by you, default is false (optional) * @param owner filter by owner (optional) * @param team filter by team (requires organization owner parameter to be provided) (optional) * @param page page number of results to return (1-based) (optional) @@ -6579,8 +9010,8 @@ public class IssueApi { * @return ApiResponse<List<Issue>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> issueSearchIssuesWithHttpInfo(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, String owner, String team, Integer page, Integer limit) throws ApiException { - com.squareup.okhttp.Call call = issueSearchIssuesValidateBeforeCall(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit, null, null); + public ApiResponse> issueSearchIssuesWithHttpInfo(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, Boolean reviewed, String owner, String team, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = issueSearchIssuesValidateBeforeCall(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -6600,6 +9031,7 @@ public class IssueApi { * @param created filter (issues / pulls) created by you, default is false (optional) * @param mentioned filter (issues / pulls) mentioning you, default is false (optional) * @param reviewRequested filter pulls requesting your review, default is false (optional) + * @param reviewed filter pulls reviewed by you, default is false (optional) * @param owner filter by owner (optional) * @param team filter by team (requires organization owner parameter to be provided) (optional) * @param page page number of results to return (1-based) (optional) @@ -6608,7 +9040,7 @@ public class IssueApi { * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call issueSearchIssuesAsync(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, String owner, String team, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call issueSearchIssuesAsync(String state, String labels, String milestones, String q, Long priorityRepoId, String type, OffsetDateTime since, OffsetDateTime before, Boolean assigned, Boolean created, Boolean mentioned, Boolean reviewRequested, Boolean reviewed, String owner, String team, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -6629,7 +9061,7 @@ public class IssueApi { }; } - com.squareup.okhttp.Call call = issueSearchIssuesValidateBeforeCall(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = issueSearchIssuesValidateBeforeCall(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -7240,4 +9672,431 @@ public class IssueApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for moveIssuePin + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue (required) + * @param position the new position (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call moveIssuePinCall(String owner, String repo, Long index, Long position, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/pin/{position}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())) + .replaceAll("\\{" + "position" + "\\}", apiClient.escapeString(position.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json", "text/html" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call moveIssuePinValidateBeforeCall(String owner, String repo, Long index, Long position, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling moveIssuePin(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling moveIssuePin(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling moveIssuePin(Async)"); + } + + // verify the required parameter 'position' is set + if (position == null) { + throw new ApiException("Missing the required parameter 'position' when calling moveIssuePin(Async)"); + } + + + com.squareup.okhttp.Call call = moveIssuePinCall(owner, repo, index, position, progressListener, progressRequestListener); + return call; + + } + + /** + * Moves the Pin to the given Position + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue (required) + * @param position the new position (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void moveIssuePin(String owner, String repo, Long index, Long position) throws ApiException { + moveIssuePinWithHttpInfo(owner, repo, index, position); + } + + /** + * Moves the Pin to the given Position + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue (required) + * @param position the new position (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse moveIssuePinWithHttpInfo(String owner, String repo, Long index, Long position) throws ApiException { + com.squareup.okhttp.Call call = moveIssuePinValidateBeforeCall(owner, repo, index, position, null, null); + return apiClient.execute(call); + } + + /** + * Moves the Pin to the given Position (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue (required) + * @param position the new position (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call moveIssuePinAsync(String owner, String repo, Long index, Long position, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = moveIssuePinValidateBeforeCall(owner, repo, index, position, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for pinIssue + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to pin (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call pinIssueCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/pin" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json", "text/html" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call pinIssueValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling pinIssue(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling pinIssue(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling pinIssue(Async)"); + } + + + com.squareup.okhttp.Call call = pinIssueCall(owner, repo, index, progressListener, progressRequestListener); + return call; + + } + + /** + * Pin an Issue + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to pin (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void pinIssue(String owner, String repo, Long index) throws ApiException { + pinIssueWithHttpInfo(owner, repo, index); + } + + /** + * Pin an Issue + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to pin (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse pinIssueWithHttpInfo(String owner, String repo, Long index) throws ApiException { + com.squareup.okhttp.Call call = pinIssueValidateBeforeCall(owner, repo, index, null, null); + return apiClient.execute(call); + } + + /** + * Pin an Issue (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to pin (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call pinIssueAsync(String owner, String repo, Long index, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = pinIssueValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for unpinIssue + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to unpin (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call unpinIssueCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/{index}/pin" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json", "text/html" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call unpinIssueValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling unpinIssue(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling unpinIssue(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling unpinIssue(Async)"); + } + + + com.squareup.okhttp.Call call = unpinIssueCall(owner, repo, index, progressListener, progressRequestListener); + return call; + + } + + /** + * Unpin an Issue + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to unpin (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void unpinIssue(String owner, String repo, Long index) throws ApiException { + unpinIssueWithHttpInfo(owner, repo, index); + } + + /** + * Unpin an Issue + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to unpin (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse unpinIssueWithHttpInfo(String owner, String repo, Long index) throws ApiException { + com.squareup.okhttp.Call call = unpinIssueValidateBeforeCall(owner, repo, index, null, null); + return apiClient.execute(call); + } + + /** + * Unpin an Issue (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of issue to unpin (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call unpinIssueAsync(String owner, String repo, Long index, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = unpinIssueValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } } diff --git a/src/main/java/io/gitea/api/MiscellaneousApi.java b/src/main/java/io/gitea/api/MiscellaneousApi.java index 9ac9ab6..6005f4b 100644 --- a/src/main/java/io/gitea/api/MiscellaneousApi.java +++ b/src/main/java/io/gitea/api/MiscellaneousApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,7 +27,12 @@ import com.google.gson.reflect.TypeToken; import java.io.IOException; +import io.gitea.model.GitignoreTemplateInfo; +import io.gitea.model.LabelTemplate; +import io.gitea.model.LicenseTemplateInfo; +import io.gitea.model.LicensesTemplateListEntry; import io.gitea.model.MarkdownOption; +import io.gitea.model.MarkupOption; import io.gitea.model.NodeInfo; import io.gitea.model.ServerVersion; @@ -56,6 +61,375 @@ public class MiscellaneousApi { this.apiClient = apiClient; } + /** + * Build call for getGitignoreTemplateInfo + * @param name name of the template (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getGitignoreTemplateInfoCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/gitignore/templates/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getGitignoreTemplateInfoValidateBeforeCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling getGitignoreTemplateInfo(Async)"); + } + + + com.squareup.okhttp.Call call = getGitignoreTemplateInfoCall(name, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns information about a gitignore template + * + * @param name name of the template (required) + * @return GitignoreTemplateInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GitignoreTemplateInfo getGitignoreTemplateInfo(String name) throws ApiException { + ApiResponse resp = getGitignoreTemplateInfoWithHttpInfo(name); + return resp.getData(); + } + + /** + * Returns information about a gitignore template + * + * @param name name of the template (required) + * @return ApiResponse<GitignoreTemplateInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getGitignoreTemplateInfoWithHttpInfo(String name) throws ApiException { + com.squareup.okhttp.Call call = getGitignoreTemplateInfoValidateBeforeCall(name, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns information about a gitignore template (asynchronously) + * + * @param name name of the template (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getGitignoreTemplateInfoAsync(String name, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getGitignoreTemplateInfoValidateBeforeCall(name, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getLabelTemplateInfo + * @param name name of the template (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getLabelTemplateInfoCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/label/templates/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getLabelTemplateInfoValidateBeforeCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling getLabelTemplateInfo(Async)"); + } + + + com.squareup.okhttp.Call call = getLabelTemplateInfoCall(name, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns all labels in a template + * + * @param name name of the template (required) + * @return List<LabelTemplate> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List getLabelTemplateInfo(String name) throws ApiException { + ApiResponse> resp = getLabelTemplateInfoWithHttpInfo(name); + return resp.getData(); + } + + /** + * Returns all labels in a template + * + * @param name name of the template (required) + * @return ApiResponse<List<LabelTemplate>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> getLabelTemplateInfoWithHttpInfo(String name) throws ApiException { + com.squareup.okhttp.Call call = getLabelTemplateInfoValidateBeforeCall(name, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns all labels in a template (asynchronously) + * + * @param name name of the template (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getLabelTemplateInfoAsync(String name, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getLabelTemplateInfoValidateBeforeCall(name, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for getLicenseTemplateInfo + * @param name name of the license (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call getLicenseTemplateInfoCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/licenses/{name}" + .replaceAll("\\{" + "name" + "\\}", apiClient.escapeString(name.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call getLicenseTemplateInfoValidateBeforeCall(String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'name' is set + if (name == null) { + throw new ApiException("Missing the required parameter 'name' when calling getLicenseTemplateInfo(Async)"); + } + + + com.squareup.okhttp.Call call = getLicenseTemplateInfoCall(name, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns information about a license template + * + * @param name name of the license (required) + * @return LicenseTemplateInfo + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public LicenseTemplateInfo getLicenseTemplateInfo(String name) throws ApiException { + ApiResponse resp = getLicenseTemplateInfoWithHttpInfo(name); + return resp.getData(); + } + + /** + * Returns information about a license template + * + * @param name name of the license (required) + * @return ApiResponse<LicenseTemplateInfo> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse getLicenseTemplateInfoWithHttpInfo(String name) throws ApiException { + com.squareup.okhttp.Call call = getLicenseTemplateInfoValidateBeforeCall(name, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns information about a license template (asynchronously) + * + * @param name name of the license (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call getLicenseTemplateInfoAsync(String name, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = getLicenseTemplateInfoValidateBeforeCall(name, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for getNodeInfo * @param progressListener Progress listener @@ -395,6 +769,345 @@ public class MiscellaneousApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for listGitignoresTemplates + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call listGitignoresTemplatesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/gitignore/templates"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call listGitignoresTemplatesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = listGitignoresTemplatesCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Returns a list of all gitignore templates + * + * @return List<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List listGitignoresTemplates() throws ApiException { + ApiResponse> resp = listGitignoresTemplatesWithHttpInfo(); + return resp.getData(); + } + + /** + * Returns a list of all gitignore templates + * + * @return ApiResponse<List<String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> listGitignoresTemplatesWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = listGitignoresTemplatesValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns a list of all gitignore templates (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call listGitignoresTemplatesAsync(final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = listGitignoresTemplatesValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for listLabelTemplates + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call listLabelTemplatesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/label/templates"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call listLabelTemplatesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = listLabelTemplatesCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Returns a list of all label templates + * + * @return List<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List listLabelTemplates() throws ApiException { + ApiResponse> resp = listLabelTemplatesWithHttpInfo(); + return resp.getData(); + } + + /** + * Returns a list of all label templates + * + * @return ApiResponse<List<String>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> listLabelTemplatesWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = listLabelTemplatesValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns a list of all label templates (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call listLabelTemplatesAsync(final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = listLabelTemplatesValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for listLicenseTemplates + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call listLicenseTemplatesCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/licenses"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call listLicenseTemplatesValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = listLicenseTemplatesCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Returns a list of all license templates + * + * @return List<LicensesTemplateListEntry> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List listLicenseTemplates() throws ApiException { + ApiResponse> resp = listLicenseTemplatesWithHttpInfo(); + return resp.getData(); + } + + /** + * Returns a list of all license templates + * + * @return ApiResponse<List<LicensesTemplateListEntry>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> listLicenseTemplatesWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = listLicenseTemplatesValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns a list of all license templates (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call listLicenseTemplatesAsync(final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = listLicenseTemplatesValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for renderMarkdown * @param body (optional) @@ -634,4 +1347,121 @@ public class MiscellaneousApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for renderMarkup + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call renderMarkupCall(MarkupOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/markup"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "text/html" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call renderMarkupValidateBeforeCall(MarkupOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = renderMarkupCall(body, progressListener, progressRequestListener); + return call; + + } + + /** + * Render a markup document as HTML + * + * @param body (optional) + * @return String + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public String renderMarkup(MarkupOption body) throws ApiException { + ApiResponse resp = renderMarkupWithHttpInfo(body); + return resp.getData(); + } + + /** + * Render a markup document as HTML + * + * @param body (optional) + * @return ApiResponse<String> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse renderMarkupWithHttpInfo(MarkupOption body) throws ApiException { + com.squareup.okhttp.Call call = renderMarkupValidateBeforeCall(body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Render a markup document as HTML (asynchronously) + * + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call renderMarkupAsync(MarkupOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = renderMarkupValidateBeforeCall(body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } diff --git a/src/main/java/io/gitea/api/NotificationApi.java b/src/main/java/io/gitea/api/NotificationApi.java index ff86a6e..e7eff98 100644 --- a/src/main/java/io/gitea/api/NotificationApi.java +++ b/src/main/java/io/gitea/api/NotificationApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/api/OrganizationApi.java b/src/main/java/io/gitea/api/OrganizationApi.java index 8d3bcb8..89c1237 100644 --- a/src/main/java/io/gitea/api/OrganizationApi.java +++ b/src/main/java/io/gitea/api/OrganizationApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -27,8 +27,10 @@ import com.google.gson.reflect.TypeToken; import java.io.IOException; +import io.gitea.model.Activity; import io.gitea.model.CreateHookOption; import io.gitea.model.CreateLabelOption; +import io.gitea.model.CreateOrUpdateSecretOption; import io.gitea.model.CreateOrgOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.CreateTeamOption; @@ -39,10 +41,13 @@ import io.gitea.model.EditTeamOption; import io.gitea.model.Hook; import io.gitea.model.InlineResponse200; import io.gitea.model.Label; +import org.threeten.bp.LocalDate; import io.gitea.model.Organization; import io.gitea.model.OrganizationPermissions; import io.gitea.model.Repository; +import io.gitea.model.Secret; import io.gitea.model.Team; +import io.gitea.model.UpdateUserAvatarOption; import io.gitea.model.User; import java.lang.reflect.Type; @@ -333,6 +338,135 @@ public class OrganizationApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for deleteOrgSecret + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteOrgSecretCall(String org, String secretname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/{org}/actions/secrets/{secretname}" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())) + .replaceAll("\\{" + "secretname" + "\\}", apiClient.escapeString(secretname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteOrgSecretValidateBeforeCall(String org, String secretname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'org' is set + if (org == null) { + throw new ApiException("Missing the required parameter 'org' when calling deleteOrgSecret(Async)"); + } + + // verify the required parameter 'secretname' is set + if (secretname == null) { + throw new ApiException("Missing the required parameter 'secretname' when calling deleteOrgSecret(Async)"); + } + + + com.squareup.okhttp.Call call = deleteOrgSecretCall(org, secretname, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a secret in an organization + * + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteOrgSecret(String org, String secretname) throws ApiException { + deleteOrgSecretWithHttpInfo(org, secretname); + } + + /** + * Delete a secret in an organization + * + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteOrgSecretWithHttpInfo(String org, String secretname) throws ApiException { + com.squareup.okhttp.Call call = deleteOrgSecretValidateBeforeCall(org, secretname, null, null); + return apiClient.execute(call); + } + + /** + * Delete a secret in an organization (asynchronously) + * + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteOrgSecretAsync(String org, String secretname, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteOrgSecretValidateBeforeCall(org, secretname, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for orgAddTeamMember * @param id id of the team (required) @@ -1357,6 +1491,125 @@ public class OrganizationApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for orgDeleteAvatar + * @param org name of the organization (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call orgDeleteAvatarCall(String org, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/{org}/avatar" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgDeleteAvatarValidateBeforeCall(String org, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'org' is set + if (org == null) { + throw new ApiException("Missing the required parameter 'org' when calling orgDeleteAvatar(Async)"); + } + + + com.squareup.okhttp.Call call = orgDeleteAvatarCall(org, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete Avatar + * + * @param org name of the organization (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void orgDeleteAvatar(String org) throws ApiException { + orgDeleteAvatarWithHttpInfo(org); + } + + /** + * Delete Avatar + * + * @param org name of the organization (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse orgDeleteAvatarWithHttpInfo(String org) throws ApiException { + com.squareup.okhttp.Call call = orgDeleteAvatarValidateBeforeCall(org, null, null); + return apiClient.execute(call); + } + + /** + * Delete Avatar (asynchronously) + * + * @param org name of the organization (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call orgDeleteAvatarAsync(String org, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = orgDeleteAvatarValidateBeforeCall(org, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for orgDeleteHook * @param org name of the organization (required) @@ -3424,6 +3677,282 @@ public class OrganizationApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for orgListActionsSecrets + * @param org name of the organization (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call orgListActionsSecretsCall(String org, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/{org}/actions/secrets" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgListActionsSecretsValidateBeforeCall(String org, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'org' is set + if (org == null) { + throw new ApiException("Missing the required parameter 'org' when calling orgListActionsSecrets(Async)"); + } + + + com.squareup.okhttp.Call call = orgListActionsSecretsCall(org, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List an organization's actions secrets + * + * @param org name of the organization (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Secret> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List orgListActionsSecrets(String org, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = orgListActionsSecretsWithHttpInfo(org, page, limit); + return resp.getData(); + } + + /** + * List an organization's actions secrets + * + * @param org name of the organization (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Secret>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> orgListActionsSecretsWithHttpInfo(String org, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = orgListActionsSecretsValidateBeforeCall(org, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List an organization's actions secrets (asynchronously) + * + * @param org name of the organization (required) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call orgListActionsSecretsAsync(String org, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = orgListActionsSecretsValidateBeforeCall(org, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for orgListActivityFeeds + * @param org name of the org (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call orgListActivityFeedsCall(String org, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/{org}/activities/feeds" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (date != null) + localVarQueryParams.addAll(apiClient.parameterToPair("date", date)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgListActivityFeedsValidateBeforeCall(String org, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'org' is set + if (org == null) { + throw new ApiException("Missing the required parameter 'org' when calling orgListActivityFeeds(Async)"); + } + + + com.squareup.okhttp.Call call = orgListActivityFeedsCall(org, date, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List an organization's activity feeds + * + * @param org name of the org (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Activity> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List orgListActivityFeeds(String org, LocalDate date, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = orgListActivityFeedsWithHttpInfo(org, date, page, limit); + return resp.getData(); + } + + /** + * List an organization's activity feeds + * + * @param org name of the org (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Activity>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> orgListActivityFeedsWithHttpInfo(String org, LocalDate date, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = orgListActivityFeedsValidateBeforeCall(org, date, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List an organization's activity feeds (asynchronously) + * + * @param org name of the org (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call orgListActivityFeedsAsync(String org, LocalDate date, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = orgListActivityFeedsValidateBeforeCall(org, date, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for orgListCurrentUserOrgs * @param page page number of results to return (1-based) (optional) @@ -4224,6 +4753,147 @@ public class OrganizationApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for orgListTeamActivityFeeds + * @param id id of the team (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call orgListTeamActivityFeedsCall(Long id, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/teams/{id}/activities/feeds" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (date != null) + localVarQueryParams.addAll(apiClient.parameterToPair("date", date)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgListTeamActivityFeedsValidateBeforeCall(Long id, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling orgListTeamActivityFeeds(Async)"); + } + + + com.squareup.okhttp.Call call = orgListTeamActivityFeedsCall(id, date, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List a team's activity feeds + * + * @param id id of the team (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Activity> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List orgListTeamActivityFeeds(Long id, LocalDate date, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = orgListTeamActivityFeedsWithHttpInfo(id, date, page, limit); + return resp.getData(); + } + + /** + * List a team's activity feeds + * + * @param id id of the team (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Activity>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> orgListTeamActivityFeedsWithHttpInfo(Long id, LocalDate date, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = orgListTeamActivityFeedsValidateBeforeCall(id, date, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a team's activity feeds (asynchronously) + * + * @param id id of the team (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call orgListTeamActivityFeedsAsync(Long id, LocalDate date, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = orgListTeamActivityFeedsValidateBeforeCall(id, date, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for orgListTeamMember * @param id id of the team (required) @@ -5437,6 +6107,129 @@ public class OrganizationApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for orgUpdateAvatar + * @param org name of the organization (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call orgUpdateAvatarCall(String org, UpdateUserAvatarOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/orgs/{org}/avatar" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgUpdateAvatarValidateBeforeCall(String org, UpdateUserAvatarOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'org' is set + if (org == null) { + throw new ApiException("Missing the required parameter 'org' when calling orgUpdateAvatar(Async)"); + } + + + com.squareup.okhttp.Call call = orgUpdateAvatarCall(org, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update Avatar + * + * @param org name of the organization (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void orgUpdateAvatar(String org, UpdateUserAvatarOption body) throws ApiException { + orgUpdateAvatarWithHttpInfo(org, body); + } + + /** + * Update Avatar + * + * @param org name of the organization (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse orgUpdateAvatarWithHttpInfo(String org, UpdateUserAvatarOption body) throws ApiException { + com.squareup.okhttp.Call call = orgUpdateAvatarValidateBeforeCall(org, body, null, null); + return apiClient.execute(call); + } + + /** + * Update Avatar (asynchronously) + * + * @param org name of the organization (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call orgUpdateAvatarAsync(String org, UpdateUserAvatarOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = orgUpdateAvatarValidateBeforeCall(org, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for teamSearch * @param org name of the organization (required) @@ -5584,4 +6377,137 @@ public class OrganizationApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for updateOrgSecret + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateOrgSecretCall(String org, String secretname, CreateOrUpdateSecretOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/orgs/{org}/actions/secrets/{secretname}" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())) + .replaceAll("\\{" + "secretname" + "\\}", apiClient.escapeString(secretname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateOrgSecretValidateBeforeCall(String org, String secretname, CreateOrUpdateSecretOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'org' is set + if (org == null) { + throw new ApiException("Missing the required parameter 'org' when calling updateOrgSecret(Async)"); + } + + // verify the required parameter 'secretname' is set + if (secretname == null) { + throw new ApiException("Missing the required parameter 'secretname' when calling updateOrgSecret(Async)"); + } + + + com.squareup.okhttp.Call call = updateOrgSecretCall(org, secretname, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create or Update a secret value in an organization + * + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateOrgSecret(String org, String secretname, CreateOrUpdateSecretOption body) throws ApiException { + updateOrgSecretWithHttpInfo(org, secretname, body); + } + + /** + * Create or Update a secret value in an organization + * + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateOrgSecretWithHttpInfo(String org, String secretname, CreateOrUpdateSecretOption body) throws ApiException { + com.squareup.okhttp.Call call = updateOrgSecretValidateBeforeCall(org, secretname, body, null, null); + return apiClient.execute(call); + } + + /** + * Create or Update a secret value in an organization (asynchronously) + * + * @param org name of organization (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateOrgSecretAsync(String org, String secretname, CreateOrUpdateSecretOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateOrgSecretValidateBeforeCall(org, secretname, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } } diff --git a/src/main/java/io/gitea/api/PackageApi.java b/src/main/java/io/gitea/api/PackageApi.java index 1f56bd4..860e462 100644 --- a/src/main/java/io/gitea/api/PackageApi.java +++ b/src/main/java/io/gitea/api/PackageApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/api/RepositoryApi.java b/src/main/java/io/gitea/api/RepositoryApi.java index aebfb85..f61afbd 100644 --- a/src/main/java/io/gitea/api/RepositoryApi.java +++ b/src/main/java/io/gitea/api/RepositoryApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -28,11 +28,13 @@ import java.io.IOException; import io.gitea.model.APIError; +import io.gitea.model.Activity; import io.gitea.model.AddCollaboratorOption; import io.gitea.model.AnnotatedTag; import io.gitea.model.Attachment; import io.gitea.model.Branch; import io.gitea.model.BranchProtection; +import io.gitea.model.ChangeFilesOptions; import io.gitea.model.ChangedFile; import io.gitea.model.CombinedStatus; import io.gitea.model.Commit; @@ -44,6 +46,7 @@ import io.gitea.model.CreateFileOptions; import io.gitea.model.CreateForkOption; import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; +import io.gitea.model.CreateOrUpdateSecretOption; import io.gitea.model.CreatePullRequestOption; import io.gitea.model.CreatePullReviewOptions; import io.gitea.model.CreatePushMirrorOption; @@ -65,14 +68,20 @@ import io.gitea.model.EditRepoOption; import java.io.File; import io.gitea.model.FileDeleteResponse; import io.gitea.model.FileResponse; +import io.gitea.model.FilesResponse; import io.gitea.model.GenerateRepoOption; import io.gitea.model.GitBlobResponse; import io.gitea.model.GitHook; import io.gitea.model.GitTreeResponse; import io.gitea.model.Hook; +import io.gitea.model.Issue; +import io.gitea.model.IssueConfig; +import io.gitea.model.IssueConfigValidation; import io.gitea.model.IssueTemplate; +import org.threeten.bp.LocalDate; import io.gitea.model.MergePullRequestOption; import io.gitea.model.MigrateRepoOptions; +import io.gitea.model.NewIssuePinsAllowed; import io.gitea.model.Note; import org.threeten.bp.OffsetDateTime; import io.gitea.model.PullRequest; @@ -94,6 +103,7 @@ import io.gitea.model.TopicResponse; import io.gitea.model.TrackedTime; import io.gitea.model.TransferRepoOption; import io.gitea.model.UpdateFileOptions; +import io.gitea.model.UpdateRepoAvatarOption; import io.gitea.model.User; import io.gitea.model.WatchInfo; import io.gitea.model.WikiCommitList; @@ -512,6 +522,145 @@ public class RepositoryApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for deleteRepoSecret + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteRepoSecretCall(String owner, String repo, String secretname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/actions/secrets/{secretname}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "secretname" + "\\}", apiClient.escapeString(secretname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteRepoSecretValidateBeforeCall(String owner, String repo, String secretname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling deleteRepoSecret(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling deleteRepoSecret(Async)"); + } + + // verify the required parameter 'secretname' is set + if (secretname == null) { + throw new ApiException("Missing the required parameter 'secretname' when calling deleteRepoSecret(Async)"); + } + + + com.squareup.okhttp.Call call = deleteRepoSecretCall(owner, repo, secretname, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a secret in a repository + * + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteRepoSecret(String owner, String repo, String secretname) throws ApiException { + deleteRepoSecretWithHttpInfo(owner, repo, secretname); + } + + /** + * Delete a secret in a repository + * + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteRepoSecretWithHttpInfo(String owner, String repo, String secretname) throws ApiException { + com.squareup.okhttp.Call call = deleteRepoSecretValidateBeforeCall(owner, repo, secretname, null, null); + return apiClient.execute(call); + } + + /** + * Delete a secret in a repository (asynchronously) + * + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteRepoSecretAsync(String owner, String repo, String secretname, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteRepoSecretValidateBeforeCall(owner, repo, secretname, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for generateRepo * @param templateOwner name of the template repository owner (required) @@ -2213,6 +2362,148 @@ public class RepositoryApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for repoChangeFiles + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoChangeFilesCall(String owner, String repo, ChangeFilesOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/contents" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoChangeFilesValidateBeforeCall(String owner, String repo, ChangeFilesOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoChangeFiles(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoChangeFiles(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling repoChangeFiles(Async)"); + } + + + com.squareup.okhttp.Call call = repoChangeFilesCall(owner, repo, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Modify multiple files in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (required) + * @return FilesResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public FilesResponse repoChangeFiles(String owner, String repo, ChangeFilesOptions body) throws ApiException { + ApiResponse resp = repoChangeFilesWithHttpInfo(owner, repo, body); + return resp.getData(); + } + + /** + * Modify multiple files in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (required) + * @return ApiResponse<FilesResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoChangeFilesWithHttpInfo(String owner, String repo, ChangeFilesOptions body) throws ApiException { + com.squareup.okhttp.Call call = repoChangeFilesValidateBeforeCall(owner, repo, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Modify multiple files in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoChangeFilesAsync(String owner, String repo, ChangeFilesOptions body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoChangeFilesValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for repoCheckCollaborator * @param owner owner of the repo (required) @@ -4483,6 +4774,135 @@ public class RepositoryApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for repoDeleteAvatar + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoDeleteAvatarCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/avatar" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteAvatarValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoDeleteAvatar(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteAvatar(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteAvatarCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete avatar + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDeleteAvatar(String owner, String repo) throws ApiException { + repoDeleteAvatarWithHttpInfo(owner, repo); + } + + /** + * Delete avatar + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoDeleteAvatarWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteAvatarValidateBeforeCall(owner, repo, null, null); + return apiClient.execute(call); + } + + /** + * Delete avatar (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoDeleteAvatarAsync(String owner, String repo, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoDeleteAvatarValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for repoDeleteBranch * @param owner owner of the repo (required) @@ -8678,14 +9098,17 @@ public class RepositoryApi { * @param sha SHA or branch to start listing commits from (usually 'master') (optional) * @param path filepath of a file/dir (optional) * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (ignored if used with 'path') (optional) + * @param not commits that match the given specifier will not be listed. (optional) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call repoGetAllCommitsCall(String owner, String repo, String sha, String path, Boolean stat, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetAllCommitsCall(String owner, String repo, String sha, String path, Boolean stat, Boolean verification, Boolean files, Integer page, Integer limit, String not, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -8701,10 +9124,16 @@ public class RepositoryApi { localVarQueryParams.addAll(apiClient.parameterToPair("path", path)); if (stat != null) localVarQueryParams.addAll(apiClient.parameterToPair("stat", stat)); + if (verification != null) + localVarQueryParams.addAll(apiClient.parameterToPair("verification", verification)); + if (files != null) + localVarQueryParams.addAll(apiClient.parameterToPair("files", files)); if (page != null) localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (not != null) + localVarQueryParams.addAll(apiClient.parameterToPair("not", not)); Map localVarHeaderParams = new HashMap(); @@ -8739,7 +9168,7 @@ public class RepositoryApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetAllCommitsValidateBeforeCall(String owner, String repo, String sha, String path, Boolean stat, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetAllCommitsValidateBeforeCall(String owner, String repo, String sha, String path, Boolean stat, Boolean verification, Boolean files, Integer page, Integer limit, String not, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -8752,7 +9181,7 @@ public class RepositoryApi { } - com.squareup.okhttp.Call call = repoGetAllCommitsCall(owner, repo, sha, path, stat, page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetAllCommitsCall(owner, repo, sha, path, stat, verification, files, page, limit, not, progressListener, progressRequestListener); return call; } @@ -8765,13 +9194,16 @@ public class RepositoryApi { * @param sha SHA or branch to start listing commits from (usually 'master') (optional) * @param path filepath of a file/dir (optional) * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (ignored if used with 'path') (optional) + * @param not commits that match the given specifier will not be listed. (optional) * @return List<Commit> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoGetAllCommits(String owner, String repo, String sha, String path, Boolean stat, Integer page, Integer limit) throws ApiException { - ApiResponse> resp = repoGetAllCommitsWithHttpInfo(owner, repo, sha, path, stat, page, limit); + public List repoGetAllCommits(String owner, String repo, String sha, String path, Boolean stat, Boolean verification, Boolean files, Integer page, Integer limit, String not) throws ApiException { + ApiResponse> resp = repoGetAllCommitsWithHttpInfo(owner, repo, sha, path, stat, verification, files, page, limit, not); return resp.getData(); } @@ -8783,13 +9215,16 @@ public class RepositoryApi { * @param sha SHA or branch to start listing commits from (usually 'master') (optional) * @param path filepath of a file/dir (optional) * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (ignored if used with 'path') (optional) + * @param not commits that match the given specifier will not be listed. (optional) * @return ApiResponse<List<Commit>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoGetAllCommitsWithHttpInfo(String owner, String repo, String sha, String path, Boolean stat, Integer page, Integer limit) throws ApiException { - com.squareup.okhttp.Call call = repoGetAllCommitsValidateBeforeCall(owner, repo, sha, path, stat, page, limit, null, null); + public ApiResponse> repoGetAllCommitsWithHttpInfo(String owner, String repo, String sha, String path, Boolean stat, Boolean verification, Boolean files, Integer page, Integer limit, String not) throws ApiException { + com.squareup.okhttp.Call call = repoGetAllCommitsValidateBeforeCall(owner, repo, sha, path, stat, verification, files, page, limit, not, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -8802,13 +9237,16 @@ public class RepositoryApi { * @param sha SHA or branch to start listing commits from (usually 'master') (optional) * @param path filepath of a file/dir (optional) * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (ignored if used with 'path') (optional) + * @param not commits that match the given specifier will not be listed. (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call repoGetAllCommitsAsync(String owner, String repo, String sha, String path, Boolean stat, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoGetAllCommitsAsync(String owner, String repo, String sha, String path, Boolean stat, Boolean verification, Boolean files, Integer page, Integer limit, String not, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -8829,7 +9267,7 @@ public class RepositoryApi { }; } - com.squareup.okhttp.Call call = repoGetAllCommitsValidateBeforeCall(owner, repo, sha, path, stat, page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetAllCommitsValidateBeforeCall(owner, repo, sha, path, stat, verification, files, page, limit, not, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -10389,6 +10827,139 @@ public class RepositoryApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for repoGetIssueConfig + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoGetIssueConfigCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issue_config" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoGetIssueConfigValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoGetIssueConfig(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoGetIssueConfig(Async)"); + } + + + com.squareup.okhttp.Call call = repoGetIssueConfigCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns the issue config for a repo + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return IssueConfig + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public IssueConfig repoGetIssueConfig(String owner, String repo) throws ApiException { + ApiResponse resp = repoGetIssueConfigWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * Returns the issue config for a repo + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<IssueConfig> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoGetIssueConfigWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoGetIssueConfigValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns the issue config for a repo (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoGetIssueConfigAsync(String owner, String repo, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoGetIssueConfigValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for repoGetIssueTemplates * @param owner owner of the repo (required) @@ -10799,23 +11370,21 @@ public class RepositoryApi { return call; } /** - * Build call for repoGetNote + * Build call for repoGetLatestRelease * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha a git ref or commit sha (required) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call repoGetNoteCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetLatestReleaseCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/git/notes/{sha}" + String localVarPath = "/repos/{owner}/{repo}/releases/latest" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -10853,69 +11422,61 @@ public class RepositoryApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetNoteValidateBeforeCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetLatestReleaseValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { - throw new ApiException("Missing the required parameter 'owner' when calling repoGetNote(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetLatestRelease(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetNote(Async)"); - } - - // verify the required parameter 'sha' is set - if (sha == null) { - throw new ApiException("Missing the required parameter 'sha' when calling repoGetNote(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetLatestRelease(Async)"); } - com.squareup.okhttp.Call call = repoGetNoteCall(owner, repo, sha, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetLatestReleaseCall(owner, repo, progressListener, progressRequestListener); return call; } /** - * Get a note corresponding to a single commit from a repository + * Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha a git ref or commit sha (required) - * @return Note + * @return Release * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Note repoGetNote(String owner, String repo, String sha) throws ApiException { - ApiResponse resp = repoGetNoteWithHttpInfo(owner, repo, sha); + public Release repoGetLatestRelease(String owner, String repo) throws ApiException { + ApiResponse resp = repoGetLatestReleaseWithHttpInfo(owner, repo); return resp.getData(); } /** - * Get a note corresponding to a single commit from a repository + * Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha a git ref or commit sha (required) - * @return ApiResponse<Note> + * @return ApiResponse<Release> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetNoteWithHttpInfo(String owner, String repo, String sha) throws ApiException { - com.squareup.okhttp.Call call = repoGetNoteValidateBeforeCall(owner, repo, sha, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetLatestReleaseWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoGetLatestReleaseValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a note corresponding to a single commit from a repository (asynchronously) + * Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha a git ref or commit sha (required) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call repoGetNoteAsync(String owner, String repo, String sha, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetLatestReleaseAsync(String owner, String repo, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -10936,7 +11497,162 @@ public class RepositoryApi { }; } - com.squareup.okhttp.Call call = repoGetNoteValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetLatestReleaseValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoGetNote + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha a git ref or commit sha (required) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoGetNoteCall(String owner, String repo, String sha, Boolean verification, Boolean files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/git/notes/{sha}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (verification != null) + localVarQueryParams.addAll(apiClient.parameterToPair("verification", verification)); + if (files != null) + localVarQueryParams.addAll(apiClient.parameterToPair("files", files)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoGetNoteValidateBeforeCall(String owner, String repo, String sha, Boolean verification, Boolean files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoGetNote(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoGetNote(Async)"); + } + + // verify the required parameter 'sha' is set + if (sha == null) { + throw new ApiException("Missing the required parameter 'sha' when calling repoGetNote(Async)"); + } + + + com.squareup.okhttp.Call call = repoGetNoteCall(owner, repo, sha, verification, files, progressListener, progressRequestListener); + return call; + + } + + /** + * Get a note corresponding to a single commit from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha a git ref or commit sha (required) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) + * @return Note + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Note repoGetNote(String owner, String repo, String sha, Boolean verification, Boolean files) throws ApiException { + ApiResponse resp = repoGetNoteWithHttpInfo(owner, repo, sha, verification, files); + return resp.getData(); + } + + /** + * Get a note corresponding to a single commit from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha a git ref or commit sha (required) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) + * @return ApiResponse<Note> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoGetNoteWithHttpInfo(String owner, String repo, String sha, Boolean verification, Boolean files) throws ApiException { + com.squareup.okhttp.Call call = repoGetNoteValidateBeforeCall(owner, repo, sha, verification, files, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get a note corresponding to a single commit from a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha a git ref or commit sha (required) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoGetNoteAsync(String owner, String repo, String sha, Boolean verification, Boolean files, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoGetNoteValidateBeforeCall(owner, repo, sha, verification, files, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -11091,12 +11807,14 @@ public class RepositoryApi { * @param index index of the pull request to get (required) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call repoGetPullRequestCommitsCall(String owner, String repo, Long index, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetPullRequestCommitsCall(String owner, String repo, Long index, Integer page, Integer limit, Boolean verification, Boolean files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -11111,6 +11829,10 @@ public class RepositoryApi { localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); if (limit != null) localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (verification != null) + localVarQueryParams.addAll(apiClient.parameterToPair("verification", verification)); + if (files != null) + localVarQueryParams.addAll(apiClient.parameterToPair("files", files)); Map localVarHeaderParams = new HashMap(); @@ -11145,7 +11867,7 @@ public class RepositoryApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetPullRequestCommitsValidateBeforeCall(String owner, String repo, Long index, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetPullRequestCommitsValidateBeforeCall(String owner, String repo, Long index, Integer page, Integer limit, Boolean verification, Boolean files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -11163,7 +11885,7 @@ public class RepositoryApi { } - com.squareup.okhttp.Call call = repoGetPullRequestCommitsCall(owner, repo, index, page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetPullRequestCommitsCall(owner, repo, index, page, limit, verification, files, progressListener, progressRequestListener); return call; } @@ -11176,11 +11898,13 @@ public class RepositoryApi { * @param index index of the pull request to get (required) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @return List<Commit> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoGetPullRequestCommits(String owner, String repo, Long index, Integer page, Integer limit) throws ApiException { - ApiResponse> resp = repoGetPullRequestCommitsWithHttpInfo(owner, repo, index, page, limit); + public List repoGetPullRequestCommits(String owner, String repo, Long index, Integer page, Integer limit, Boolean verification, Boolean files) throws ApiException { + ApiResponse> resp = repoGetPullRequestCommitsWithHttpInfo(owner, repo, index, page, limit, verification, files); return resp.getData(); } @@ -11192,11 +11916,13 @@ public class RepositoryApi { * @param index index of the pull request to get (required) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @return ApiResponse<List<Commit>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoGetPullRequestCommitsWithHttpInfo(String owner, String repo, Long index, Integer page, Integer limit) throws ApiException { - com.squareup.okhttp.Call call = repoGetPullRequestCommitsValidateBeforeCall(owner, repo, index, page, limit, null, null); + public ApiResponse> repoGetPullRequestCommitsWithHttpInfo(String owner, String repo, Long index, Integer page, Integer limit, Boolean verification, Boolean files) throws ApiException { + com.squareup.okhttp.Call call = repoGetPullRequestCommitsValidateBeforeCall(owner, repo, index, page, limit, verification, files, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -11209,11 +11935,13 @@ public class RepositoryApi { * @param index index of the pull request to get (required) * @param page page number of results to return (1-based) (optional) * @param limit page size of results (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call repoGetPullRequestCommitsAsync(String owner, String repo, Long index, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoGetPullRequestCommitsAsync(String owner, String repo, Long index, Integer page, Integer limit, Boolean verification, Boolean files, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -11234,7 +11962,7 @@ public class RepositoryApi { }; } - com.squareup.okhttp.Call call = repoGetPullRequestCommitsValidateBeforeCall(owner, repo, index, page, limit, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetPullRequestCommitsValidateBeforeCall(owner, repo, index, page, limit, verification, files, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -12865,12 +13593,15 @@ public class RepositoryApi { * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha a git ref or commit sha (required) + * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call repoGetSingleCommitCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetSingleCommitCall(String owner, String repo, String sha, Boolean stat, Boolean verification, Boolean files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -12881,6 +13612,12 @@ public class RepositoryApi { List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (stat != null) + localVarQueryParams.addAll(apiClient.parameterToPair("stat", stat)); + if (verification != null) + localVarQueryParams.addAll(apiClient.parameterToPair("verification", verification)); + if (files != null) + localVarQueryParams.addAll(apiClient.parameterToPair("files", files)); Map localVarHeaderParams = new HashMap(); @@ -12915,7 +13652,7 @@ public class RepositoryApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetSingleCommitValidateBeforeCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetSingleCommitValidateBeforeCall(String owner, String repo, String sha, Boolean stat, Boolean verification, Boolean files, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -12933,7 +13670,7 @@ public class RepositoryApi { } - com.squareup.okhttp.Call call = repoGetSingleCommitCall(owner, repo, sha, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetSingleCommitCall(owner, repo, sha, stat, verification, files, progressListener, progressRequestListener); return call; } @@ -12944,11 +13681,14 @@ public class RepositoryApi { * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha a git ref or commit sha (required) + * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @return Commit * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Commit repoGetSingleCommit(String owner, String repo, String sha) throws ApiException { - ApiResponse resp = repoGetSingleCommitWithHttpInfo(owner, repo, sha); + public Commit repoGetSingleCommit(String owner, String repo, String sha, Boolean stat, Boolean verification, Boolean files) throws ApiException { + ApiResponse resp = repoGetSingleCommitWithHttpInfo(owner, repo, sha, stat, verification, files); return resp.getData(); } @@ -12958,11 +13698,14 @@ public class RepositoryApi { * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha a git ref or commit sha (required) + * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @return ApiResponse<Commit> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetSingleCommitWithHttpInfo(String owner, String repo, String sha) throws ApiException { - com.squareup.okhttp.Call call = repoGetSingleCommitValidateBeforeCall(owner, repo, sha, null, null); + public ApiResponse repoGetSingleCommitWithHttpInfo(String owner, String repo, String sha, Boolean stat, Boolean verification, Boolean files) throws ApiException { + com.squareup.okhttp.Call call = repoGetSingleCommitValidateBeforeCall(owner, repo, sha, stat, verification, files, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -12973,11 +13716,14 @@ public class RepositoryApi { * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha a git ref or commit sha (required) + * @param stat include diff stats for every commit (disable for speedup, default 'true') (optional) + * @param verification include verification for every commit (disable for speedup, default 'true') (optional) + * @param files include a list of affected files for every commit (disable for speedup, default 'true') (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call repoGetSingleCommitAsync(String owner, String repo, String sha, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetSingleCommitAsync(String owner, String repo, String sha, Boolean stat, Boolean verification, Boolean files, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -12998,7 +13744,7 @@ public class RepositoryApi { }; } - com.squareup.okhttp.Call call = repoGetSingleCommitValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetSingleCommitValidateBeforeCall(owner, repo, sha, stat, verification, files, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -13583,6 +14329,157 @@ public class RepositoryApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for repoListActivityFeeds + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoListActivityFeedsCall(String owner, String repo, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/activities/feeds" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (date != null) + localVarQueryParams.addAll(apiClient.parameterToPair("date", date)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoListActivityFeedsValidateBeforeCall(String owner, String repo, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoListActivityFeeds(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoListActivityFeeds(Async)"); + } + + + com.squareup.okhttp.Call call = repoListActivityFeedsCall(owner, repo, date, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List a repository's activity feeds + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Activity> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List repoListActivityFeeds(String owner, String repo, LocalDate date, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = repoListActivityFeedsWithHttpInfo(owner, repo, date, page, limit); + return resp.getData(); + } + + /** + * List a repository's activity feeds + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Activity>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> repoListActivityFeedsWithHttpInfo(String owner, String repo, LocalDate date, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = repoListActivityFeedsValidateBeforeCall(owner, repo, date, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a repository's activity feeds (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoListActivityFeedsAsync(String owner, String repo, LocalDate date, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoListActivityFeedsValidateBeforeCall(owner, repo, date, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for repoListAllGitRefs * @param owner owner of the repo (required) @@ -14717,6 +15614,272 @@ public class RepositoryApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for repoListPinnedIssues + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoListPinnedIssuesCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issues/pinned" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoListPinnedIssuesValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoListPinnedIssues(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoListPinnedIssues(Async)"); + } + + + com.squareup.okhttp.Call call = repoListPinnedIssuesCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * List a repo's pinned issues + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return List<Issue> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List repoListPinnedIssues(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListPinnedIssuesWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * List a repo's pinned issues + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<List<Issue>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> repoListPinnedIssuesWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListPinnedIssuesValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a repo's pinned issues (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoListPinnedIssuesAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoListPinnedIssuesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoListPinnedPullRequests + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoListPinnedPullRequestsCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/pulls/pinned" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoListPinnedPullRequestsValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoListPinnedPullRequests(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoListPinnedPullRequests(Async)"); + } + + + com.squareup.okhttp.Call call = repoListPinnedPullRequestsCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * List a repo's pinned pull requests + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return List<PullRequest> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List repoListPinnedPullRequests(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListPinnedPullRequestsWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * List a repo's pinned pull requests + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<List<PullRequest>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> repoListPinnedPullRequestsWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListPinnedPullRequestsValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a repo's pinned pull requests (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoListPinnedPullRequestsAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoListPinnedPullRequestsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for repoListPullRequests * @param owner owner of the repo (required) @@ -16928,6 +18091,139 @@ public class RepositoryApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for repoNewPinAllowed + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoNewPinAllowedCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/new_pin_allowed" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoNewPinAllowedValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoNewPinAllowed(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoNewPinAllowed(Async)"); + } + + + com.squareup.okhttp.Call call = repoNewPinAllowedCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns if new Issue Pins are allowed + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return NewIssuePinsAllowed + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public NewIssuePinsAllowed repoNewPinAllowed(String owner, String repo) throws ApiException { + ApiResponse resp = repoNewPinAllowedWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * Returns if new Issue Pins are allowed + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<NewIssuePinsAllowed> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoNewPinAllowedWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoNewPinAllowedValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns if new Issue Pins are allowed (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoNewPinAllowedAsync(String owner, String repo, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoNewPinAllowedValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for repoPullRequestIsMerged * @param owner owner of the repo (required) @@ -18309,6 +19605,139 @@ public class RepositoryApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for repoUpdateAvatar + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoUpdateAvatarCall(String owner, String repo, UpdateRepoAvatarOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/avatar" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoUpdateAvatarValidateBeforeCall(String owner, String repo, UpdateRepoAvatarOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoUpdateAvatar(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoUpdateAvatar(Async)"); + } + + + com.squareup.okhttp.Call call = repoUpdateAvatarCall(owner, repo, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update avatar + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoUpdateAvatar(String owner, String repo, UpdateRepoAvatarOption body) throws ApiException { + repoUpdateAvatarWithHttpInfo(owner, repo, body); + } + + /** + * Update avatar + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoUpdateAvatarWithHttpInfo(String owner, String repo, UpdateRepoAvatarOption body) throws ApiException { + com.squareup.okhttp.Call call = repoUpdateAvatarValidateBeforeCall(owner, repo, body, null, null); + return apiClient.execute(call); + } + + /** + * Update avatar (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoUpdateAvatarAsync(String owner, String repo, UpdateRepoAvatarOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoUpdateAvatarValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for repoUpdateFile * @param owner owner of the repo (required) @@ -18739,6 +20168,139 @@ public class RepositoryApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for repoValidateIssueConfig + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call repoValidateIssueConfigCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/issue_config/validate" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoValidateIssueConfigValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling repoValidateIssueConfig(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoValidateIssueConfig(Async)"); + } + + + com.squareup.okhttp.Call call = repoValidateIssueConfigCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Returns the validation information for a issue config + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return IssueConfigValidation + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public IssueConfigValidation repoValidateIssueConfig(String owner, String repo) throws ApiException { + ApiResponse resp = repoValidateIssueConfigWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * Returns the validation information for a issue config + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<IssueConfigValidation> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoValidateIssueConfigWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoValidateIssueConfigValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Returns the validation information for a issue config (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call repoValidateIssueConfigAsync(String owner, String repo, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = repoValidateIssueConfigValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for topicSearch * @param q keywords to search (required) @@ -18875,6 +20437,149 @@ public class RepositoryApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for updateRepoSecret + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateRepoSecretCall(String owner, String repo, String secretname, CreateOrUpdateSecretOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/actions/secrets/{secretname}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "secretname" + "\\}", apiClient.escapeString(secretname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateRepoSecretValidateBeforeCall(String owner, String repo, String secretname, CreateOrUpdateSecretOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'owner' is set + if (owner == null) { + throw new ApiException("Missing the required parameter 'owner' when calling updateRepoSecret(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling updateRepoSecret(Async)"); + } + + // verify the required parameter 'secretname' is set + if (secretname == null) { + throw new ApiException("Missing the required parameter 'secretname' when calling updateRepoSecret(Async)"); + } + + + com.squareup.okhttp.Call call = updateRepoSecretCall(owner, repo, secretname, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create or Update a secret value in a repository + * + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateRepoSecret(String owner, String repo, String secretname, CreateOrUpdateSecretOption body) throws ApiException { + updateRepoSecretWithHttpInfo(owner, repo, secretname, body); + } + + /** + * Create or Update a secret value in a repository + * + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateRepoSecretWithHttpInfo(String owner, String repo, String secretname, CreateOrUpdateSecretOption body) throws ApiException { + com.squareup.okhttp.Call call = updateRepoSecretValidateBeforeCall(owner, repo, secretname, body, null, null); + return apiClient.execute(call); + } + + /** + * Create or Update a secret value in a repository (asynchronously) + * + * @param owner owner of the repository (required) + * @param repo name of the repository (required) + * @param secretname name of the secret (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateRepoSecretAsync(String owner, String repo, String secretname, CreateOrUpdateSecretOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateRepoSecretValidateBeforeCall(owner, repo, secretname, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for userCurrentCheckSubscription * @param owner owner of the repo (required) diff --git a/src/main/java/io/gitea/api/SettingsApi.java b/src/main/java/io/gitea/api/SettingsApi.java index 42994f8..3e6147d 100644 --- a/src/main/java/io/gitea/api/SettingsApi.java +++ b/src/main/java/io/gitea/api/SettingsApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/api/UserApi.java b/src/main/java/io/gitea/api/UserApi.java index 7673aee..343cb6d 100644 --- a/src/main/java/io/gitea/api/UserApi.java +++ b/src/main/java/io/gitea/api/UserApi.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -28,16 +28,22 @@ import java.io.IOException; import io.gitea.model.AccessToken; +import io.gitea.model.Activity; import io.gitea.model.CreateAccessTokenOption; import io.gitea.model.CreateEmailOption; import io.gitea.model.CreateGPGKeyOption; +import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; import io.gitea.model.CreateOAuth2ApplicationOptions; +import io.gitea.model.CreateOrUpdateSecretOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.DeleteEmailOption; +import io.gitea.model.EditHookOption; import io.gitea.model.Email; import io.gitea.model.GPGKey; +import io.gitea.model.Hook; import io.gitea.model.InlineResponse2001; +import org.threeten.bp.LocalDate; import io.gitea.model.OAuth2Application; import org.threeten.bp.OffsetDateTime; import io.gitea.model.PublicKey; @@ -45,6 +51,7 @@ import io.gitea.model.Repository; import io.gitea.model.StopWatch; import io.gitea.model.Team; import io.gitea.model.TrackedTime; +import io.gitea.model.UpdateUserAvatarOption; import io.gitea.model.User; import io.gitea.model.UserHeatmapData; import io.gitea.model.UserSettings; @@ -192,6 +199,125 @@ public class UserApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for deleteUserSecret + * @param secretname name of the secret (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call deleteUserSecretCall(String secretname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/actions/secrets/{secretname}" + .replaceAll("\\{" + "secretname" + "\\}", apiClient.escapeString(secretname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call deleteUserSecretValidateBeforeCall(String secretname, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'secretname' is set + if (secretname == null) { + throw new ApiException("Missing the required parameter 'secretname' when calling deleteUserSecret(Async)"); + } + + + com.squareup.okhttp.Call call = deleteUserSecretCall(secretname, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a secret in a user scope + * + * @param secretname name of the secret (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void deleteUserSecret(String secretname) throws ApiException { + deleteUserSecretWithHttpInfo(secretname); + } + + /** + * Delete a secret in a user scope + * + * @param secretname name of the secret (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse deleteUserSecretWithHttpInfo(String secretname) throws ApiException { + com.squareup.okhttp.Call call = deleteUserSecretValidateBeforeCall(secretname, null, null); + return apiClient.execute(call); + } + + /** + * Delete a secret in a user scope (asynchronously) + * + * @param secretname name of the secret (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call deleteUserSecretAsync(String secretname, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = deleteUserSecretValidateBeforeCall(secretname, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for getUserSettings * @param progressListener Progress listener @@ -418,6 +544,129 @@ public class UserApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for updateUserSecret + * @param secretname name of the secret (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call updateUserSecretCall(String secretname, CreateOrUpdateSecretOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/user/actions/secrets/{secretname}" + .replaceAll("\\{" + "secretname" + "\\}", apiClient.escapeString(secretname.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call updateUserSecretValidateBeforeCall(String secretname, CreateOrUpdateSecretOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'secretname' is set + if (secretname == null) { + throw new ApiException("Missing the required parameter 'secretname' when calling updateUserSecret(Async)"); + } + + + com.squareup.okhttp.Call call = updateUserSecretCall(secretname, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create or Update a secret value in a user scope + * + * @param secretname name of the secret (required) + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void updateUserSecret(String secretname, CreateOrUpdateSecretOption body) throws ApiException { + updateUserSecretWithHttpInfo(secretname, body); + } + + /** + * Create or Update a secret value in a user scope + * + * @param secretname name of the secret (required) + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse updateUserSecretWithHttpInfo(String secretname, CreateOrUpdateSecretOption body) throws ApiException { + com.squareup.okhttp.Call call = updateUserSecretValidateBeforeCall(secretname, body, null, null); + return apiClient.execute(call); + } + + /** + * Create or Update a secret value in a user scope (asynchronously) + * + * @param secretname name of the secret (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call updateUserSecretAsync(String secretname, CreateOrUpdateSecretOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = updateUserSecretValidateBeforeCall(secretname, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for updateUserSettings * @param body (optional) @@ -781,6 +1030,128 @@ public class UserApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for userCreateHook + * @param body (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userCreateHookCall(CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/user/hooks"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userCreateHookValidateBeforeCall(CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling userCreateHook(Async)"); + } + + + com.squareup.okhttp.Call call = userCreateHookCall(body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a hook + * + * @param body (required) + * @return Hook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Hook userCreateHook(CreateHookOption body) throws ApiException { + ApiResponse resp = userCreateHookWithHttpInfo(body); + return resp.getData(); + } + + /** + * Create a hook + * + * @param body (required) + * @return ApiResponse<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse userCreateHookWithHttpInfo(CreateHookOption body) throws ApiException { + com.squareup.okhttp.Call call = userCreateHookValidateBeforeCall(body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a hook (asynchronously) + * + * @param body (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userCreateHookAsync(CreateHookOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userCreateHookValidateBeforeCall(body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for userCreateOAuth2Application * @param body (required) @@ -906,14 +1277,14 @@ public class UserApi { /** * Build call for userCreateToken * @param username username of user (required) - * @param userCreateToken (optional) + * @param body (optional) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call userCreateTokenCall(String username, CreateAccessTokenOption userCreateToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = userCreateToken; + public com.squareup.okhttp.Call userCreateTokenCall(String username, CreateAccessTokenOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables String localVarPath = "/users/{username}/tokens" @@ -955,7 +1326,7 @@ public class UserApi { } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String username, CreateAccessTokenOption userCreateToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String username, CreateAccessTokenOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -963,7 +1334,7 @@ public class UserApi { } - com.squareup.okhttp.Call call = userCreateTokenCall(username, userCreateToken, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = userCreateTokenCall(username, body, progressListener, progressRequestListener); return call; } @@ -972,12 +1343,12 @@ public class UserApi { * Create an access token * * @param username username of user (required) - * @param userCreateToken (optional) + * @param body (optional) * @return AccessToken * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public AccessToken userCreateToken(String username, CreateAccessTokenOption userCreateToken) throws ApiException { - ApiResponse resp = userCreateTokenWithHttpInfo(username, userCreateToken); + public AccessToken userCreateToken(String username, CreateAccessTokenOption body) throws ApiException { + ApiResponse resp = userCreateTokenWithHttpInfo(username, body); return resp.getData(); } @@ -985,12 +1356,12 @@ public class UserApi { * Create an access token * * @param username username of user (required) - * @param userCreateToken (optional) + * @param body (optional) * @return ApiResponse<AccessToken> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse userCreateTokenWithHttpInfo(String username, CreateAccessTokenOption userCreateToken) throws ApiException { - com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, userCreateToken, null, null); + public ApiResponse userCreateTokenWithHttpInfo(String username, CreateAccessTokenOption body) throws ApiException { + com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, body, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -999,12 +1370,12 @@ public class UserApi { * Create an access token (asynchronously) * * @param username username of user (required) - * @param userCreateToken (optional) + * @param body (optional) * @param callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object */ - public com.squareup.okhttp.Call userCreateTokenAsync(String username, CreateAccessTokenOption userCreateToken, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call userCreateTokenAsync(String username, CreateAccessTokenOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1025,7 +1396,7 @@ public class UserApi { }; } - com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, userCreateToken, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, body, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -3639,6 +4010,115 @@ public class UserApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for userDeleteAvatar + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userDeleteAvatarCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/avatar"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userDeleteAvatarValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = userDeleteAvatarCall(progressListener, progressRequestListener); + return call; + + } + + /** + * Delete Avatar + * + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void userDeleteAvatar() throws ApiException { + userDeleteAvatarWithHttpInfo(); + } + + /** + * Delete Avatar + * + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse userDeleteAvatarWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = userDeleteAvatarValidateBeforeCall(null, null); + return apiClient.execute(call); + } + + /** + * Delete Avatar (asynchronously) + * + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userDeleteAvatarAsync(final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userDeleteAvatarValidateBeforeCall(progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for userDeleteEmail * @param body (optional) @@ -3752,6 +4232,125 @@ public class UserApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for userDeleteHook + * @param id id of the hook to delete (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userDeleteHookCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/hooks/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userDeleteHookValidateBeforeCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling userDeleteHook(Async)"); + } + + + com.squareup.okhttp.Call call = userDeleteHookCall(id, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a hook + * + * @param id id of the hook to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void userDeleteHook(Long id) throws ApiException { + userDeleteHookWithHttpInfo(id); + } + + /** + * Delete a hook + * + * @param id id of the hook to delete (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse userDeleteHookWithHttpInfo(Long id) throws ApiException { + com.squareup.okhttp.Call call = userDeleteHookValidateBeforeCall(id, null, null); + return apiClient.execute(call); + } + + /** + * Delete a hook (asynchronously) + * + * @param id id of the hook to delete (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userDeleteHookAsync(Long id, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userDeleteHookValidateBeforeCall(id, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for userDeleteOAuth2Application * @param id token to be deleted (required) @@ -3871,6 +4470,133 @@ public class UserApi { apiClient.executeAsync(call, callback); return call; } + /** + * Build call for userEditHook + * @param id id of the hook to update (required) + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userEditHookCall(Long id, EditHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/user/hooks/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userEditHookValidateBeforeCall(Long id, EditHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling userEditHook(Async)"); + } + + + com.squareup.okhttp.Call call = userEditHookCall(id, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a hook + * + * @param id id of the hook to update (required) + * @param body (optional) + * @return Hook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Hook userEditHook(Long id, EditHookOption body) throws ApiException { + ApiResponse resp = userEditHookWithHttpInfo(id, body); + return resp.getData(); + } + + /** + * Update a hook + * + * @param id id of the hook to update (required) + * @param body (optional) + * @return ApiResponse<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse userEditHookWithHttpInfo(Long id, EditHookOption body) throws ApiException { + com.squareup.okhttp.Call call = userEditHookValidateBeforeCall(id, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Update a hook (asynchronously) + * + * @param id id of the hook to update (required) + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userEditHookAsync(Long id, EditHookOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userEditHookValidateBeforeCall(id, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for userGet * @param username username of user to get (required) @@ -4230,6 +4956,129 @@ public class UserApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for userGetHook + * @param id id of the hook to get (required) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userGetHookCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/hooks/{id}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userGetHookValidateBeforeCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling userGetHook(Async)"); + } + + + com.squareup.okhttp.Call call = userGetHookCall(id, progressListener, progressRequestListener); + return call; + + } + + /** + * Get a hook + * + * @param id id of the hook to get (required) + * @return Hook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Hook userGetHook(Long id) throws ApiException { + ApiResponse resp = userGetHookWithHttpInfo(id); + return resp.getData(); + } + + /** + * Get a hook + * + * @param id id of the hook to get (required) + * @return ApiResponse<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse userGetHookWithHttpInfo(Long id) throws ApiException { + com.squareup.okhttp.Call call = userGetHookValidateBeforeCall(id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Get a hook (asynchronously) + * + * @param id id of the hook to get (required) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userGetHookAsync(Long id, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userGetHookValidateBeforeCall(id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for userGetOAuth2Application * @param id Application ID to be found (required) @@ -4738,6 +5587,153 @@ public class UserApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for userListActivityFeeds + * @param username username of user (required) + * @param onlyPerformedBy if true, only show actions performed by the requested user (optional) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userListActivityFeedsCall(String username, Boolean onlyPerformedBy, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/users/{username}/activities/feeds" + .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (onlyPerformedBy != null) + localVarQueryParams.addAll(apiClient.parameterToPair("only-performed-by", onlyPerformedBy)); + if (date != null) + localVarQueryParams.addAll(apiClient.parameterToPair("date", date)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userListActivityFeedsValidateBeforeCall(String username, Boolean onlyPerformedBy, LocalDate date, Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling userListActivityFeeds(Async)"); + } + + + com.squareup.okhttp.Call call = userListActivityFeedsCall(username, onlyPerformedBy, date, page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List a user's activity feeds + * + * @param username username of user (required) + * @param onlyPerformedBy if true, only show actions performed by the requested user (optional) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Activity> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List userListActivityFeeds(String username, Boolean onlyPerformedBy, LocalDate date, Integer page, Integer limit) throws ApiException { + ApiResponse> resp = userListActivityFeedsWithHttpInfo(username, onlyPerformedBy, date, page, limit); + return resp.getData(); + } + + /** + * List a user's activity feeds + * + * @param username username of user (required) + * @param onlyPerformedBy if true, only show actions performed by the requested user (optional) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Activity>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> userListActivityFeedsWithHttpInfo(String username, Boolean onlyPerformedBy, LocalDate date, Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = userListActivityFeedsValidateBeforeCall(username, onlyPerformedBy, date, page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a user's activity feeds (asynchronously) + * + * @param username username of user (required) + * @param onlyPerformedBy if true, only show actions performed by the requested user (optional) + * @param date the date of the activities to be found (optional) + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userListActivityFeedsAsync(String username, Boolean onlyPerformedBy, LocalDate date, Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userListActivityFeedsValidateBeforeCall(username, onlyPerformedBy, date, page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for userListEmails * @param progressListener Progress listener @@ -5256,6 +6252,131 @@ public class UserApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for userListHooks + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userListHooksCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/hooks"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userListHooksValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = userListHooksCall(page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List the authenticated user's webhooks + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return List<Hook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List userListHooks(Integer page, Integer limit) throws ApiException { + ApiResponse> resp = userListHooksWithHttpInfo(page, limit); + return resp.getData(); + } + + /** + * List the authenticated user's webhooks + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @return ApiResponse<List<Hook>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> userListHooksWithHttpInfo(Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = userListHooksValidateBeforeCall(page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List the authenticated user's webhooks (asynchronously) + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userListHooksAsync(Integer page, Integer limit, final ApiCallback> callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userListHooksValidateBeforeCall(page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for userListKeys * @param username username of user (required) @@ -6064,6 +7185,119 @@ public class UserApi { apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for userUpdateAvatar + * @param body (optional) + * @param progressListener Progress listener + * @param progressRequestListener Progress request listener + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + */ + public com.squareup.okhttp.Call userUpdateAvatarCall(UpdateUserAvatarOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/user/avatar"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + + Map localVarHeaderParams = new HashMap(); + + Map localVarFormParams = new HashMap(); + + final String[] localVarAccepts = { + "application/json" + }; + final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); + if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); + + final String[] localVarContentTypes = { + "application/json", "text/plain" + }; + final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); + localVarHeaderParams.put("Content-Type", localVarContentType); + + if(progressListener != null) { + apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() { + @Override + public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException { + com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request()); + return originalResponse.newBuilder() + .body(new ProgressResponseBody(originalResponse.body(), progressListener)) + .build(); + } + }); + } + + String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userUpdateAvatarValidateBeforeCall(UpdateUserAvatarOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = userUpdateAvatarCall(body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update Avatar + * + * @param body (optional) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void userUpdateAvatar(UpdateUserAvatarOption body) throws ApiException { + userUpdateAvatarWithHttpInfo(body); + } + + /** + * Update Avatar + * + * @param body (optional) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse userUpdateAvatarWithHttpInfo(UpdateUserAvatarOption body) throws ApiException { + com.squareup.okhttp.Call call = userUpdateAvatarValidateBeforeCall(body, null, null); + return apiClient.execute(call); + } + + /** + * Update Avatar (asynchronously) + * + * @param body (optional) + * @param callback The callback to be executed when the API call finishes + * @return The request call + * @throws ApiException If fail to process the API call, e.g. serializing the request body object + */ + public com.squareup.okhttp.Call userUpdateAvatarAsync(UpdateUserAvatarOption body, final ApiCallback callback) throws ApiException { + + ProgressResponseBody.ProgressListener progressListener = null; + ProgressRequestBody.ProgressRequestListener progressRequestListener = null; + + if (callback != null) { + progressListener = new ProgressResponseBody.ProgressListener() { + @Override + public void update(long bytesRead, long contentLength, boolean done) { + callback.onDownloadProgress(bytesRead, contentLength, done); + } + }; + + progressRequestListener = new ProgressRequestBody.ProgressRequestListener() { + @Override + public void onRequestProgress(long bytesWritten, long contentLength, boolean done) { + callback.onUploadProgress(bytesWritten, contentLength, done); + } + }; + } + + com.squareup.okhttp.Call call = userUpdateAvatarValidateBeforeCall(body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for userUpdateOAuth2Application * @param id application to be updated (required) diff --git a/src/main/java/io/gitea/model/APIError.java b/src/main/java/io/gitea/model/APIError.java index d96c94e..908a7b5 100644 --- a/src/main/java/io/gitea/model/APIError.java +++ b/src/main/java/io/gitea/model/APIError.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/AccessToken.java b/src/main/java/io/gitea/model/AccessToken.java index 1be575f..ee1aa9e 100644 --- a/src/main/java/io/gitea/model/AccessToken.java +++ b/src/main/java/io/gitea/model/AccessToken.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -23,6 +23,8 @@ import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; /** * AccessToken @@ -35,6 +37,9 @@ public class AccessToken { @SerializedName("name") private String name = null; + @SerializedName("scopes") + private List scopes = null; + @SerializedName("sha1") private String sha1 = null; @@ -77,6 +82,32 @@ public class AccessToken { this.name = name; } + public AccessToken scopes(List scopes) { + this.scopes = scopes; + return this; + } + + public AccessToken addScopesItem(String scopesItem) { + if (this.scopes == null) { + this.scopes = new ArrayList(); + } + this.scopes.add(scopesItem); + return this; + } + + /** + * Get scopes + * @return scopes + **/ + @ApiModelProperty(value = "") + public List getScopes() { + return scopes; + } + + public void setScopes(List scopes) { + this.scopes = scopes; + } + public AccessToken sha1(String sha1) { this.sha1 = sha1; return this; @@ -125,13 +156,14 @@ public class AccessToken { AccessToken accessToken = (AccessToken) o; return Objects.equals(this.id, accessToken.id) && Objects.equals(this.name, accessToken.name) && + Objects.equals(this.scopes, accessToken.scopes) && Objects.equals(this.sha1, accessToken.sha1) && Objects.equals(this.tokenLastEight, accessToken.tokenLastEight); } @Override public int hashCode() { - return Objects.hash(id, name, sha1, tokenLastEight); + return Objects.hash(id, name, scopes, sha1, tokenLastEight); } @@ -142,6 +174,7 @@ public class AccessToken { sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n"); sb.append(" tokenLastEight: ").append(toIndentedString(tokenLastEight)).append("\n"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/Activity.java b/src/main/java/io/gitea/model/Activity.java new file mode 100644 index 0000000..24d234a --- /dev/null +++ b/src/main/java/io/gitea/model/Activity.java @@ -0,0 +1,374 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.gitea.model.Comment; +import io.gitea.model.Repository; +import io.gitea.model.User; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * Activity + */ + +public class Activity { + @SerializedName("act_user") + private User actUser = null; + + @SerializedName("act_user_id") + private Long actUserId = null; + + @SerializedName("comment") + private Comment comment = null; + + @SerializedName("comment_id") + private Long commentId = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("created") + private OffsetDateTime created = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("is_private") + private Boolean isPrivate = null; + + @SerializedName("op_type") + private String opType = null; + + @SerializedName("ref_name") + private String refName = null; + + @SerializedName("repo") + private Repository repo = null; + + @SerializedName("repo_id") + private Long repoId = null; + + @SerializedName("user_id") + private Long userId = null; + + public Activity actUser(User actUser) { + this.actUser = actUser; + return this; + } + + /** + * Get actUser + * @return actUser + **/ + @ApiModelProperty(value = "") + public User getActUser() { + return actUser; + } + + public void setActUser(User actUser) { + this.actUser = actUser; + } + + public Activity actUserId(Long actUserId) { + this.actUserId = actUserId; + return this; + } + + /** + * Get actUserId + * @return actUserId + **/ + @ApiModelProperty(value = "") + public Long getActUserId() { + return actUserId; + } + + public void setActUserId(Long actUserId) { + this.actUserId = actUserId; + } + + public Activity comment(Comment comment) { + this.comment = comment; + return this; + } + + /** + * Get comment + * @return comment + **/ + @ApiModelProperty(value = "") + public Comment getComment() { + return comment; + } + + public void setComment(Comment comment) { + this.comment = comment; + } + + public Activity commentId(Long commentId) { + this.commentId = commentId; + return this; + } + + /** + * Get commentId + * @return commentId + **/ + @ApiModelProperty(value = "") + public Long getCommentId() { + return commentId; + } + + public void setCommentId(Long commentId) { + this.commentId = commentId; + } + + public Activity content(String content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public Activity created(OffsetDateTime created) { + this.created = created; + return this; + } + + /** + * Get created + * @return created + **/ + @ApiModelProperty(value = "") + public OffsetDateTime getCreated() { + return created; + } + + public void setCreated(OffsetDateTime created) { + this.created = created; + } + + public Activity id(Long id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @ApiModelProperty(value = "") + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public Activity isPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + return this; + } + + /** + * Get isPrivate + * @return isPrivate + **/ + @ApiModelProperty(value = "") + public Boolean isIsPrivate() { + return isPrivate; + } + + public void setIsPrivate(Boolean isPrivate) { + this.isPrivate = isPrivate; + } + + public Activity opType(String opType) { + this.opType = opType; + return this; + } + + /** + * Get opType + * @return opType + **/ + @ApiModelProperty(value = "") + public String getOpType() { + return opType; + } + + public void setOpType(String opType) { + this.opType = opType; + } + + public Activity refName(String refName) { + this.refName = refName; + return this; + } + + /** + * Get refName + * @return refName + **/ + @ApiModelProperty(value = "") + public String getRefName() { + return refName; + } + + public void setRefName(String refName) { + this.refName = refName; + } + + public Activity repo(Repository repo) { + this.repo = repo; + return this; + } + + /** + * Get repo + * @return repo + **/ + @ApiModelProperty(value = "") + public Repository getRepo() { + return repo; + } + + public void setRepo(Repository repo) { + this.repo = repo; + } + + public Activity repoId(Long repoId) { + this.repoId = repoId; + return this; + } + + /** + * Get repoId + * @return repoId + **/ + @ApiModelProperty(value = "") + public Long getRepoId() { + return repoId; + } + + public void setRepoId(Long repoId) { + this.repoId = repoId; + } + + public Activity userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @ApiModelProperty(value = "") + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Activity activity = (Activity) o; + return Objects.equals(this.actUser, activity.actUser) && + Objects.equals(this.actUserId, activity.actUserId) && + Objects.equals(this.comment, activity.comment) && + Objects.equals(this.commentId, activity.commentId) && + Objects.equals(this.content, activity.content) && + Objects.equals(this.created, activity.created) && + Objects.equals(this.id, activity.id) && + Objects.equals(this.isPrivate, activity.isPrivate) && + Objects.equals(this.opType, activity.opType) && + Objects.equals(this.refName, activity.refName) && + Objects.equals(this.repo, activity.repo) && + Objects.equals(this.repoId, activity.repoId) && + Objects.equals(this.userId, activity.userId); + } + + @Override + public int hashCode() { + return Objects.hash(actUser, actUserId, comment, commentId, content, created, id, isPrivate, opType, refName, repo, repoId, userId); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Activity {\n"); + + sb.append(" actUser: ").append(toIndentedString(actUser)).append("\n"); + sb.append(" actUserId: ").append(toIndentedString(actUserId)).append("\n"); + sb.append(" comment: ").append(toIndentedString(comment)).append("\n"); + sb.append(" commentId: ").append(toIndentedString(commentId)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isPrivate: ").append(toIndentedString(isPrivate)).append("\n"); + sb.append(" opType: ").append(toIndentedString(opType)).append("\n"); + sb.append(" refName: ").append(toIndentedString(refName)).append("\n"); + sb.append(" repo: ").append(toIndentedString(repo)).append("\n"); + sb.append(" repoId: ").append(toIndentedString(repoId)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/ActivityPub.java b/src/main/java/io/gitea/model/ActivityPub.java index bc6038b..99a2f84 100644 --- a/src/main/java/io/gitea/model/ActivityPub.java +++ b/src/main/java/io/gitea/model/ActivityPub.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/AddCollaboratorOption.java b/src/main/java/io/gitea/model/AddCollaboratorOption.java index 0d38761..2236d02 100644 --- a/src/main/java/io/gitea/model/AddCollaboratorOption.java +++ b/src/main/java/io/gitea/model/AddCollaboratorOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/AddTimeOption.java b/src/main/java/io/gitea/model/AddTimeOption.java index f5eed34..f29f2ec 100644 --- a/src/main/java/io/gitea/model/AddTimeOption.java +++ b/src/main/java/io/gitea/model/AddTimeOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/AnnotatedTag.java b/src/main/java/io/gitea/model/AnnotatedTag.java index 21aa2f2..8de5563 100644 --- a/src/main/java/io/gitea/model/AnnotatedTag.java +++ b/src/main/java/io/gitea/model/AnnotatedTag.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/AnnotatedTagObject.java b/src/main/java/io/gitea/model/AnnotatedTagObject.java index 919f026..ef46ad7 100644 --- a/src/main/java/io/gitea/model/AnnotatedTagObject.java +++ b/src/main/java/io/gitea/model/AnnotatedTagObject.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Attachment.java b/src/main/java/io/gitea/model/Attachment.java index ddfe11c..296f3a8 100644 --- a/src/main/java/io/gitea/model/Attachment.java +++ b/src/main/java/io/gitea/model/Attachment.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Branch.java b/src/main/java/io/gitea/model/Branch.java index 846f52b..943d0b7 100644 --- a/src/main/java/io/gitea/model/Branch.java +++ b/src/main/java/io/gitea/model/Branch.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/BranchProtection.java b/src/main/java/io/gitea/model/BranchProtection.java index 6965a54..af8c9c2 100644 --- a/src/main/java/io/gitea/model/BranchProtection.java +++ b/src/main/java/io/gitea/model/BranchProtection.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -96,6 +96,9 @@ public class BranchProtection { @SerializedName("required_approvals") private Long requiredApprovals = null; + @SerializedName("rule_name") + private String ruleName = null; + @SerializedName("status_check_contexts") private List statusCheckContexts = null; @@ -217,10 +220,10 @@ public class BranchProtection { } /** - * Get branchName + * Deprecated: true * @return branchName **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "Deprecated: true") public String getBranchName() { return branchName; } @@ -531,6 +534,24 @@ public class BranchProtection { this.requiredApprovals = requiredApprovals; } + public BranchProtection ruleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get ruleName + * @return ruleName + **/ + @ApiModelProperty(value = "") + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + public BranchProtection statusCheckContexts(List statusCheckContexts) { this.statusCheckContexts = statusCheckContexts; return this; @@ -624,6 +645,7 @@ public class BranchProtection { Objects.equals(this.pushWhitelistUsernames, branchProtection.pushWhitelistUsernames) && Objects.equals(this.requireSignedCommits, branchProtection.requireSignedCommits) && Objects.equals(this.requiredApprovals, branchProtection.requiredApprovals) && + Objects.equals(this.ruleName, branchProtection.ruleName) && Objects.equals(this.statusCheckContexts, branchProtection.statusCheckContexts) && Objects.equals(this.unprotectedFilePatterns, branchProtection.unprotectedFilePatterns) && Objects.equals(this.updatedAt, branchProtection.updatedAt); @@ -631,7 +653,7 @@ public class BranchProtection { @Override public int hashCode() { - return Objects.hash(approvalsWhitelistTeams, approvalsWhitelistUsername, blockOnOfficialReviewRequests, blockOnOutdatedBranch, blockOnRejectedReviews, branchName, createdAt, dismissStaleApprovals, enableApprovalsWhitelist, enableMergeWhitelist, enablePush, enablePushWhitelist, enableStatusCheck, mergeWhitelistTeams, mergeWhitelistUsernames, protectedFilePatterns, pushWhitelistDeployKeys, pushWhitelistTeams, pushWhitelistUsernames, requireSignedCommits, requiredApprovals, statusCheckContexts, unprotectedFilePatterns, updatedAt); + return Objects.hash(approvalsWhitelistTeams, approvalsWhitelistUsername, blockOnOfficialReviewRequests, blockOnOutdatedBranch, blockOnRejectedReviews, branchName, createdAt, dismissStaleApprovals, enableApprovalsWhitelist, enableMergeWhitelist, enablePush, enablePushWhitelist, enableStatusCheck, mergeWhitelistTeams, mergeWhitelistUsernames, protectedFilePatterns, pushWhitelistDeployKeys, pushWhitelistTeams, pushWhitelistUsernames, requireSignedCommits, requiredApprovals, ruleName, statusCheckContexts, unprotectedFilePatterns, updatedAt); } @@ -661,6 +683,7 @@ public class BranchProtection { sb.append(" pushWhitelistUsernames: ").append(toIndentedString(pushWhitelistUsernames)).append("\n"); sb.append(" requireSignedCommits: ").append(toIndentedString(requireSignedCommits)).append("\n"); sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n"); + sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); sb.append(" statusCheckContexts: ").append(toIndentedString(statusCheckContexts)).append("\n"); sb.append(" unprotectedFilePatterns: ").append(toIndentedString(unprotectedFilePatterns)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); diff --git a/src/main/java/io/gitea/model/ChangeFileOperation.java b/src/main/java/io/gitea/model/ChangeFileOperation.java new file mode 100644 index 0000000..0c647b4 --- /dev/null +++ b/src/main/java/io/gitea/model/ChangeFileOperation.java @@ -0,0 +1,236 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ChangeFileOperation for creating, updating or deleting a file + */ +@ApiModel(description = "ChangeFileOperation for creating, updating or deleting a file") + +public class ChangeFileOperation { + @SerializedName("content") + private String content = null; + + @SerializedName("from_path") + private String fromPath = null; + + /** + * indicates what to do with the file + */ + @JsonAdapter(OperationEnum.Adapter.class) + public enum OperationEnum { + CREATE("create"), + + UPDATE("update"), + + DELETE("delete"); + + private String value; + + OperationEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static OperationEnum fromValue(String text) { + for (OperationEnum b : OperationEnum.values()) { + if (String.valueOf(b.value).equals(text)) { + return b; + } + } + return null; + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final OperationEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public OperationEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return OperationEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("operation") + private OperationEnum operation = null; + + @SerializedName("path") + private String path = null; + + @SerializedName("sha") + private String sha = null; + + public ChangeFileOperation content(String content) { + this.content = content; + return this; + } + + /** + * new or updated file content, must be base64 encoded + * @return content + **/ + @ApiModelProperty(value = "new or updated file content, must be base64 encoded") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public ChangeFileOperation fromPath(String fromPath) { + this.fromPath = fromPath; + return this; + } + + /** + * old path of the file to move + * @return fromPath + **/ + @ApiModelProperty(value = "old path of the file to move") + public String getFromPath() { + return fromPath; + } + + public void setFromPath(String fromPath) { + this.fromPath = fromPath; + } + + public ChangeFileOperation operation(OperationEnum operation) { + this.operation = operation; + return this; + } + + /** + * indicates what to do with the file + * @return operation + **/ + @ApiModelProperty(required = true, value = "indicates what to do with the file") + public OperationEnum getOperation() { + return operation; + } + + public void setOperation(OperationEnum operation) { + this.operation = operation; + } + + public ChangeFileOperation path(String path) { + this.path = path; + return this; + } + + /** + * path to the existing or new file + * @return path + **/ + @ApiModelProperty(required = true, value = "path to the existing or new file") + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public ChangeFileOperation sha(String sha) { + this.sha = sha; + return this; + } + + /** + * sha is the SHA for the file that already exists, required for update or delete + * @return sha + **/ + @ApiModelProperty(value = "sha is the SHA for the file that already exists, required for update or delete") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeFileOperation changeFileOperation = (ChangeFileOperation) o; + return Objects.equals(this.content, changeFileOperation.content) && + Objects.equals(this.fromPath, changeFileOperation.fromPath) && + Objects.equals(this.operation, changeFileOperation.operation) && + Objects.equals(this.path, changeFileOperation.path) && + Objects.equals(this.sha, changeFileOperation.sha); + } + + @Override + public int hashCode() { + return Objects.hash(content, fromPath, operation, path, sha); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeFileOperation {\n"); + + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" fromPath: ").append(toIndentedString(fromPath)).append("\n"); + sb.append(" operation: ").append(toIndentedString(operation)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/ChangeFilesOptions.java b/src/main/java/io/gitea/model/ChangeFilesOptions.java new file mode 100644 index 0000000..4ffb2f7 --- /dev/null +++ b/src/main/java/io/gitea/model/ChangeFilesOptions.java @@ -0,0 +1,266 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.gitea.model.ChangeFileOperation; +import io.gitea.model.CommitDateOptions; +import io.gitea.model.Identity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * 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) + */ +@ApiModel(description = "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)") + +public class ChangeFilesOptions { + @SerializedName("author") + private Identity author = null; + + @SerializedName("branch") + private String branch = null; + + @SerializedName("committer") + private Identity committer = null; + + @SerializedName("dates") + private CommitDateOptions dates = null; + + @SerializedName("files") + private List files = new ArrayList(); + + @SerializedName("message") + private String message = null; + + @SerializedName("new_branch") + private String newBranch = null; + + @SerializedName("signoff") + private Boolean signoff = null; + + public ChangeFilesOptions author(Identity author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + **/ + @ApiModelProperty(value = "") + public Identity getAuthor() { + return author; + } + + public void setAuthor(Identity author) { + this.author = author; + } + + public ChangeFilesOptions branch(String branch) { + this.branch = branch; + return this; + } + + /** + * branch (optional) to base this file from. if not given, the default branch is used + * @return branch + **/ + @ApiModelProperty(value = "branch (optional) to base this file from. if not given, the default branch is used") + public String getBranch() { + return branch; + } + + public void setBranch(String branch) { + this.branch = branch; + } + + public ChangeFilesOptions committer(Identity committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + **/ + @ApiModelProperty(value = "") + public Identity getCommitter() { + return committer; + } + + public void setCommitter(Identity committer) { + this.committer = committer; + } + + public ChangeFilesOptions dates(CommitDateOptions dates) { + this.dates = dates; + return this; + } + + /** + * Get dates + * @return dates + **/ + @ApiModelProperty(value = "") + public CommitDateOptions getDates() { + return dates; + } + + public void setDates(CommitDateOptions dates) { + this.dates = dates; + } + + public ChangeFilesOptions files(List files) { + this.files = files; + return this; + } + + public ChangeFilesOptions addFilesItem(ChangeFileOperation filesItem) { + this.files.add(filesItem); + return this; + } + + /** + * list of file operations + * @return files + **/ + @ApiModelProperty(required = true, value = "list of file operations") + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + public ChangeFilesOptions message(String message) { + this.message = message; + return this; + } + + /** + * message (optional) for the commit of this file. if not supplied, a default message will be used + * @return message + **/ + @ApiModelProperty(value = "message (optional) for the commit of this file. if not supplied, a default message will be used") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public ChangeFilesOptions newBranch(String newBranch) { + this.newBranch = newBranch; + return this; + } + + /** + * new_branch (optional) will make a new branch from `branch` before creating the file + * @return newBranch + **/ + @ApiModelProperty(value = "new_branch (optional) will make a new branch from `branch` before creating the file") + public String getNewBranch() { + return newBranch; + } + + public void setNewBranch(String newBranch) { + this.newBranch = newBranch; + } + + public ChangeFilesOptions signoff(Boolean signoff) { + this.signoff = signoff; + return this; + } + + /** + * Add a Signed-off-by trailer by the committer at the end of the commit log message. + * @return signoff + **/ + @ApiModelProperty(value = "Add a Signed-off-by trailer by the committer at the end of the commit log message.") + public Boolean isSignoff() { + return signoff; + } + + public void setSignoff(Boolean signoff) { + this.signoff = signoff; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChangeFilesOptions changeFilesOptions = (ChangeFilesOptions) o; + return Objects.equals(this.author, changeFilesOptions.author) && + Objects.equals(this.branch, changeFilesOptions.branch) && + Objects.equals(this.committer, changeFilesOptions.committer) && + Objects.equals(this.dates, changeFilesOptions.dates) && + Objects.equals(this.files, changeFilesOptions.files) && + Objects.equals(this.message, changeFilesOptions.message) && + Objects.equals(this.newBranch, changeFilesOptions.newBranch) && + Objects.equals(this.signoff, changeFilesOptions.signoff); + } + + @Override + public int hashCode() { + return Objects.hash(author, branch, committer, dates, files, message, newBranch, signoff); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ChangeFilesOptions {\n"); + + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" branch: ").append(toIndentedString(branch)).append("\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" dates: ").append(toIndentedString(dates)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" newBranch: ").append(toIndentedString(newBranch)).append("\n"); + sb.append(" signoff: ").append(toIndentedString(signoff)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/ChangedFile.java b/src/main/java/io/gitea/model/ChangedFile.java index 5019002..5aad923 100644 --- a/src/main/java/io/gitea/model/ChangedFile.java +++ b/src/main/java/io/gitea/model/ChangedFile.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CombinedStatus.java b/src/main/java/io/gitea/model/CombinedStatus.java index 26a0c19..52c1d26 100644 --- a/src/main/java/io/gitea/model/CombinedStatus.java +++ b/src/main/java/io/gitea/model/CombinedStatus.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Comment.java b/src/main/java/io/gitea/model/Comment.java index 5c0ec73..43992d8 100644 --- a/src/main/java/io/gitea/model/Comment.java +++ b/src/main/java/io/gitea/model/Comment.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -20,10 +20,13 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.gitea.model.Attachment; import io.gitea.model.User; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; import org.threeten.bp.OffsetDateTime; /** @@ -32,6 +35,9 @@ import org.threeten.bp.OffsetDateTime; @ApiModel(description = "Comment represents a comment on a commit or issue") public class Comment { + @SerializedName("assets") + private List assets = null; + @SerializedName("body") private String body = null; @@ -62,6 +68,32 @@ public class Comment { @SerializedName("user") private User user = null; + public Comment assets(List assets) { + this.assets = assets; + return this; + } + + public Comment addAssetsItem(Attachment assetsItem) { + if (this.assets == null) { + this.assets = new ArrayList(); + } + this.assets.add(assetsItem); + return this; + } + + /** + * Get assets + * @return assets + **/ + @ApiModelProperty(value = "") + public List getAssets() { + return assets; + } + + public void setAssets(List assets) { + this.assets = assets; + } + public Comment body(String body) { this.body = body; return this; @@ -252,7 +284,8 @@ public class Comment { return false; } Comment comment = (Comment) o; - return Objects.equals(this.body, comment.body) && + return Objects.equals(this.assets, comment.assets) && + Objects.equals(this.body, comment.body) && Objects.equals(this.createdAt, comment.createdAt) && Objects.equals(this.htmlUrl, comment.htmlUrl) && Objects.equals(this.id, comment.id) && @@ -266,7 +299,7 @@ public class Comment { @Override public int hashCode() { - return Objects.hash(body, createdAt, htmlUrl, id, issueUrl, originalAuthor, originalAuthorId, pullRequestUrl, updatedAt, user); + return Objects.hash(assets, body, createdAt, htmlUrl, id, issueUrl, originalAuthor, originalAuthorId, pullRequestUrl, updatedAt, user); } @@ -275,6 +308,7 @@ public class Comment { StringBuilder sb = new StringBuilder(); sb.append("class Comment {\n"); + sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); diff --git a/src/main/java/io/gitea/model/Commit.java b/src/main/java/io/gitea/model/Commit.java index 53665e3..bee5812 100644 --- a/src/main/java/io/gitea/model/Commit.java +++ b/src/main/java/io/gitea/model/Commit.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CommitAffectedFiles.java b/src/main/java/io/gitea/model/CommitAffectedFiles.java index 287b63f..fbbe2dd 100644 --- a/src/main/java/io/gitea/model/CommitAffectedFiles.java +++ b/src/main/java/io/gitea/model/CommitAffectedFiles.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -33,6 +33,9 @@ public class CommitAffectedFiles { @SerializedName("filename") private String filename = null; + @SerializedName("status") + private String status = null; + public CommitAffectedFiles filename(String filename) { this.filename = filename; return this; @@ -51,6 +54,24 @@ public class CommitAffectedFiles { this.filename = filename; } + public CommitAffectedFiles status(String status) { + this.status = status; + return this; + } + + /** + * Get status + * @return status + **/ + @ApiModelProperty(value = "") + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + @Override public boolean equals(java.lang.Object o) { @@ -61,12 +82,13 @@ public class CommitAffectedFiles { return false; } CommitAffectedFiles commitAffectedFiles = (CommitAffectedFiles) o; - return Objects.equals(this.filename, commitAffectedFiles.filename); + return Objects.equals(this.filename, commitAffectedFiles.filename) && + Objects.equals(this.status, commitAffectedFiles.status); } @Override public int hashCode() { - return Objects.hash(filename); + return Objects.hash(filename, status); } @@ -76,6 +98,7 @@ public class CommitAffectedFiles { sb.append("class CommitAffectedFiles {\n"); sb.append(" filename: ").append(toIndentedString(filename)).append("\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/CommitDateOptions.java b/src/main/java/io/gitea/model/CommitDateOptions.java index 928e9e2..3e7b739 100644 --- a/src/main/java/io/gitea/model/CommitDateOptions.java +++ b/src/main/java/io/gitea/model/CommitDateOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CommitMeta.java b/src/main/java/io/gitea/model/CommitMeta.java index 9d5a7ce..a06da19 100644 --- a/src/main/java/io/gitea/model/CommitMeta.java +++ b/src/main/java/io/gitea/model/CommitMeta.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CommitStats.java b/src/main/java/io/gitea/model/CommitStats.java index af6f5ed..47eb3a4 100644 --- a/src/main/java/io/gitea/model/CommitStats.java +++ b/src/main/java/io/gitea/model/CommitStats.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CommitStatus.java b/src/main/java/io/gitea/model/CommitStatus.java index 5e818af..06d0cf6 100644 --- a/src/main/java/io/gitea/model/CommitStatus.java +++ b/src/main/java/io/gitea/model/CommitStatus.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CommitUser.java b/src/main/java/io/gitea/model/CommitUser.java index bbabea3..fb99d63 100644 --- a/src/main/java/io/gitea/model/CommitUser.java +++ b/src/main/java/io/gitea/model/CommitUser.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/ContentsResponse.java b/src/main/java/io/gitea/model/ContentsResponse.java index 939dc59..56f27dd 100644 --- a/src/main/java/io/gitea/model/ContentsResponse.java +++ b/src/main/java/io/gitea/model/ContentsResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateAccessTokenOption.java b/src/main/java/io/gitea/model/CreateAccessTokenOption.java index b23ee24..27ca100 100644 --- a/src/main/java/io/gitea/model/CreateAccessTokenOption.java +++ b/src/main/java/io/gitea/model/CreateAccessTokenOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -23,6 +23,8 @@ import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; /** * CreateAccessTokenOption options when create access token @@ -33,6 +35,9 @@ public class CreateAccessTokenOption { @SerializedName("name") private String name = null; + @SerializedName("scopes") + private List scopes = null; + public CreateAccessTokenOption name(String name) { this.name = name; return this; @@ -42,7 +47,7 @@ public class CreateAccessTokenOption { * Get name * @return name **/ - @ApiModelProperty(value = "") + @ApiModelProperty(required = true, value = "") public String getName() { return name; } @@ -51,6 +56,32 @@ public class CreateAccessTokenOption { this.name = name; } + public CreateAccessTokenOption scopes(List scopes) { + this.scopes = scopes; + return this; + } + + public CreateAccessTokenOption addScopesItem(String scopesItem) { + if (this.scopes == null) { + this.scopes = new ArrayList(); + } + this.scopes.add(scopesItem); + return this; + } + + /** + * Get scopes + * @return scopes + **/ + @ApiModelProperty(value = "") + public List getScopes() { + return scopes; + } + + public void setScopes(List scopes) { + this.scopes = scopes; + } + @Override public boolean equals(java.lang.Object o) { @@ -61,12 +92,13 @@ public class CreateAccessTokenOption { return false; } CreateAccessTokenOption createAccessTokenOption = (CreateAccessTokenOption) o; - return Objects.equals(this.name, createAccessTokenOption.name); + return Objects.equals(this.name, createAccessTokenOption.name) && + Objects.equals(this.scopes, createAccessTokenOption.scopes); } @Override public int hashCode() { - return Objects.hash(name); + return Objects.hash(name, scopes); } @@ -76,6 +108,7 @@ public class CreateAccessTokenOption { sb.append("class CreateAccessTokenOption {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/CreateBranchProtectionOption.java b/src/main/java/io/gitea/model/CreateBranchProtectionOption.java index 398a7a5..4eecae8 100644 --- a/src/main/java/io/gitea/model/CreateBranchProtectionOption.java +++ b/src/main/java/io/gitea/model/CreateBranchProtectionOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -92,6 +92,9 @@ public class CreateBranchProtectionOption { @SerializedName("required_approvals") private Long requiredApprovals = null; + @SerializedName("rule_name") + private String ruleName = null; + @SerializedName("status_check_contexts") private List statusCheckContexts = null; @@ -210,10 +213,10 @@ public class CreateBranchProtectionOption { } /** - * Get branchName + * Deprecated: true * @return branchName **/ - @ApiModelProperty(value = "") + @ApiModelProperty(value = "Deprecated: true") public String getBranchName() { return branchName; } @@ -506,6 +509,24 @@ public class CreateBranchProtectionOption { this.requiredApprovals = requiredApprovals; } + public CreateBranchProtectionOption ruleName(String ruleName) { + this.ruleName = ruleName; + return this; + } + + /** + * Get ruleName + * @return ruleName + **/ + @ApiModelProperty(value = "") + public String getRuleName() { + return ruleName; + } + + public void setRuleName(String ruleName) { + this.ruleName = ruleName; + } + public CreateBranchProtectionOption statusCheckContexts(List statusCheckContexts) { this.statusCheckContexts = statusCheckContexts; return this; @@ -580,13 +601,14 @@ public class CreateBranchProtectionOption { Objects.equals(this.pushWhitelistUsernames, createBranchProtectionOption.pushWhitelistUsernames) && Objects.equals(this.requireSignedCommits, createBranchProtectionOption.requireSignedCommits) && Objects.equals(this.requiredApprovals, createBranchProtectionOption.requiredApprovals) && + Objects.equals(this.ruleName, createBranchProtectionOption.ruleName) && Objects.equals(this.statusCheckContexts, createBranchProtectionOption.statusCheckContexts) && Objects.equals(this.unprotectedFilePatterns, createBranchProtectionOption.unprotectedFilePatterns); } @Override public int hashCode() { - return Objects.hash(approvalsWhitelistTeams, approvalsWhitelistUsername, blockOnOfficialReviewRequests, blockOnOutdatedBranch, blockOnRejectedReviews, branchName, dismissStaleApprovals, enableApprovalsWhitelist, enableMergeWhitelist, enablePush, enablePushWhitelist, enableStatusCheck, mergeWhitelistTeams, mergeWhitelistUsernames, protectedFilePatterns, pushWhitelistDeployKeys, pushWhitelistTeams, pushWhitelistUsernames, requireSignedCommits, requiredApprovals, statusCheckContexts, unprotectedFilePatterns); + return Objects.hash(approvalsWhitelistTeams, approvalsWhitelistUsername, blockOnOfficialReviewRequests, blockOnOutdatedBranch, blockOnRejectedReviews, branchName, dismissStaleApprovals, enableApprovalsWhitelist, enableMergeWhitelist, enablePush, enablePushWhitelist, enableStatusCheck, mergeWhitelistTeams, mergeWhitelistUsernames, protectedFilePatterns, pushWhitelistDeployKeys, pushWhitelistTeams, pushWhitelistUsernames, requireSignedCommits, requiredApprovals, ruleName, statusCheckContexts, unprotectedFilePatterns); } @@ -615,6 +637,7 @@ public class CreateBranchProtectionOption { sb.append(" pushWhitelistUsernames: ").append(toIndentedString(pushWhitelistUsernames)).append("\n"); sb.append(" requireSignedCommits: ").append(toIndentedString(requireSignedCommits)).append("\n"); sb.append(" requiredApprovals: ").append(toIndentedString(requiredApprovals)).append("\n"); + sb.append(" ruleName: ").append(toIndentedString(ruleName)).append("\n"); sb.append(" statusCheckContexts: ").append(toIndentedString(statusCheckContexts)).append("\n"); sb.append(" unprotectedFilePatterns: ").append(toIndentedString(unprotectedFilePatterns)).append("\n"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/CreateBranchRepoOption.java b/src/main/java/io/gitea/model/CreateBranchRepoOption.java index 174f506..9e962c4 100644 --- a/src/main/java/io/gitea/model/CreateBranchRepoOption.java +++ b/src/main/java/io/gitea/model/CreateBranchRepoOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +36,9 @@ public class CreateBranchRepoOption { @SerializedName("old_branch_name") private String oldBranchName = null; + @SerializedName("old_ref_name") + private String oldRefName = null; + public CreateBranchRepoOption newBranchName(String newBranchName) { this.newBranchName = newBranchName; return this; @@ -60,10 +63,10 @@ public class CreateBranchRepoOption { } /** - * Name of the old branch to create from + * Deprecated: true Name of the old branch to create from * @return oldBranchName **/ - @ApiModelProperty(value = "Name of the old branch to create from") + @ApiModelProperty(value = "Deprecated: true Name of the old branch to create from") public String getOldBranchName() { return oldBranchName; } @@ -72,6 +75,24 @@ public class CreateBranchRepoOption { this.oldBranchName = oldBranchName; } + public CreateBranchRepoOption oldRefName(String oldRefName) { + this.oldRefName = oldRefName; + return this; + } + + /** + * Name of the old branch/tag/commit to create from + * @return oldRefName + **/ + @ApiModelProperty(value = "Name of the old branch/tag/commit to create from") + public String getOldRefName() { + return oldRefName; + } + + public void setOldRefName(String oldRefName) { + this.oldRefName = oldRefName; + } + @Override public boolean equals(java.lang.Object o) { @@ -83,12 +104,13 @@ public class CreateBranchRepoOption { } CreateBranchRepoOption createBranchRepoOption = (CreateBranchRepoOption) o; return Objects.equals(this.newBranchName, createBranchRepoOption.newBranchName) && - Objects.equals(this.oldBranchName, createBranchRepoOption.oldBranchName); + Objects.equals(this.oldBranchName, createBranchRepoOption.oldBranchName) && + Objects.equals(this.oldRefName, createBranchRepoOption.oldRefName); } @Override public int hashCode() { - return Objects.hash(newBranchName, oldBranchName); + return Objects.hash(newBranchName, oldBranchName, oldRefName); } @@ -99,6 +121,7 @@ public class CreateBranchRepoOption { sb.append(" newBranchName: ").append(toIndentedString(newBranchName)).append("\n"); sb.append(" oldBranchName: ").append(toIndentedString(oldBranchName)).append("\n"); + sb.append(" oldRefName: ").append(toIndentedString(oldRefName)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/CreateEmailOption.java b/src/main/java/io/gitea/model/CreateEmailOption.java index 5ae7e01..92101c7 100644 --- a/src/main/java/io/gitea/model/CreateEmailOption.java +++ b/src/main/java/io/gitea/model/CreateEmailOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateFileOptions.java b/src/main/java/io/gitea/model/CreateFileOptions.java index 1eaeded..7443ec4 100644 --- a/src/main/java/io/gitea/model/CreateFileOptions.java +++ b/src/main/java/io/gitea/model/CreateFileOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateForkOption.java b/src/main/java/io/gitea/model/CreateForkOption.java index cc18085..5c32764 100644 --- a/src/main/java/io/gitea/model/CreateForkOption.java +++ b/src/main/java/io/gitea/model/CreateForkOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateGPGKeyOption.java b/src/main/java/io/gitea/model/CreateGPGKeyOption.java index c3ba269..596e92a 100644 --- a/src/main/java/io/gitea/model/CreateGPGKeyOption.java +++ b/src/main/java/io/gitea/model/CreateGPGKeyOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateHookOption.java b/src/main/java/io/gitea/model/CreateHookOption.java index 64087a1..4e0dc11 100644 --- a/src/main/java/io/gitea/model/CreateHookOption.java +++ b/src/main/java/io/gitea/model/CreateHookOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +36,9 @@ public class CreateHookOption { @SerializedName("active") private Boolean active = false; + @SerializedName("authorization_header") + private String authorizationHeader = null; + @SerializedName("branch_filter") private String branchFilter = null; @@ -129,6 +132,24 @@ public class CreateHookOption { this.active = active; } + public CreateHookOption authorizationHeader(String authorizationHeader) { + this.authorizationHeader = authorizationHeader; + return this; + } + + /** + * Get authorizationHeader + * @return authorizationHeader + **/ + @ApiModelProperty(value = "") + public String getAuthorizationHeader() { + return authorizationHeader; + } + + public void setAuthorizationHeader(String authorizationHeader) { + this.authorizationHeader = authorizationHeader; + } + public CreateHookOption branchFilter(String branchFilter) { this.branchFilter = branchFilter; return this; @@ -220,6 +241,7 @@ public class CreateHookOption { } CreateHookOption createHookOption = (CreateHookOption) o; return Objects.equals(this.active, createHookOption.active) && + Objects.equals(this.authorizationHeader, createHookOption.authorizationHeader) && Objects.equals(this.branchFilter, createHookOption.branchFilter) && Objects.equals(this.config, createHookOption.config) && Objects.equals(this.events, createHookOption.events) && @@ -228,7 +250,7 @@ public class CreateHookOption { @Override public int hashCode() { - return Objects.hash(active, branchFilter, config, events, type); + return Objects.hash(active, authorizationHeader, branchFilter, config, events, type); } @@ -238,6 +260,7 @@ public class CreateHookOption { sb.append("class CreateHookOption {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n"); sb.append(" branchFilter: ").append(toIndentedString(branchFilter)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" events: ").append(toIndentedString(events)).append("\n"); diff --git a/src/main/java/io/gitea/model/CreateHookOptionConfig.java b/src/main/java/io/gitea/model/CreateHookOptionConfig.java index bc201b9..db79817 100644 --- a/src/main/java/io/gitea/model/CreateHookOptionConfig.java +++ b/src/main/java/io/gitea/model/CreateHookOptionConfig.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateIssueCommentOption.java b/src/main/java/io/gitea/model/CreateIssueCommentOption.java index 716377e..389105c 100644 --- a/src/main/java/io/gitea/model/CreateIssueCommentOption.java +++ b/src/main/java/io/gitea/model/CreateIssueCommentOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateIssueOption.java b/src/main/java/io/gitea/model/CreateIssueOption.java index 95f637d..fa497f7 100644 --- a/src/main/java/io/gitea/model/CreateIssueOption.java +++ b/src/main/java/io/gitea/model/CreateIssueOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateKeyOption.java b/src/main/java/io/gitea/model/CreateKeyOption.java index 32ed409..579ce64 100644 --- a/src/main/java/io/gitea/model/CreateKeyOption.java +++ b/src/main/java/io/gitea/model/CreateKeyOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateLabelOption.java b/src/main/java/io/gitea/model/CreateLabelOption.java index 927d345..e3be680 100644 --- a/src/main/java/io/gitea/model/CreateLabelOption.java +++ b/src/main/java/io/gitea/model/CreateLabelOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +36,12 @@ public class CreateLabelOption { @SerializedName("description") private String description = null; + @SerializedName("exclusive") + private Boolean exclusive = null; + + @SerializedName("is_archived") + private Boolean isArchived = null; + @SerializedName("name") private String name = null; @@ -75,6 +81,42 @@ public class CreateLabelOption { this.description = description; } + public CreateLabelOption exclusive(Boolean exclusive) { + this.exclusive = exclusive; + return this; + } + + /** + * Get exclusive + * @return exclusive + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isExclusive() { + return exclusive; + } + + public void setExclusive(Boolean exclusive) { + this.exclusive = exclusive; + } + + public CreateLabelOption isArchived(Boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + /** + * Get isArchived + * @return isArchived + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isIsArchived() { + return isArchived; + } + + public void setIsArchived(Boolean isArchived) { + this.isArchived = isArchived; + } + public CreateLabelOption name(String name) { this.name = name; return this; @@ -105,12 +147,14 @@ public class CreateLabelOption { CreateLabelOption createLabelOption = (CreateLabelOption) o; return Objects.equals(this.color, createLabelOption.color) && Objects.equals(this.description, createLabelOption.description) && + Objects.equals(this.exclusive, createLabelOption.exclusive) && + Objects.equals(this.isArchived, createLabelOption.isArchived) && Objects.equals(this.name, createLabelOption.name); } @Override public int hashCode() { - return Objects.hash(color, description, name); + return Objects.hash(color, description, exclusive, isArchived, name); } @@ -121,6 +165,8 @@ public class CreateLabelOption { sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" exclusive: ").append(toIndentedString(exclusive)).append("\n"); + sb.append(" isArchived: ").append(toIndentedString(isArchived)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/CreateMilestoneOption.java b/src/main/java/io/gitea/model/CreateMilestoneOption.java index f741cab..0d4501e 100644 --- a/src/main/java/io/gitea/model/CreateMilestoneOption.java +++ b/src/main/java/io/gitea/model/CreateMilestoneOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateOAuth2ApplicationOptions.java b/src/main/java/io/gitea/model/CreateOAuth2ApplicationOptions.java index 1116876..b6240c1 100644 --- a/src/main/java/io/gitea/model/CreateOAuth2ApplicationOptions.java +++ b/src/main/java/io/gitea/model/CreateOAuth2ApplicationOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateOrUpdateSecretOption.java b/src/main/java/io/gitea/model/CreateOrUpdateSecretOption.java new file mode 100644 index 0000000..e8f0469 --- /dev/null +++ b/src/main/java/io/gitea/model/CreateOrUpdateSecretOption.java @@ -0,0 +1,95 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateOrUpdateSecretOption options when creating or updating secret + */ +@ApiModel(description = "CreateOrUpdateSecretOption options when creating or updating secret") + +public class CreateOrUpdateSecretOption { + @SerializedName("data") + private String data = null; + + public CreateOrUpdateSecretOption data(String data) { + this.data = data; + return this; + } + + /** + * Data of the secret to update + * @return data + **/ + @ApiModelProperty(required = true, value = "Data of the secret to update") + public String getData() { + return data; + } + + public void setData(String data) { + this.data = data; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateOrUpdateSecretOption createOrUpdateSecretOption = (CreateOrUpdateSecretOption) o; + return Objects.equals(this.data, createOrUpdateSecretOption.data); + } + + @Override + public int hashCode() { + return Objects.hash(data); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateOrUpdateSecretOption {\n"); + + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/CreateOrgOption.java b/src/main/java/io/gitea/model/CreateOrgOption.java index c6e6853..0a52dc9 100644 --- a/src/main/java/io/gitea/model/CreateOrgOption.java +++ b/src/main/java/io/gitea/model/CreateOrgOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -33,6 +33,9 @@ public class CreateOrgOption { @SerializedName("description") private String description = null; + @SerializedName("email") + private String email = null; + @SerializedName("full_name") private String fullName = null; @@ -118,6 +121,24 @@ public class CreateOrgOption { this.description = description; } + public CreateOrgOption email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @ApiModelProperty(value = "") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + public CreateOrgOption fullName(String fullName) { this.fullName = fullName; return this; @@ -237,6 +258,7 @@ public class CreateOrgOption { } CreateOrgOption createOrgOption = (CreateOrgOption) o; return Objects.equals(this.description, createOrgOption.description) && + Objects.equals(this.email, createOrgOption.email) && Objects.equals(this.fullName, createOrgOption.fullName) && Objects.equals(this.location, createOrgOption.location) && Objects.equals(this.repoAdminChangeTeamAccess, createOrgOption.repoAdminChangeTeamAccess) && @@ -247,7 +269,7 @@ public class CreateOrgOption { @Override public int hashCode() { - return Objects.hash(description, fullName, location, repoAdminChangeTeamAccess, username, visibility, website); + return Objects.hash(description, email, fullName, location, repoAdminChangeTeamAccess, username, visibility, website); } @@ -257,6 +279,7 @@ public class CreateOrgOption { sb.append("class CreateOrgOption {\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" location: ").append(toIndentedString(location)).append("\n"); sb.append(" repoAdminChangeTeamAccess: ").append(toIndentedString(repoAdminChangeTeamAccess)).append("\n"); diff --git a/src/main/java/io/gitea/model/CreatePullRequestOption.java b/src/main/java/io/gitea/model/CreatePullRequestOption.java index 64e7a29..19af0bd 100644 --- a/src/main/java/io/gitea/model/CreatePullRequestOption.java +++ b/src/main/java/io/gitea/model/CreatePullRequestOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreatePullReviewComment.java b/src/main/java/io/gitea/model/CreatePullReviewComment.java index 765c983..0073a80 100644 --- a/src/main/java/io/gitea/model/CreatePullReviewComment.java +++ b/src/main/java/io/gitea/model/CreatePullReviewComment.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreatePullReviewOptions.java b/src/main/java/io/gitea/model/CreatePullReviewOptions.java index 444a3f6..278d663 100644 --- a/src/main/java/io/gitea/model/CreatePullReviewOptions.java +++ b/src/main/java/io/gitea/model/CreatePullReviewOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreatePushMirrorOption.java b/src/main/java/io/gitea/model/CreatePushMirrorOption.java index f0bd26f..09b3ec6 100644 --- a/src/main/java/io/gitea/model/CreatePushMirrorOption.java +++ b/src/main/java/io/gitea/model/CreatePushMirrorOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -41,6 +41,9 @@ public class CreatePushMirrorOption { @SerializedName("remote_username") private String remoteUsername = null; + @SerializedName("sync_on_commit") + private Boolean syncOnCommit = null; + public CreatePushMirrorOption interval(String interval) { this.interval = interval; return this; @@ -113,6 +116,24 @@ public class CreatePushMirrorOption { this.remoteUsername = remoteUsername; } + public CreatePushMirrorOption syncOnCommit(Boolean syncOnCommit) { + this.syncOnCommit = syncOnCommit; + return this; + } + + /** + * Get syncOnCommit + * @return syncOnCommit + **/ + @ApiModelProperty(value = "") + public Boolean isSyncOnCommit() { + return syncOnCommit; + } + + public void setSyncOnCommit(Boolean syncOnCommit) { + this.syncOnCommit = syncOnCommit; + } + @Override public boolean equals(java.lang.Object o) { @@ -126,12 +147,13 @@ public class CreatePushMirrorOption { return Objects.equals(this.interval, createPushMirrorOption.interval) && Objects.equals(this.remoteAddress, createPushMirrorOption.remoteAddress) && Objects.equals(this.remotePassword, createPushMirrorOption.remotePassword) && - Objects.equals(this.remoteUsername, createPushMirrorOption.remoteUsername); + Objects.equals(this.remoteUsername, createPushMirrorOption.remoteUsername) && + Objects.equals(this.syncOnCommit, createPushMirrorOption.syncOnCommit); } @Override public int hashCode() { - return Objects.hash(interval, remoteAddress, remotePassword, remoteUsername); + return Objects.hash(interval, remoteAddress, remotePassword, remoteUsername, syncOnCommit); } @@ -144,6 +166,7 @@ public class CreatePushMirrorOption { sb.append(" remoteAddress: ").append(toIndentedString(remoteAddress)).append("\n"); sb.append(" remotePassword: ").append(toIndentedString(remotePassword)).append("\n"); sb.append(" remoteUsername: ").append(toIndentedString(remoteUsername)).append("\n"); + sb.append(" syncOnCommit: ").append(toIndentedString(syncOnCommit)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/CreateReleaseOption.java b/src/main/java/io/gitea/model/CreateReleaseOption.java index 94e02ad..7f4f3e3 100644 --- a/src/main/java/io/gitea/model/CreateReleaseOption.java +++ b/src/main/java/io/gitea/model/CreateReleaseOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateRepoOption.java b/src/main/java/io/gitea/model/CreateRepoOption.java index 8c848e2..5a52a36 100644 --- a/src/main/java/io/gitea/model/CreateRepoOption.java +++ b/src/main/java/io/gitea/model/CreateRepoOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateStatusOption.java b/src/main/java/io/gitea/model/CreateStatusOption.java index 5b4c17f..c96f96e 100644 --- a/src/main/java/io/gitea/model/CreateStatusOption.java +++ b/src/main/java/io/gitea/model/CreateStatusOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateTagOption.java b/src/main/java/io/gitea/model/CreateTagOption.java index 78af81e..ae485a1 100644 --- a/src/main/java/io/gitea/model/CreateTagOption.java +++ b/src/main/java/io/gitea/model/CreateTagOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/CreateTeamOption.java b/src/main/java/io/gitea/model/CreateTeamOption.java index 575dda5..804c803 100644 --- a/src/main/java/io/gitea/model/CreateTeamOption.java +++ b/src/main/java/io/gitea/model/CreateTeamOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -211,7 +211,7 @@ public class CreateTeamOption { * Get units * @return units **/ - @ApiModelProperty(example = "[\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.pulls\",\"repo.releases\",\"repo.projects\",\"repo.ext_wiki\"]", value = "") + @ApiModelProperty(example = "[\"repo.actions\",\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.ext_wiki\",\"repo.pulls\",\"repo.releases\",\"repo.projects\",\"repo.ext_wiki\"]", value = "") public List getUnits() { return units; } @@ -237,7 +237,7 @@ public class CreateTeamOption { * Get unitsMap * @return unitsMap **/ - @ApiModelProperty(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\"}", value = "") + @ApiModelProperty(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\\\"}\"", value = "") public Map getUnitsMap() { return unitsMap; } diff --git a/src/main/java/io/gitea/model/CreateUserOption.java b/src/main/java/io/gitea/model/CreateUserOption.java index 816dcce..6de1c63 100644 --- a/src/main/java/io/gitea/model/CreateUserOption.java +++ b/src/main/java/io/gitea/model/CreateUserOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -23,6 +23,7 @@ import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import org.threeten.bp.OffsetDateTime; /** * CreateUserOption create user options @@ -30,6 +31,9 @@ import java.io.IOException; @ApiModel(description = "CreateUserOption create user options") public class CreateUserOption { + @SerializedName("created_at") + private OffsetDateTime createdAt = null; + @SerializedName("email") private String email = null; @@ -60,6 +64,24 @@ public class CreateUserOption { @SerializedName("visibility") private String visibility = null; + public CreateUserOption createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * 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\". + * @return createdAt + **/ + @ApiModelProperty(value = "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\".") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + public CreateUserOption email(String email) { this.email = email; return this; @@ -250,7 +272,8 @@ public class CreateUserOption { return false; } CreateUserOption createUserOption = (CreateUserOption) o; - return Objects.equals(this.email, createUserOption.email) && + return Objects.equals(this.createdAt, createUserOption.createdAt) && + Objects.equals(this.email, createUserOption.email) && Objects.equals(this.fullName, createUserOption.fullName) && Objects.equals(this.loginName, createUserOption.loginName) && Objects.equals(this.mustChangePassword, createUserOption.mustChangePassword) && @@ -264,7 +287,7 @@ public class CreateUserOption { @Override public int hashCode() { - return Objects.hash(email, fullName, loginName, mustChangePassword, password, restricted, sendNotify, sourceId, username, visibility); + return Objects.hash(createdAt, email, fullName, loginName, mustChangePassword, password, restricted, sendNotify, sourceId, username, visibility); } @@ -273,6 +296,7 @@ public class CreateUserOption { StringBuilder sb = new StringBuilder(); sb.append("class CreateUserOption {\n"); + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n"); diff --git a/src/main/java/io/gitea/model/CreateWikiPageOptions.java b/src/main/java/io/gitea/model/CreateWikiPageOptions.java index 6256e48..9818708 100644 --- a/src/main/java/io/gitea/model/CreateWikiPageOptions.java +++ b/src/main/java/io/gitea/model/CreateWikiPageOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Cron.java b/src/main/java/io/gitea/model/Cron.java index 88a813d..fc5f682 100644 --- a/src/main/java/io/gitea/model/Cron.java +++ b/src/main/java/io/gitea/model/Cron.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/DeleteEmailOption.java b/src/main/java/io/gitea/model/DeleteEmailOption.java index afb9939..9f0ee67 100644 --- a/src/main/java/io/gitea/model/DeleteEmailOption.java +++ b/src/main/java/io/gitea/model/DeleteEmailOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/DeleteFileOptions.java b/src/main/java/io/gitea/model/DeleteFileOptions.java index 72d2aa1..cb24fd9 100644 --- a/src/main/java/io/gitea/model/DeleteFileOptions.java +++ b/src/main/java/io/gitea/model/DeleteFileOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/DeployKey.java b/src/main/java/io/gitea/model/DeployKey.java index cfd296b..166c810 100644 --- a/src/main/java/io/gitea/model/DeployKey.java +++ b/src/main/java/io/gitea/model/DeployKey.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/DismissPullReviewOptions.java b/src/main/java/io/gitea/model/DismissPullReviewOptions.java index 31ef91e..049504a 100644 --- a/src/main/java/io/gitea/model/DismissPullReviewOptions.java +++ b/src/main/java/io/gitea/model/DismissPullReviewOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditAttachmentOptions.java b/src/main/java/io/gitea/model/EditAttachmentOptions.java index 185e23f..fc5d561 100644 --- a/src/main/java/io/gitea/model/EditAttachmentOptions.java +++ b/src/main/java/io/gitea/model/EditAttachmentOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditBranchProtectionOption.java b/src/main/java/io/gitea/model/EditBranchProtectionOption.java index aeb3fb1..f6e9290 100644 --- a/src/main/java/io/gitea/model/EditBranchProtectionOption.java +++ b/src/main/java/io/gitea/model/EditBranchProtectionOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditDeadlineOption.java b/src/main/java/io/gitea/model/EditDeadlineOption.java index 11b0c8d..728940d 100644 --- a/src/main/java/io/gitea/model/EditDeadlineOption.java +++ b/src/main/java/io/gitea/model/EditDeadlineOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditGitHookOption.java b/src/main/java/io/gitea/model/EditGitHookOption.java index 112edb9..3d9a2ef 100644 --- a/src/main/java/io/gitea/model/EditGitHookOption.java +++ b/src/main/java/io/gitea/model/EditGitHookOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditHookOption.java b/src/main/java/io/gitea/model/EditHookOption.java index 969b0cf..81c5389 100644 --- a/src/main/java/io/gitea/model/EditHookOption.java +++ b/src/main/java/io/gitea/model/EditHookOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -37,6 +37,9 @@ public class EditHookOption { @SerializedName("active") private Boolean active = null; + @SerializedName("authorization_header") + private String authorizationHeader = null; + @SerializedName("branch_filter") private String branchFilter = null; @@ -64,6 +67,24 @@ public class EditHookOption { this.active = active; } + public EditHookOption authorizationHeader(String authorizationHeader) { + this.authorizationHeader = authorizationHeader; + return this; + } + + /** + * Get authorizationHeader + * @return authorizationHeader + **/ + @ApiModelProperty(value = "") + public String getAuthorizationHeader() { + return authorizationHeader; + } + + public void setAuthorizationHeader(String authorizationHeader) { + this.authorizationHeader = authorizationHeader; + } + public EditHookOption branchFilter(String branchFilter) { this.branchFilter = branchFilter; return this; @@ -145,6 +166,7 @@ public class EditHookOption { } EditHookOption editHookOption = (EditHookOption) o; return Objects.equals(this.active, editHookOption.active) && + Objects.equals(this.authorizationHeader, editHookOption.authorizationHeader) && Objects.equals(this.branchFilter, editHookOption.branchFilter) && Objects.equals(this.config, editHookOption.config) && Objects.equals(this.events, editHookOption.events); @@ -152,7 +174,7 @@ public class EditHookOption { @Override public int hashCode() { - return Objects.hash(active, branchFilter, config, events); + return Objects.hash(active, authorizationHeader, branchFilter, config, events); } @@ -162,6 +184,7 @@ public class EditHookOption { sb.append("class EditHookOption {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n"); sb.append(" branchFilter: ").append(toIndentedString(branchFilter)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" events: ").append(toIndentedString(events)).append("\n"); diff --git a/src/main/java/io/gitea/model/EditIssueCommentOption.java b/src/main/java/io/gitea/model/EditIssueCommentOption.java index 5c1e915..d77130c 100644 --- a/src/main/java/io/gitea/model/EditIssueCommentOption.java +++ b/src/main/java/io/gitea/model/EditIssueCommentOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditIssueOption.java b/src/main/java/io/gitea/model/EditIssueOption.java index ae0f48f..dc7558a 100644 --- a/src/main/java/io/gitea/model/EditIssueOption.java +++ b/src/main/java/io/gitea/model/EditIssueOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditLabelOption.java b/src/main/java/io/gitea/model/EditLabelOption.java index b42d129..6ecf14b 100644 --- a/src/main/java/io/gitea/model/EditLabelOption.java +++ b/src/main/java/io/gitea/model/EditLabelOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +36,12 @@ public class EditLabelOption { @SerializedName("description") private String description = null; + @SerializedName("exclusive") + private Boolean exclusive = null; + + @SerializedName("is_archived") + private Boolean isArchived = null; + @SerializedName("name") private String name = null; @@ -48,7 +54,7 @@ public class EditLabelOption { * Get color * @return color **/ - @ApiModelProperty(value = "") + @ApiModelProperty(example = "#00aabb", value = "") public String getColor() { return color; } @@ -75,6 +81,42 @@ public class EditLabelOption { this.description = description; } + public EditLabelOption exclusive(Boolean exclusive) { + this.exclusive = exclusive; + return this; + } + + /** + * Get exclusive + * @return exclusive + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isExclusive() { + return exclusive; + } + + public void setExclusive(Boolean exclusive) { + this.exclusive = exclusive; + } + + public EditLabelOption isArchived(Boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + /** + * Get isArchived + * @return isArchived + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isIsArchived() { + return isArchived; + } + + public void setIsArchived(Boolean isArchived) { + this.isArchived = isArchived; + } + public EditLabelOption name(String name) { this.name = name; return this; @@ -105,12 +147,14 @@ public class EditLabelOption { EditLabelOption editLabelOption = (EditLabelOption) o; return Objects.equals(this.color, editLabelOption.color) && Objects.equals(this.description, editLabelOption.description) && + Objects.equals(this.exclusive, editLabelOption.exclusive) && + Objects.equals(this.isArchived, editLabelOption.isArchived) && Objects.equals(this.name, editLabelOption.name); } @Override public int hashCode() { - return Objects.hash(color, description, name); + return Objects.hash(color, description, exclusive, isArchived, name); } @@ -121,6 +165,8 @@ public class EditLabelOption { sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" exclusive: ").append(toIndentedString(exclusive)).append("\n"); + sb.append(" isArchived: ").append(toIndentedString(isArchived)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/EditMilestoneOption.java b/src/main/java/io/gitea/model/EditMilestoneOption.java index 1b0eda4..ad07408 100644 --- a/src/main/java/io/gitea/model/EditMilestoneOption.java +++ b/src/main/java/io/gitea/model/EditMilestoneOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditOrgOption.java b/src/main/java/io/gitea/model/EditOrgOption.java index 8b2df4e..6fb0894 100644 --- a/src/main/java/io/gitea/model/EditOrgOption.java +++ b/src/main/java/io/gitea/model/EditOrgOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -33,6 +33,9 @@ public class EditOrgOption { @SerializedName("description") private String description = null; + @SerializedName("email") + private String email = null; + @SerializedName("full_name") private String fullName = null; @@ -115,6 +118,24 @@ public class EditOrgOption { this.description = description; } + public EditOrgOption email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @ApiModelProperty(value = "") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + public EditOrgOption fullName(String fullName) { this.fullName = fullName; return this; @@ -216,6 +237,7 @@ public class EditOrgOption { } EditOrgOption editOrgOption = (EditOrgOption) o; return Objects.equals(this.description, editOrgOption.description) && + Objects.equals(this.email, editOrgOption.email) && Objects.equals(this.fullName, editOrgOption.fullName) && Objects.equals(this.location, editOrgOption.location) && Objects.equals(this.repoAdminChangeTeamAccess, editOrgOption.repoAdminChangeTeamAccess) && @@ -225,7 +247,7 @@ public class EditOrgOption { @Override public int hashCode() { - return Objects.hash(description, fullName, location, repoAdminChangeTeamAccess, visibility, website); + return Objects.hash(description, email, fullName, location, repoAdminChangeTeamAccess, visibility, website); } @@ -235,6 +257,7 @@ public class EditOrgOption { sb.append("class EditOrgOption {\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" location: ").append(toIndentedString(location)).append("\n"); sb.append(" repoAdminChangeTeamAccess: ").append(toIndentedString(repoAdminChangeTeamAccess)).append("\n"); diff --git a/src/main/java/io/gitea/model/EditPullRequestOption.java b/src/main/java/io/gitea/model/EditPullRequestOption.java index 0ca1a7f..2bd29d3 100644 --- a/src/main/java/io/gitea/model/EditPullRequestOption.java +++ b/src/main/java/io/gitea/model/EditPullRequestOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditReactionOption.java b/src/main/java/io/gitea/model/EditReactionOption.java index bca998b..b750151 100644 --- a/src/main/java/io/gitea/model/EditReactionOption.java +++ b/src/main/java/io/gitea/model/EditReactionOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditReleaseOption.java b/src/main/java/io/gitea/model/EditReleaseOption.java index c2643a4..2d91fe2 100644 --- a/src/main/java/io/gitea/model/EditReleaseOption.java +++ b/src/main/java/io/gitea/model/EditReleaseOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditRepoOption.java b/src/main/java/io/gitea/model/EditRepoOption.java index 3e403a0..990cf3d 100644 --- a/src/main/java/io/gitea/model/EditRepoOption.java +++ b/src/main/java/io/gitea/model/EditRepoOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -57,6 +57,9 @@ public class EditRepoOption { @SerializedName("autodetect_manual_merge") private Boolean autodetectManualMerge = null; + @SerializedName("default_allow_maintainer_edit") + private Boolean defaultAllowMaintainerEdit = null; + @SerializedName("default_branch") private String defaultBranch = null; @@ -78,15 +81,24 @@ public class EditRepoOption { @SerializedName("external_wiki") private ExternalWiki externalWiki = null; + @SerializedName("has_actions") + private Boolean hasActions = null; + @SerializedName("has_issues") private Boolean hasIssues = null; + @SerializedName("has_packages") + private Boolean hasPackages = null; + @SerializedName("has_projects") private Boolean hasProjects = null; @SerializedName("has_pull_requests") private Boolean hasPullRequests = null; + @SerializedName("has_releases") + private Boolean hasReleases = null; + @SerializedName("has_wiki") private Boolean hasWiki = null; @@ -255,6 +267,24 @@ public class EditRepoOption { this.autodetectManualMerge = autodetectManualMerge; } + public EditRepoOption defaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + return this; + } + + /** + * set to `true` to allow edits from maintainers by default + * @return defaultAllowMaintainerEdit + **/ + @ApiModelProperty(value = "set to `true` to allow edits from maintainers by default") + public Boolean isDefaultAllowMaintainerEdit() { + return defaultAllowMaintainerEdit; + } + + public void setDefaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + } + public EditRepoOption defaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; return this; @@ -381,6 +411,24 @@ public class EditRepoOption { this.externalWiki = externalWiki; } + public EditRepoOption hasActions(Boolean hasActions) { + this.hasActions = hasActions; + return this; + } + + /** + * either `true` to enable actions unit, or `false` to disable them. + * @return hasActions + **/ + @ApiModelProperty(value = "either `true` to enable actions unit, or `false` to disable them.") + public Boolean isHasActions() { + return hasActions; + } + + public void setHasActions(Boolean hasActions) { + this.hasActions = hasActions; + } + public EditRepoOption hasIssues(Boolean hasIssues) { this.hasIssues = hasIssues; return this; @@ -399,6 +447,24 @@ public class EditRepoOption { this.hasIssues = hasIssues; } + public EditRepoOption hasPackages(Boolean hasPackages) { + this.hasPackages = hasPackages; + return this; + } + + /** + * either `true` to enable packages unit, or `false` to disable them. + * @return hasPackages + **/ + @ApiModelProperty(value = "either `true` to enable packages unit, or `false` to disable them.") + public Boolean isHasPackages() { + return hasPackages; + } + + public void setHasPackages(Boolean hasPackages) { + this.hasPackages = hasPackages; + } + public EditRepoOption hasProjects(Boolean hasProjects) { this.hasProjects = hasProjects; return this; @@ -435,6 +501,24 @@ public class EditRepoOption { this.hasPullRequests = hasPullRequests; } + public EditRepoOption hasReleases(Boolean hasReleases) { + this.hasReleases = hasReleases; + return this; + } + + /** + * either `true` to enable releases unit, or `false` to disable them. + * @return hasReleases + **/ + @ApiModelProperty(value = "either `true` to enable releases unit, or `false` to disable them.") + public Boolean isHasReleases() { + return hasReleases; + } + + public void setHasReleases(Boolean hasReleases) { + this.hasReleases = hasReleases; + } + public EditRepoOption hasWiki(Boolean hasWiki) { this.hasWiki = hasWiki; return this; @@ -597,6 +681,7 @@ public class EditRepoOption { Objects.equals(this.allowSquashMerge, editRepoOption.allowSquashMerge) && Objects.equals(this.archived, editRepoOption.archived) && Objects.equals(this.autodetectManualMerge, editRepoOption.autodetectManualMerge) && + Objects.equals(this.defaultAllowMaintainerEdit, editRepoOption.defaultAllowMaintainerEdit) && Objects.equals(this.defaultBranch, editRepoOption.defaultBranch) && Objects.equals(this.defaultDeleteBranchAfterMerge, editRepoOption.defaultDeleteBranchAfterMerge) && Objects.equals(this.defaultMergeStyle, editRepoOption.defaultMergeStyle) && @@ -604,9 +689,12 @@ public class EditRepoOption { Objects.equals(this.enablePrune, editRepoOption.enablePrune) && Objects.equals(this.externalTracker, editRepoOption.externalTracker) && Objects.equals(this.externalWiki, editRepoOption.externalWiki) && + Objects.equals(this.hasActions, editRepoOption.hasActions) && Objects.equals(this.hasIssues, editRepoOption.hasIssues) && + Objects.equals(this.hasPackages, editRepoOption.hasPackages) && Objects.equals(this.hasProjects, editRepoOption.hasProjects) && Objects.equals(this.hasPullRequests, editRepoOption.hasPullRequests) && + Objects.equals(this.hasReleases, editRepoOption.hasReleases) && Objects.equals(this.hasWiki, editRepoOption.hasWiki) && Objects.equals(this.ignoreWhitespaceConflicts, editRepoOption.ignoreWhitespaceConflicts) && Objects.equals(this.internalTracker, editRepoOption.internalTracker) && @@ -619,7 +707,7 @@ public class EditRepoOption { @Override public int hashCode() { - return Objects.hash(allowManualMerge, allowMergeCommits, allowRebase, allowRebaseExplicit, allowRebaseUpdate, allowSquashMerge, archived, autodetectManualMerge, defaultBranch, defaultDeleteBranchAfterMerge, defaultMergeStyle, description, enablePrune, externalTracker, externalWiki, hasIssues, hasProjects, hasPullRequests, hasWiki, ignoreWhitespaceConflicts, internalTracker, mirrorInterval, name, _private, template, website); + return Objects.hash(allowManualMerge, allowMergeCommits, allowRebase, allowRebaseExplicit, allowRebaseUpdate, allowSquashMerge, archived, autodetectManualMerge, defaultAllowMaintainerEdit, defaultBranch, defaultDeleteBranchAfterMerge, defaultMergeStyle, description, enablePrune, externalTracker, externalWiki, hasActions, hasIssues, hasPackages, hasProjects, hasPullRequests, hasReleases, hasWiki, ignoreWhitespaceConflicts, internalTracker, mirrorInterval, name, _private, template, website); } @@ -636,6 +724,7 @@ public class EditRepoOption { sb.append(" allowSquashMerge: ").append(toIndentedString(allowSquashMerge)).append("\n"); sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); sb.append(" autodetectManualMerge: ").append(toIndentedString(autodetectManualMerge)).append("\n"); + sb.append(" defaultAllowMaintainerEdit: ").append(toIndentedString(defaultAllowMaintainerEdit)).append("\n"); sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); sb.append(" defaultDeleteBranchAfterMerge: ").append(toIndentedString(defaultDeleteBranchAfterMerge)).append("\n"); sb.append(" defaultMergeStyle: ").append(toIndentedString(defaultMergeStyle)).append("\n"); @@ -643,9 +732,12 @@ public class EditRepoOption { sb.append(" enablePrune: ").append(toIndentedString(enablePrune)).append("\n"); sb.append(" externalTracker: ").append(toIndentedString(externalTracker)).append("\n"); sb.append(" externalWiki: ").append(toIndentedString(externalWiki)).append("\n"); + sb.append(" hasActions: ").append(toIndentedString(hasActions)).append("\n"); sb.append(" hasIssues: ").append(toIndentedString(hasIssues)).append("\n"); + sb.append(" hasPackages: ").append(toIndentedString(hasPackages)).append("\n"); sb.append(" hasProjects: ").append(toIndentedString(hasProjects)).append("\n"); sb.append(" hasPullRequests: ").append(toIndentedString(hasPullRequests)).append("\n"); + sb.append(" hasReleases: ").append(toIndentedString(hasReleases)).append("\n"); sb.append(" hasWiki: ").append(toIndentedString(hasWiki)).append("\n"); sb.append(" ignoreWhitespaceConflicts: ").append(toIndentedString(ignoreWhitespaceConflicts)).append("\n"); sb.append(" internalTracker: ").append(toIndentedString(internalTracker)).append("\n"); diff --git a/src/main/java/io/gitea/model/EditTeamOption.java b/src/main/java/io/gitea/model/EditTeamOption.java index 38f32c5..0067d28 100644 --- a/src/main/java/io/gitea/model/EditTeamOption.java +++ b/src/main/java/io/gitea/model/EditTeamOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/EditUserOption.java b/src/main/java/io/gitea/model/EditUserOption.java index de9f64f..bfae045 100644 --- a/src/main/java/io/gitea/model/EditUserOption.java +++ b/src/main/java/io/gitea/model/EditUserOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Email.java b/src/main/java/io/gitea/model/Email.java index 4241f5a..e9971f7 100644 --- a/src/main/java/io/gitea/model/Email.java +++ b/src/main/java/io/gitea/model/Email.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +36,12 @@ public class Email { @SerializedName("primary") private Boolean primary = null; + @SerializedName("user_id") + private Long userId = null; + + @SerializedName("username") + private String username = null; + @SerializedName("verified") private Boolean verified = null; @@ -75,6 +81,42 @@ public class Email { this.primary = primary; } + public Email userId(Long userId) { + this.userId = userId; + return this; + } + + /** + * Get userId + * @return userId + **/ + @ApiModelProperty(value = "") + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public Email username(String username) { + this.username = username; + return this; + } + + /** + * Get username + * @return username + **/ + @ApiModelProperty(value = "") + public String getUsername() { + return username; + } + + public void setUsername(String username) { + this.username = username; + } + public Email verified(Boolean verified) { this.verified = verified; return this; @@ -105,12 +147,14 @@ public class Email { Email email = (Email) o; return Objects.equals(this.email, email.email) && Objects.equals(this.primary, email.primary) && + Objects.equals(this.userId, email.userId) && + Objects.equals(this.username, email.username) && Objects.equals(this.verified, email.verified); } @Override public int hashCode() { - return Objects.hash(email, primary, verified); + return Objects.hash(email, primary, userId, username, verified); } @@ -121,6 +165,8 @@ public class Email { sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" primary: ").append(toIndentedString(primary)).append("\n"); + sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); + sb.append(" username: ").append(toIndentedString(username)).append("\n"); sb.append(" verified: ").append(toIndentedString(verified)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/ExternalTracker.java b/src/main/java/io/gitea/model/ExternalTracker.java index 7ffa0f3..e7945f8 100644 --- a/src/main/java/io/gitea/model/ExternalTracker.java +++ b/src/main/java/io/gitea/model/ExternalTracker.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/ExternalWiki.java b/src/main/java/io/gitea/model/ExternalWiki.java index a843e2e..57d978d 100644 --- a/src/main/java/io/gitea/model/ExternalWiki.java +++ b/src/main/java/io/gitea/model/ExternalWiki.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/FileCommitResponse.java b/src/main/java/io/gitea/model/FileCommitResponse.java index 8dd98a8..585ad39 100644 --- a/src/main/java/io/gitea/model/FileCommitResponse.java +++ b/src/main/java/io/gitea/model/FileCommitResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/FileDeleteResponse.java b/src/main/java/io/gitea/model/FileDeleteResponse.java index c0080b4..9554fb7 100644 --- a/src/main/java/io/gitea/model/FileDeleteResponse.java +++ b/src/main/java/io/gitea/model/FileDeleteResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/FileLinksResponse.java b/src/main/java/io/gitea/model/FileLinksResponse.java index 125764b..c1db256 100644 --- a/src/main/java/io/gitea/model/FileLinksResponse.java +++ b/src/main/java/io/gitea/model/FileLinksResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/FileResponse.java b/src/main/java/io/gitea/model/FileResponse.java index 1a00e97..0de0274 100644 --- a/src/main/java/io/gitea/model/FileResponse.java +++ b/src/main/java/io/gitea/model/FileResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/FilesResponse.java b/src/main/java/io/gitea/model/FilesResponse.java new file mode 100644 index 0000000..4ff1eb9 --- /dev/null +++ b/src/main/java/io/gitea/model/FilesResponse.java @@ -0,0 +1,154 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.gitea.model.ContentsResponse; +import io.gitea.model.FileCommitResponse; +import io.gitea.model.PayloadCommitVerification; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * FilesResponse contains information about multiple files from a repo + */ +@ApiModel(description = "FilesResponse contains information about multiple files from a repo") + +public class FilesResponse { + @SerializedName("commit") + private FileCommitResponse commit = null; + + @SerializedName("files") + private List files = null; + + @SerializedName("verification") + private PayloadCommitVerification verification = null; + + public FilesResponse commit(FileCommitResponse commit) { + this.commit = commit; + return this; + } + + /** + * Get commit + * @return commit + **/ + @ApiModelProperty(value = "") + public FileCommitResponse getCommit() { + return commit; + } + + public void setCommit(FileCommitResponse commit) { + this.commit = commit; + } + + public FilesResponse files(List files) { + this.files = files; + return this; + } + + public FilesResponse addFilesItem(ContentsResponse filesItem) { + if (this.files == null) { + this.files = new ArrayList(); + } + this.files.add(filesItem); + return this; + } + + /** + * Get files + * @return files + **/ + @ApiModelProperty(value = "") + public List getFiles() { + return files; + } + + public void setFiles(List files) { + this.files = files; + } + + public FilesResponse verification(PayloadCommitVerification verification) { + this.verification = verification; + return this; + } + + /** + * Get verification + * @return verification + **/ + @ApiModelProperty(value = "") + public PayloadCommitVerification getVerification() { + return verification; + } + + public void setVerification(PayloadCommitVerification verification) { + this.verification = verification; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FilesResponse filesResponse = (FilesResponse) o; + return Objects.equals(this.commit, filesResponse.commit) && + Objects.equals(this.files, filesResponse.files) && + Objects.equals(this.verification, filesResponse.verification); + } + + @Override + public int hashCode() { + return Objects.hash(commit, files, verification); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FilesResponse {\n"); + + sb.append(" commit: ").append(toIndentedString(commit)).append("\n"); + sb.append(" files: ").append(toIndentedString(files)).append("\n"); + sb.append(" verification: ").append(toIndentedString(verification)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/GPGKey.java b/src/main/java/io/gitea/model/GPGKey.java index 84cc660..e1dd376 100644 --- a/src/main/java/io/gitea/model/GPGKey.java +++ b/src/main/java/io/gitea/model/GPGKey.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GPGKeyEmail.java b/src/main/java/io/gitea/model/GPGKeyEmail.java index 7c8abef..93e386a 100644 --- a/src/main/java/io/gitea/model/GPGKeyEmail.java +++ b/src/main/java/io/gitea/model/GPGKeyEmail.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GeneralAPISettings.java b/src/main/java/io/gitea/model/GeneralAPISettings.java index 51cf1b7..82904f2 100644 --- a/src/main/java/io/gitea/model/GeneralAPISettings.java +++ b/src/main/java/io/gitea/model/GeneralAPISettings.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GeneralAttachmentSettings.java b/src/main/java/io/gitea/model/GeneralAttachmentSettings.java index 77daac1..618d69f 100644 --- a/src/main/java/io/gitea/model/GeneralAttachmentSettings.java +++ b/src/main/java/io/gitea/model/GeneralAttachmentSettings.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GeneralRepoSettings.java b/src/main/java/io/gitea/model/GeneralRepoSettings.java index f33fd36..2b0b17d 100644 --- a/src/main/java/io/gitea/model/GeneralRepoSettings.java +++ b/src/main/java/io/gitea/model/GeneralRepoSettings.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GeneralUISettings.java b/src/main/java/io/gitea/model/GeneralUISettings.java index 1685d43..9b42bac 100644 --- a/src/main/java/io/gitea/model/GeneralUISettings.java +++ b/src/main/java/io/gitea/model/GeneralUISettings.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GenerateRepoOption.java b/src/main/java/io/gitea/model/GenerateRepoOption.java index a0aaec6..e1e5e0d 100644 --- a/src/main/java/io/gitea/model/GenerateRepoOption.java +++ b/src/main/java/io/gitea/model/GenerateRepoOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -57,6 +57,9 @@ public class GenerateRepoOption { @SerializedName("private") private Boolean _private = null; + @SerializedName("protected_branch") + private Boolean protectedBranch = null; + @SerializedName("topics") private Boolean topics = null; @@ -225,6 +228,24 @@ public class GenerateRepoOption { this._private = _private; } + public GenerateRepoOption protectedBranch(Boolean protectedBranch) { + this.protectedBranch = protectedBranch; + return this; + } + + /** + * include protected branches in template repo + * @return protectedBranch + **/ + @ApiModelProperty(value = "include protected branches in template repo") + public Boolean isProtectedBranch() { + return protectedBranch; + } + + public void setProtectedBranch(Boolean protectedBranch) { + this.protectedBranch = protectedBranch; + } + public GenerateRepoOption topics(Boolean topics) { this.topics = topics; return this; @@ -280,13 +301,14 @@ public class GenerateRepoOption { Objects.equals(this.name, generateRepoOption.name) && Objects.equals(this.owner, generateRepoOption.owner) && Objects.equals(this._private, generateRepoOption._private) && + Objects.equals(this.protectedBranch, generateRepoOption.protectedBranch) && Objects.equals(this.topics, generateRepoOption.topics) && Objects.equals(this.webhooks, generateRepoOption.webhooks); } @Override public int hashCode() { - return Objects.hash(avatar, defaultBranch, description, gitContent, gitHooks, labels, name, owner, _private, topics, webhooks); + return Objects.hash(avatar, defaultBranch, description, gitContent, gitHooks, labels, name, owner, _private, protectedBranch, topics, webhooks); } @@ -304,6 +326,7 @@ public class GenerateRepoOption { sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); + sb.append(" protectedBranch: ").append(toIndentedString(protectedBranch)).append("\n"); sb.append(" topics: ").append(toIndentedString(topics)).append("\n"); sb.append(" webhooks: ").append(toIndentedString(webhooks)).append("\n"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/GitBlobResponse.java b/src/main/java/io/gitea/model/GitBlobResponse.java index 6bbd6cc..6cdfb50 100644 --- a/src/main/java/io/gitea/model/GitBlobResponse.java +++ b/src/main/java/io/gitea/model/GitBlobResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GitEntry.java b/src/main/java/io/gitea/model/GitEntry.java index a083fcc..2cd9ad1 100644 --- a/src/main/java/io/gitea/model/GitEntry.java +++ b/src/main/java/io/gitea/model/GitEntry.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GitHook.java b/src/main/java/io/gitea/model/GitHook.java index fbeda3f..3140138 100644 --- a/src/main/java/io/gitea/model/GitHook.java +++ b/src/main/java/io/gitea/model/GitHook.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GitObject.java b/src/main/java/io/gitea/model/GitObject.java index c5975ed..2612b94 100644 --- a/src/main/java/io/gitea/model/GitObject.java +++ b/src/main/java/io/gitea/model/GitObject.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GitTreeResponse.java b/src/main/java/io/gitea/model/GitTreeResponse.java index 823b39d..190addf 100644 --- a/src/main/java/io/gitea/model/GitTreeResponse.java +++ b/src/main/java/io/gitea/model/GitTreeResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/GitignoreTemplateInfo.java b/src/main/java/io/gitea/model/GitignoreTemplateInfo.java new file mode 100644 index 0000000..574fa3a --- /dev/null +++ b/src/main/java/io/gitea/model/GitignoreTemplateInfo.java @@ -0,0 +1,118 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * GitignoreTemplateInfo name and text of a gitignore template + */ +@ApiModel(description = "GitignoreTemplateInfo name and text of a gitignore template") + +public class GitignoreTemplateInfo { + @SerializedName("name") + private String name = null; + + @SerializedName("source") + private String source = null; + + public GitignoreTemplateInfo name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public GitignoreTemplateInfo source(String source) { + this.source = source; + return this; + } + + /** + * Get source + * @return source + **/ + @ApiModelProperty(value = "") + public String getSource() { + return source; + } + + public void setSource(String source) { + this.source = source; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GitignoreTemplateInfo gitignoreTemplateInfo = (GitignoreTemplateInfo) o; + return Objects.equals(this.name, gitignoreTemplateInfo.name) && + Objects.equals(this.source, gitignoreTemplateInfo.source); + } + + @Override + public int hashCode() { + return Objects.hash(name, source); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GitignoreTemplateInfo {\n"); + + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" source: ").append(toIndentedString(source)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/Hook.java b/src/main/java/io/gitea/model/Hook.java index adb5d44..408689c 100644 --- a/src/main/java/io/gitea/model/Hook.java +++ b/src/main/java/io/gitea/model/Hook.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -38,6 +38,12 @@ public class Hook { @SerializedName("active") private Boolean active = null; + @SerializedName("authorization_header") + private String authorizationHeader = null; + + @SerializedName("branch_filter") + private String branchFilter = null; + @SerializedName("config") private Map config = null; @@ -74,6 +80,42 @@ public class Hook { this.active = active; } + public Hook authorizationHeader(String authorizationHeader) { + this.authorizationHeader = authorizationHeader; + return this; + } + + /** + * Get authorizationHeader + * @return authorizationHeader + **/ + @ApiModelProperty(value = "") + public String getAuthorizationHeader() { + return authorizationHeader; + } + + public void setAuthorizationHeader(String authorizationHeader) { + this.authorizationHeader = authorizationHeader; + } + + public Hook branchFilter(String branchFilter) { + this.branchFilter = branchFilter; + return this; + } + + /** + * Get branchFilter + * @return branchFilter + **/ + @ApiModelProperty(value = "") + public String getBranchFilter() { + return branchFilter; + } + + public void setBranchFilter(String branchFilter) { + this.branchFilter = branchFilter; + } + public Hook config(Map config) { this.config = config; return this; @@ -209,6 +251,8 @@ public class Hook { } Hook hook = (Hook) o; return Objects.equals(this.active, hook.active) && + Objects.equals(this.authorizationHeader, hook.authorizationHeader) && + Objects.equals(this.branchFilter, hook.branchFilter) && Objects.equals(this.config, hook.config) && Objects.equals(this.createdAt, hook.createdAt) && Objects.equals(this.events, hook.events) && @@ -219,7 +263,7 @@ public class Hook { @Override public int hashCode() { - return Objects.hash(active, config, createdAt, events, id, type, updatedAt); + return Objects.hash(active, authorizationHeader, branchFilter, config, createdAt, events, id, type, updatedAt); } @@ -229,6 +273,8 @@ public class Hook { sb.append("class Hook {\n"); sb.append(" active: ").append(toIndentedString(active)).append("\n"); + sb.append(" authorizationHeader: ").append(toIndentedString(authorizationHeader)).append("\n"); + sb.append(" branchFilter: ").append(toIndentedString(branchFilter)).append("\n"); sb.append(" config: ").append(toIndentedString(config)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" events: ").append(toIndentedString(events)).append("\n"); diff --git a/src/main/java/io/gitea/model/Identity.java b/src/main/java/io/gitea/model/Identity.java index c915381..f4665bc 100644 --- a/src/main/java/io/gitea/model/Identity.java +++ b/src/main/java/io/gitea/model/Identity.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/InlineResponse200.java b/src/main/java/io/gitea/model/InlineResponse200.java index dd8549f..124d20d 100644 --- a/src/main/java/io/gitea/model/InlineResponse200.java +++ b/src/main/java/io/gitea/model/InlineResponse200.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/InlineResponse2001.java b/src/main/java/io/gitea/model/InlineResponse2001.java index 7bf69ad..d7c5de4 100644 --- a/src/main/java/io/gitea/model/InlineResponse2001.java +++ b/src/main/java/io/gitea/model/InlineResponse2001.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/InternalTracker.java b/src/main/java/io/gitea/model/InternalTracker.java index d69dbed..aeb4339 100644 --- a/src/main/java/io/gitea/model/InternalTracker.java +++ b/src/main/java/io/gitea/model/InternalTracker.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Issue.java b/src/main/java/io/gitea/model/Issue.java index bcfe8d2..58aeeb6 100644 --- a/src/main/java/io/gitea/model/Issue.java +++ b/src/main/java/io/gitea/model/Issue.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -20,6 +20,7 @@ import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; +import io.gitea.model.Attachment; import io.gitea.model.Label; import io.gitea.model.Milestone; import io.gitea.model.PullRequestMeta; @@ -38,6 +39,9 @@ import org.threeten.bp.OffsetDateTime; @ApiModel(description = "Issue represents an issue in a repository") public class Issue { + @SerializedName("assets") + private List assets = null; + @SerializedName("assignee") private User assignee = null; @@ -83,6 +87,9 @@ public class Issue { @SerializedName("original_author_id") private Long originalAuthorId = null; + @SerializedName("pin_order") + private Long pinOrder = null; + @SerializedName("pull_request") private PullRequestMeta pullRequest = null; @@ -107,6 +114,32 @@ public class Issue { @SerializedName("user") private User user = null; + public Issue assets(List assets) { + this.assets = assets; + return this; + } + + public Issue addAssetsItem(Attachment assetsItem) { + if (this.assets == null) { + this.assets = new ArrayList(); + } + this.assets.add(assetsItem); + return this; + } + + /** + * Get assets + * @return assets + **/ + @ApiModelProperty(value = "") + public List getAssets() { + return assets; + } + + public void setAssets(List assets) { + this.assets = assets; + } + public Issue assignee(User assignee) { this.assignee = assignee; return this; @@ -393,6 +426,24 @@ public class Issue { this.originalAuthorId = originalAuthorId; } + public Issue pinOrder(Long pinOrder) { + this.pinOrder = pinOrder; + return this; + } + + /** + * Get pinOrder + * @return pinOrder + **/ + @ApiModelProperty(value = "") + public Long getPinOrder() { + return pinOrder; + } + + public void setPinOrder(Long pinOrder) { + this.pinOrder = pinOrder; + } + public Issue pullRequest(PullRequestMeta pullRequest) { this.pullRequest = pullRequest; return this; @@ -547,7 +598,8 @@ public class Issue { return false; } Issue issue = (Issue) o; - return Objects.equals(this.assignee, issue.assignee) && + return Objects.equals(this.assets, issue.assets) && + Objects.equals(this.assignee, issue.assignee) && Objects.equals(this.assignees, issue.assignees) && Objects.equals(this.body, issue.body) && Objects.equals(this.closedAt, issue.closedAt) && @@ -562,6 +614,7 @@ public class Issue { Objects.equals(this.number, issue.number) && Objects.equals(this.originalAuthor, issue.originalAuthor) && Objects.equals(this.originalAuthorId, issue.originalAuthorId) && + Objects.equals(this.pinOrder, issue.pinOrder) && Objects.equals(this.pullRequest, issue.pullRequest) && Objects.equals(this.ref, issue.ref) && Objects.equals(this.repository, issue.repository) && @@ -574,7 +627,7 @@ public class Issue { @Override public int hashCode() { - return Objects.hash(assignee, assignees, body, closedAt, comments, createdAt, dueDate, htmlUrl, id, isLocked, labels, milestone, number, originalAuthor, originalAuthorId, pullRequest, ref, repository, state, title, updatedAt, url, user); + return Objects.hash(assets, assignee, assignees, body, closedAt, comments, createdAt, dueDate, htmlUrl, id, isLocked, labels, milestone, number, originalAuthor, originalAuthorId, pinOrder, pullRequest, ref, repository, state, title, updatedAt, url, user); } @@ -583,6 +636,7 @@ public class Issue { StringBuilder sb = new StringBuilder(); sb.append("class Issue {\n"); + sb.append(" assets: ").append(toIndentedString(assets)).append("\n"); sb.append(" assignee: ").append(toIndentedString(assignee)).append("\n"); sb.append(" assignees: ").append(toIndentedString(assignees)).append("\n"); sb.append(" body: ").append(toIndentedString(body)).append("\n"); @@ -598,6 +652,7 @@ public class Issue { sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n"); sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n"); + sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n"); sb.append(" pullRequest: ").append(toIndentedString(pullRequest)).append("\n"); sb.append(" ref: ").append(toIndentedString(ref)).append("\n"); sb.append(" repository: ").append(toIndentedString(repository)).append("\n"); diff --git a/src/main/java/io/gitea/model/IssueConfig.java b/src/main/java/io/gitea/model/IssueConfig.java new file mode 100644 index 0000000..537c9fe --- /dev/null +++ b/src/main/java/io/gitea/model/IssueConfig.java @@ -0,0 +1,128 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.gitea.model.IssueConfigContactLink; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * IssueConfig + */ + +public class IssueConfig { + @SerializedName("blank_issues_enabled") + private Boolean blankIssuesEnabled = null; + + @SerializedName("contact_links") + private List contactLinks = null; + + public IssueConfig blankIssuesEnabled(Boolean blankIssuesEnabled) { + this.blankIssuesEnabled = blankIssuesEnabled; + return this; + } + + /** + * Get blankIssuesEnabled + * @return blankIssuesEnabled + **/ + @ApiModelProperty(value = "") + public Boolean isBlankIssuesEnabled() { + return blankIssuesEnabled; + } + + public void setBlankIssuesEnabled(Boolean blankIssuesEnabled) { + this.blankIssuesEnabled = blankIssuesEnabled; + } + + public IssueConfig contactLinks(List contactLinks) { + this.contactLinks = contactLinks; + return this; + } + + public IssueConfig addContactLinksItem(IssueConfigContactLink contactLinksItem) { + if (this.contactLinks == null) { + this.contactLinks = new ArrayList(); + } + this.contactLinks.add(contactLinksItem); + return this; + } + + /** + * Get contactLinks + * @return contactLinks + **/ + @ApiModelProperty(value = "") + public List getContactLinks() { + return contactLinks; + } + + public void setContactLinks(List contactLinks) { + this.contactLinks = contactLinks; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueConfig issueConfig = (IssueConfig) o; + return Objects.equals(this.blankIssuesEnabled, issueConfig.blankIssuesEnabled) && + Objects.equals(this.contactLinks, issueConfig.contactLinks); + } + + @Override + public int hashCode() { + return Objects.hash(blankIssuesEnabled, contactLinks); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueConfig {\n"); + + sb.append(" blankIssuesEnabled: ").append(toIndentedString(blankIssuesEnabled)).append("\n"); + sb.append(" contactLinks: ").append(toIndentedString(contactLinks)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/IssueConfigContactLink.java b/src/main/java/io/gitea/model/IssueConfigContactLink.java new file mode 100644 index 0000000..a491617 --- /dev/null +++ b/src/main/java/io/gitea/model/IssueConfigContactLink.java @@ -0,0 +1,140 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * IssueConfigContactLink + */ + +public class IssueConfigContactLink { + @SerializedName("about") + private String about = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("url") + private String url = null; + + public IssueConfigContactLink about(String about) { + this.about = about; + return this; + } + + /** + * Get about + * @return about + **/ + @ApiModelProperty(value = "") + public String getAbout() { + return about; + } + + public void setAbout(String about) { + this.about = about; + } + + public IssueConfigContactLink name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public IssueConfigContactLink url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @ApiModelProperty(value = "") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueConfigContactLink issueConfigContactLink = (IssueConfigContactLink) o; + return Objects.equals(this.about, issueConfigContactLink.about) && + Objects.equals(this.name, issueConfigContactLink.name) && + Objects.equals(this.url, issueConfigContactLink.url); + } + + @Override + public int hashCode() { + return Objects.hash(about, name, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueConfigContactLink {\n"); + + sb.append(" about: ").append(toIndentedString(about)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/IssueConfigValidation.java b/src/main/java/io/gitea/model/IssueConfigValidation.java new file mode 100644 index 0000000..a437cb9 --- /dev/null +++ b/src/main/java/io/gitea/model/IssueConfigValidation.java @@ -0,0 +1,117 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * IssueConfigValidation + */ + +public class IssueConfigValidation { + @SerializedName("message") + private String message = null; + + @SerializedName("valid") + private Boolean valid = null; + + public IssueConfigValidation message(String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + **/ + @ApiModelProperty(value = "") + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public IssueConfigValidation valid(Boolean valid) { + this.valid = valid; + return this; + } + + /** + * Get valid + * @return valid + **/ + @ApiModelProperty(value = "") + public Boolean isValid() { + return valid; + } + + public void setValid(Boolean valid) { + this.valid = valid; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueConfigValidation issueConfigValidation = (IssueConfigValidation) o; + return Objects.equals(this.message, issueConfigValidation.message) && + Objects.equals(this.valid, issueConfigValidation.valid); + } + + @Override + public int hashCode() { + return Objects.hash(message, valid); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueConfigValidation {\n"); + + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" valid: ").append(toIndentedString(valid)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/IssueDeadline.java b/src/main/java/io/gitea/model/IssueDeadline.java index 3849201..c3327b0 100644 --- a/src/main/java/io/gitea/model/IssueDeadline.java +++ b/src/main/java/io/gitea/model/IssueDeadline.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/IssueFormField.java b/src/main/java/io/gitea/model/IssueFormField.java index 5a5aff4..e567cb2 100644 --- a/src/main/java/io/gitea/model/IssueFormField.java +++ b/src/main/java/io/gitea/model/IssueFormField.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/IssueLabelsOption.java b/src/main/java/io/gitea/model/IssueLabelsOption.java index 2110548..71c49bb 100644 --- a/src/main/java/io/gitea/model/IssueLabelsOption.java +++ b/src/main/java/io/gitea/model/IssueLabelsOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/IssueMeta.java b/src/main/java/io/gitea/model/IssueMeta.java new file mode 100644 index 0000000..5e0d995 --- /dev/null +++ b/src/main/java/io/gitea/model/IssueMeta.java @@ -0,0 +1,141 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * IssueMeta basic issue information + */ +@ApiModel(description = "IssueMeta basic issue information") + +public class IssueMeta { + @SerializedName("index") + private Long index = null; + + @SerializedName("owner") + private String owner = null; + + @SerializedName("repo") + private String repo = null; + + public IssueMeta index(Long index) { + this.index = index; + return this; + } + + /** + * Get index + * @return index + **/ + @ApiModelProperty(value = "") + public Long getIndex() { + return index; + } + + public void setIndex(Long index) { + this.index = index; + } + + public IssueMeta owner(String owner) { + this.owner = owner; + return this; + } + + /** + * Get owner + * @return owner + **/ + @ApiModelProperty(value = "") + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public IssueMeta repo(String repo) { + this.repo = repo; + return this; + } + + /** + * Get repo + * @return repo + **/ + @ApiModelProperty(value = "") + public String getRepo() { + return repo; + } + + public void setRepo(String repo) { + this.repo = repo; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + IssueMeta issueMeta = (IssueMeta) o; + return Objects.equals(this.index, issueMeta.index) && + Objects.equals(this.owner, issueMeta.owner) && + Objects.equals(this.repo, issueMeta.repo); + } + + @Override + public int hashCode() { + return Objects.hash(index, owner, repo); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class IssueMeta {\n"); + + sb.append(" index: ").append(toIndentedString(index)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" repo: ").append(toIndentedString(repo)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/IssueTemplate.java b/src/main/java/io/gitea/model/IssueTemplate.java index 2519fa7..cab0ba3 100644 --- a/src/main/java/io/gitea/model/IssueTemplate.java +++ b/src/main/java/io/gitea/model/IssueTemplate.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/IssueTemplateLabels.java b/src/main/java/io/gitea/model/IssueTemplateLabels.java index 83bb60f..a014540 100644 --- a/src/main/java/io/gitea/model/IssueTemplateLabels.java +++ b/src/main/java/io/gitea/model/IssueTemplateLabels.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Label.java b/src/main/java/io/gitea/model/Label.java index d24cc83..db94f0b 100644 --- a/src/main/java/io/gitea/model/Label.java +++ b/src/main/java/io/gitea/model/Label.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,9 +36,15 @@ public class Label { @SerializedName("description") private String description = null; + @SerializedName("exclusive") + private Boolean exclusive = null; + @SerializedName("id") private Long id = null; + @SerializedName("is_archived") + private Boolean isArchived = null; + @SerializedName("name") private String name = null; @@ -81,6 +87,24 @@ public class Label { this.description = description; } + public Label exclusive(Boolean exclusive) { + this.exclusive = exclusive; + return this; + } + + /** + * Get exclusive + * @return exclusive + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isExclusive() { + return exclusive; + } + + public void setExclusive(Boolean exclusive) { + this.exclusive = exclusive; + } + public Label id(Long id) { this.id = id; return this; @@ -99,6 +123,24 @@ public class Label { this.id = id; } + public Label isArchived(Boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + /** + * Get isArchived + * @return isArchived + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isIsArchived() { + return isArchived; + } + + public void setIsArchived(Boolean isArchived) { + this.isArchived = isArchived; + } + public Label name(String name) { this.name = name; return this; @@ -147,14 +189,16 @@ public class Label { Label label = (Label) o; return Objects.equals(this.color, label.color) && Objects.equals(this.description, label.description) && + Objects.equals(this.exclusive, label.exclusive) && Objects.equals(this.id, label.id) && + Objects.equals(this.isArchived, label.isArchived) && Objects.equals(this.name, label.name) && Objects.equals(this.url, label.url); } @Override public int hashCode() { - return Objects.hash(color, description, id, name, url); + return Objects.hash(color, description, exclusive, id, isArchived, name, url); } @@ -165,7 +209,9 @@ public class Label { sb.append(" color: ").append(toIndentedString(color)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" exclusive: ").append(toIndentedString(exclusive)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" isArchived: ").append(toIndentedString(isArchived)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/LabelTemplate.java b/src/main/java/io/gitea/model/LabelTemplate.java new file mode 100644 index 0000000..1779271 --- /dev/null +++ b/src/main/java/io/gitea/model/LabelTemplate.java @@ -0,0 +1,164 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * LabelTemplate info of a Label template + */ +@ApiModel(description = "LabelTemplate info of a Label template") + +public class LabelTemplate { + @SerializedName("color") + private String color = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("exclusive") + private Boolean exclusive = null; + + @SerializedName("name") + private String name = null; + + public LabelTemplate color(String color) { + this.color = color; + return this; + } + + /** + * Get color + * @return color + **/ + @ApiModelProperty(example = "00aabb", value = "") + public String getColor() { + return color; + } + + public void setColor(String color) { + this.color = color; + } + + public LabelTemplate description(String description) { + this.description = description; + return this; + } + + /** + * Get description + * @return description + **/ + @ApiModelProperty(value = "") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public LabelTemplate exclusive(Boolean exclusive) { + this.exclusive = exclusive; + return this; + } + + /** + * Get exclusive + * @return exclusive + **/ + @ApiModelProperty(example = "false", value = "") + public Boolean isExclusive() { + return exclusive; + } + + public void setExclusive(Boolean exclusive) { + this.exclusive = exclusive; + } + + public LabelTemplate name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LabelTemplate labelTemplate = (LabelTemplate) o; + return Objects.equals(this.color, labelTemplate.color) && + Objects.equals(this.description, labelTemplate.description) && + Objects.equals(this.exclusive, labelTemplate.exclusive) && + Objects.equals(this.name, labelTemplate.name); + } + + @Override + public int hashCode() { + return Objects.hash(color, description, exclusive, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LabelTemplate {\n"); + + sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" exclusive: ").append(toIndentedString(exclusive)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/LicenseTemplateInfo.java b/src/main/java/io/gitea/model/LicenseTemplateInfo.java new file mode 100644 index 0000000..2292b24 --- /dev/null +++ b/src/main/java/io/gitea/model/LicenseTemplateInfo.java @@ -0,0 +1,187 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * LicensesInfo contains information about a License + */ +@ApiModel(description = "LicensesInfo contains information about a License") + +public class LicenseTemplateInfo { + @SerializedName("body") + private String body = null; + + @SerializedName("implementation") + private String implementation = null; + + @SerializedName("key") + private String key = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("url") + private String url = null; + + public LicenseTemplateInfo body(String body) { + this.body = body; + return this; + } + + /** + * Get body + * @return body + **/ + @ApiModelProperty(value = "") + public String getBody() { + return body; + } + + public void setBody(String body) { + this.body = body; + } + + public LicenseTemplateInfo implementation(String implementation) { + this.implementation = implementation; + return this; + } + + /** + * Get implementation + * @return implementation + **/ + @ApiModelProperty(value = "") + public String getImplementation() { + return implementation; + } + + public void setImplementation(String implementation) { + this.implementation = implementation; + } + + public LicenseTemplateInfo key(String key) { + this.key = key; + return this; + } + + /** + * Get key + * @return key + **/ + @ApiModelProperty(value = "") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public LicenseTemplateInfo name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LicenseTemplateInfo url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @ApiModelProperty(value = "") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LicenseTemplateInfo licenseTemplateInfo = (LicenseTemplateInfo) o; + return Objects.equals(this.body, licenseTemplateInfo.body) && + Objects.equals(this.implementation, licenseTemplateInfo.implementation) && + Objects.equals(this.key, licenseTemplateInfo.key) && + Objects.equals(this.name, licenseTemplateInfo.name) && + Objects.equals(this.url, licenseTemplateInfo.url); + } + + @Override + public int hashCode() { + return Objects.hash(body, implementation, key, name, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LicenseTemplateInfo {\n"); + + sb.append(" body: ").append(toIndentedString(body)).append("\n"); + sb.append(" implementation: ").append(toIndentedString(implementation)).append("\n"); + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/LicensesTemplateListEntry.java b/src/main/java/io/gitea/model/LicensesTemplateListEntry.java new file mode 100644 index 0000000..0721e39 --- /dev/null +++ b/src/main/java/io/gitea/model/LicensesTemplateListEntry.java @@ -0,0 +1,141 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * LicensesListEntry is used for the API + */ +@ApiModel(description = "LicensesListEntry is used for the API") + +public class LicensesTemplateListEntry { + @SerializedName("key") + private String key = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("url") + private String url = null; + + public LicensesTemplateListEntry key(String key) { + this.key = key; + return this; + } + + /** + * Get key + * @return key + **/ + @ApiModelProperty(value = "") + public String getKey() { + return key; + } + + public void setKey(String key) { + this.key = key; + } + + public LicensesTemplateListEntry name(String name) { + this.name = name; + return this; + } + + /** + * Get name + * @return name + **/ + @ApiModelProperty(value = "") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public LicensesTemplateListEntry url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @ApiModelProperty(value = "") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + LicensesTemplateListEntry licensesTemplateListEntry = (LicensesTemplateListEntry) o; + return Objects.equals(this.key, licensesTemplateListEntry.key) && + Objects.equals(this.name, licensesTemplateListEntry.name) && + Objects.equals(this.url, licensesTemplateListEntry.url); + } + + @Override + public int hashCode() { + return Objects.hash(key, name, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class LicensesTemplateListEntry {\n"); + + sb.append(" key: ").append(toIndentedString(key)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/MarkdownOption.java b/src/main/java/io/gitea/model/MarkdownOption.java index 1b57aff..517dc18 100644 --- a/src/main/java/io/gitea/model/MarkdownOption.java +++ b/src/main/java/io/gitea/model/MarkdownOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -66,10 +66,10 @@ public class MarkdownOption { } /** - * Mode to render in: body + * Mode to render (comment, gfm, markdown) in: body * @return mode **/ - @ApiModelProperty(value = "Mode to render in: body") + @ApiModelProperty(value = "Mode to render (comment, gfm, markdown) in: body") public String getMode() { return mode; } diff --git a/src/main/java/io/gitea/model/MarkupOption.java b/src/main/java/io/gitea/model/MarkupOption.java new file mode 100644 index 0000000..e7a37f0 --- /dev/null +++ b/src/main/java/io/gitea/model/MarkupOption.java @@ -0,0 +1,187 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * MarkupOption markup options + */ +@ApiModel(description = "MarkupOption markup options") + +public class MarkupOption { + @SerializedName("Context") + private String context = null; + + @SerializedName("FilePath") + private String filePath = null; + + @SerializedName("Mode") + private String mode = null; + + @SerializedName("Text") + private String text = null; + + @SerializedName("Wiki") + private Boolean wiki = null; + + public MarkupOption context(String context) { + this.context = context; + return this; + } + + /** + * Context to render in: body + * @return context + **/ + @ApiModelProperty(value = "Context to render in: body") + public String getContext() { + return context; + } + + public void setContext(String context) { + this.context = context; + } + + public MarkupOption filePath(String filePath) { + this.filePath = filePath; + return this; + } + + /** + * File path for detecting extension in file mode in: body + * @return filePath + **/ + @ApiModelProperty(value = "File path for detecting extension in file mode in: body") + public String getFilePath() { + return filePath; + } + + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + public MarkupOption mode(String mode) { + this.mode = mode; + return this; + } + + /** + * Mode to render (comment, gfm, markdown, file) in: body + * @return mode + **/ + @ApiModelProperty(value = "Mode to render (comment, gfm, markdown, file) in: body") + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public MarkupOption text(String text) { + this.text = text; + return this; + } + + /** + * Text markup to render in: body + * @return text + **/ + @ApiModelProperty(value = "Text markup to render in: body") + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + } + + public MarkupOption wiki(Boolean wiki) { + this.wiki = wiki; + return this; + } + + /** + * Is it a wiki page ? in: body + * @return wiki + **/ + @ApiModelProperty(value = "Is it a wiki page ? in: body") + public Boolean isWiki() { + return wiki; + } + + public void setWiki(Boolean wiki) { + this.wiki = wiki; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkupOption markupOption = (MarkupOption) o; + return Objects.equals(this.context, markupOption.context) && + Objects.equals(this.filePath, markupOption.filePath) && + Objects.equals(this.mode, markupOption.mode) && + Objects.equals(this.text, markupOption.text) && + Objects.equals(this.wiki, markupOption.wiki); + } + + @Override + public int hashCode() { + return Objects.hash(context, filePath, mode, text, wiki); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MarkupOption {\n"); + + sb.append(" context: ").append(toIndentedString(context)).append("\n"); + sb.append(" filePath: ").append(toIndentedString(filePath)).append("\n"); + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" text: ").append(toIndentedString(text)).append("\n"); + sb.append(" wiki: ").append(toIndentedString(wiki)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/MergePullRequestOption.java b/src/main/java/io/gitea/model/MergePullRequestOption.java index 9d56162..d9132fd 100644 --- a/src/main/java/io/gitea/model/MergePullRequestOption.java +++ b/src/main/java/io/gitea/model/MergePullRequestOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/MigrateRepoOptions.java b/src/main/java/io/gitea/model/MigrateRepoOptions.java index 80d2aa6..9411e50 100644 --- a/src/main/java/io/gitea/model/MigrateRepoOptions.java +++ b/src/main/java/io/gitea/model/MigrateRepoOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -92,7 +92,15 @@ public class MigrateRepoOptions { GITEA("gitea"), - GITLAB("gitlab"); + GITLAB("gitlab"), + + GOGS("gogs"), + + ONEDEV("onedev"), + + GITBUCKET("gitbucket"), + + CODEBASE("codebase"); private String value; diff --git a/src/main/java/io/gitea/model/Milestone.java b/src/main/java/io/gitea/model/Milestone.java index 89b503a..e4c5e39 100644 --- a/src/main/java/io/gitea/model/Milestone.java +++ b/src/main/java/io/gitea/model/Milestone.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/ModelPackage.java b/src/main/java/io/gitea/model/ModelPackage.java index c41fcfa..a6469e4 100644 --- a/src/main/java/io/gitea/model/ModelPackage.java +++ b/src/main/java/io/gitea/model/ModelPackage.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -39,6 +39,9 @@ public class ModelPackage { @SerializedName("creator") private User creator = null; + @SerializedName("html_url") + private String htmlUrl = null; + @SerializedName("id") private Long id = null; @@ -93,6 +96,24 @@ public class ModelPackage { this.creator = creator; } + public ModelPackage htmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + return this; + } + + /** + * Get htmlUrl + * @return htmlUrl + **/ + @ApiModelProperty(value = "") + public String getHtmlUrl() { + return htmlUrl; + } + + public void setHtmlUrl(String htmlUrl) { + this.htmlUrl = htmlUrl; + } + public ModelPackage id(Long id) { this.id = id; return this; @@ -213,6 +234,7 @@ public class ModelPackage { ModelPackage _package = (ModelPackage) o; return Objects.equals(this.createdAt, _package.createdAt) && Objects.equals(this.creator, _package.creator) && + Objects.equals(this.htmlUrl, _package.htmlUrl) && Objects.equals(this.id, _package.id) && Objects.equals(this.name, _package.name) && Objects.equals(this.owner, _package.owner) && @@ -223,7 +245,7 @@ public class ModelPackage { @Override public int hashCode() { - return Objects.hash(createdAt, creator, id, name, owner, repository, type, version); + return Objects.hash(createdAt, creator, htmlUrl, id, name, owner, repository, type, version); } @@ -234,6 +256,7 @@ public class ModelPackage { sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" creator: ").append(toIndentedString(creator)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); diff --git a/src/main/java/io/gitea/model/NewIssuePinsAllowed.java b/src/main/java/io/gitea/model/NewIssuePinsAllowed.java new file mode 100644 index 0000000..733f158 --- /dev/null +++ b/src/main/java/io/gitea/model/NewIssuePinsAllowed.java @@ -0,0 +1,118 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed + */ +@ApiModel(description = "NewIssuePinsAllowed represents an API response that says if new Issue Pins are allowed") + +public class NewIssuePinsAllowed { + @SerializedName("issues") + private Boolean issues = null; + + @SerializedName("pull_requests") + private Boolean pullRequests = null; + + public NewIssuePinsAllowed issues(Boolean issues) { + this.issues = issues; + return this; + } + + /** + * Get issues + * @return issues + **/ + @ApiModelProperty(value = "") + public Boolean isIssues() { + return issues; + } + + public void setIssues(Boolean issues) { + this.issues = issues; + } + + public NewIssuePinsAllowed pullRequests(Boolean pullRequests) { + this.pullRequests = pullRequests; + return this; + } + + /** + * Get pullRequests + * @return pullRequests + **/ + @ApiModelProperty(value = "") + public Boolean isPullRequests() { + return pullRequests; + } + + public void setPullRequests(Boolean pullRequests) { + this.pullRequests = pullRequests; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NewIssuePinsAllowed newIssuePinsAllowed = (NewIssuePinsAllowed) o; + return Objects.equals(this.issues, newIssuePinsAllowed.issues) && + Objects.equals(this.pullRequests, newIssuePinsAllowed.pullRequests); + } + + @Override + public int hashCode() { + return Objects.hash(issues, pullRequests); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class NewIssuePinsAllowed {\n"); + + sb.append(" issues: ").append(toIndentedString(issues)).append("\n"); + sb.append(" pullRequests: ").append(toIndentedString(pullRequests)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/NodeInfo.java b/src/main/java/io/gitea/model/NodeInfo.java index 1fe4b03..938d0dc 100644 --- a/src/main/java/io/gitea/model/NodeInfo.java +++ b/src/main/java/io/gitea/model/NodeInfo.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NodeInfoServices.java b/src/main/java/io/gitea/model/NodeInfoServices.java index de2b439..29ed255 100644 --- a/src/main/java/io/gitea/model/NodeInfoServices.java +++ b/src/main/java/io/gitea/model/NodeInfoServices.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NodeInfoSoftware.java b/src/main/java/io/gitea/model/NodeInfoSoftware.java index e19e8a2..51a3349 100644 --- a/src/main/java/io/gitea/model/NodeInfoSoftware.java +++ b/src/main/java/io/gitea/model/NodeInfoSoftware.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NodeInfoUsage.java b/src/main/java/io/gitea/model/NodeInfoUsage.java index 27de51f..9d038d8 100644 --- a/src/main/java/io/gitea/model/NodeInfoUsage.java +++ b/src/main/java/io/gitea/model/NodeInfoUsage.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NodeInfoUsageUsers.java b/src/main/java/io/gitea/model/NodeInfoUsageUsers.java index bbdef82..9894d38 100644 --- a/src/main/java/io/gitea/model/NodeInfoUsageUsers.java +++ b/src/main/java/io/gitea/model/NodeInfoUsageUsers.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Note.java b/src/main/java/io/gitea/model/Note.java index a8ffcb7..31e55d6 100644 --- a/src/main/java/io/gitea/model/Note.java +++ b/src/main/java/io/gitea/model/Note.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NotificationCount.java b/src/main/java/io/gitea/model/NotificationCount.java index 1ba602d..f20f257 100644 --- a/src/main/java/io/gitea/model/NotificationCount.java +++ b/src/main/java/io/gitea/model/NotificationCount.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NotificationSubject.java b/src/main/java/io/gitea/model/NotificationSubject.java index b8adac4..6aadce8 100644 --- a/src/main/java/io/gitea/model/NotificationSubject.java +++ b/src/main/java/io/gitea/model/NotificationSubject.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/NotificationThread.java b/src/main/java/io/gitea/model/NotificationThread.java index d18edfc..447456d 100644 --- a/src/main/java/io/gitea/model/NotificationThread.java +++ b/src/main/java/io/gitea/model/NotificationThread.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/OAuth2Application.java b/src/main/java/io/gitea/model/OAuth2Application.java index b5e1063..c4cad7c 100644 --- a/src/main/java/io/gitea/model/OAuth2Application.java +++ b/src/main/java/io/gitea/model/OAuth2Application.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Organization.java b/src/main/java/io/gitea/model/Organization.java index 00a0cf2..525c4c5 100644 --- a/src/main/java/io/gitea/model/Organization.java +++ b/src/main/java/io/gitea/model/Organization.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -36,6 +36,9 @@ public class Organization { @SerializedName("description") private String description = null; + @SerializedName("email") + private String email = null; + @SerializedName("full_name") private String fullName = null; @@ -96,6 +99,24 @@ public class Organization { this.description = description; } + public Organization email(String email) { + this.email = email; + return this; + } + + /** + * Get email + * @return email + **/ + @ApiModelProperty(value = "") + public String getEmail() { + return email; + } + + public void setEmail(String email) { + this.email = email; + } + public Organization fullName(String fullName) { this.fullName = fullName; return this; @@ -252,6 +273,7 @@ public class Organization { Organization organization = (Organization) o; return Objects.equals(this.avatarUrl, organization.avatarUrl) && Objects.equals(this.description, organization.description) && + Objects.equals(this.email, organization.email) && Objects.equals(this.fullName, organization.fullName) && Objects.equals(this.id, organization.id) && Objects.equals(this.location, organization.location) && @@ -264,7 +286,7 @@ public class Organization { @Override public int hashCode() { - return Objects.hash(avatarUrl, description, fullName, id, location, name, repoAdminChangeTeamAccess, username, visibility, website); + return Objects.hash(avatarUrl, description, email, fullName, id, location, name, repoAdminChangeTeamAccess, username, visibility, website); } @@ -275,6 +297,7 @@ public class Organization { sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" location: ").append(toIndentedString(location)).append("\n"); diff --git a/src/main/java/io/gitea/model/OrganizationPermissions.java b/src/main/java/io/gitea/model/OrganizationPermissions.java index 0d334d2..a5d0be6 100644 --- a/src/main/java/io/gitea/model/OrganizationPermissions.java +++ b/src/main/java/io/gitea/model/OrganizationPermissions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PRBranchInfo.java b/src/main/java/io/gitea/model/PRBranchInfo.java index fe9450e..4872a66 100644 --- a/src/main/java/io/gitea/model/PRBranchInfo.java +++ b/src/main/java/io/gitea/model/PRBranchInfo.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PackageFile.java b/src/main/java/io/gitea/model/PackageFile.java index 683d7fb..1b96b31 100644 --- a/src/main/java/io/gitea/model/PackageFile.java +++ b/src/main/java/io/gitea/model/PackageFile.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PayloadCommit.java b/src/main/java/io/gitea/model/PayloadCommit.java index 797eae9..15cad78 100644 --- a/src/main/java/io/gitea/model/PayloadCommit.java +++ b/src/main/java/io/gitea/model/PayloadCommit.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PayloadCommitVerification.java b/src/main/java/io/gitea/model/PayloadCommitVerification.java index 13ce12e..188b38b 100644 --- a/src/main/java/io/gitea/model/PayloadCommitVerification.java +++ b/src/main/java/io/gitea/model/PayloadCommitVerification.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PayloadUser.java b/src/main/java/io/gitea/model/PayloadUser.java index df195b2..3bc6be9 100644 --- a/src/main/java/io/gitea/model/PayloadUser.java +++ b/src/main/java/io/gitea/model/PayloadUser.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Permission.java b/src/main/java/io/gitea/model/Permission.java index 2c438da..cd4a971 100644 --- a/src/main/java/io/gitea/model/Permission.java +++ b/src/main/java/io/gitea/model/Permission.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PublicKey.java b/src/main/java/io/gitea/model/PublicKey.java index 8fdef1f..07d99a5 100644 --- a/src/main/java/io/gitea/model/PublicKey.java +++ b/src/main/java/io/gitea/model/PublicKey.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PullRequest.java b/src/main/java/io/gitea/model/PullRequest.java index 8ee7628..e0d2024 100644 --- a/src/main/java/io/gitea/model/PullRequest.java +++ b/src/main/java/io/gitea/model/PullRequest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -109,6 +109,12 @@ public class PullRequest { @SerializedName("patch_url") private String patchUrl = null; + @SerializedName("pin_order") + private Long pinOrder = null; + + @SerializedName("requested_reviewers") + private List requestedReviewers = null; + @SerializedName("state") private String state = null; @@ -572,6 +578,50 @@ public class PullRequest { this.patchUrl = patchUrl; } + public PullRequest pinOrder(Long pinOrder) { + this.pinOrder = pinOrder; + return this; + } + + /** + * Get pinOrder + * @return pinOrder + **/ + @ApiModelProperty(value = "") + public Long getPinOrder() { + return pinOrder; + } + + public void setPinOrder(Long pinOrder) { + this.pinOrder = pinOrder; + } + + public PullRequest requestedReviewers(List requestedReviewers) { + this.requestedReviewers = requestedReviewers; + return this; + } + + public PullRequest addRequestedReviewersItem(User requestedReviewersItem) { + if (this.requestedReviewers == null) { + this.requestedReviewers = new ArrayList(); + } + this.requestedReviewers.add(requestedReviewersItem); + return this; + } + + /** + * Get requestedReviewers + * @return requestedReviewers + **/ + @ApiModelProperty(value = "") + public List getRequestedReviewers() { + return requestedReviewers; + } + + public void setRequestedReviewers(List requestedReviewers) { + this.requestedReviewers = requestedReviewers; + } + public PullRequest state(String state) { this.state = state; return this; @@ -696,6 +746,8 @@ public class PullRequest { Objects.equals(this.milestone, pullRequest.milestone) && Objects.equals(this.number, pullRequest.number) && Objects.equals(this.patchUrl, pullRequest.patchUrl) && + Objects.equals(this.pinOrder, pullRequest.pinOrder) && + Objects.equals(this.requestedReviewers, pullRequest.requestedReviewers) && Objects.equals(this.state, pullRequest.state) && Objects.equals(this.title, pullRequest.title) && Objects.equals(this.updatedAt, pullRequest.updatedAt) && @@ -705,7 +757,7 @@ public class PullRequest { @Override public int hashCode() { - return Objects.hash(allowMaintainerEdit, assignee, assignees, base, body, closedAt, comments, createdAt, diffUrl, dueDate, head, htmlUrl, id, isLocked, labels, mergeBase, mergeCommitSha, mergeable, merged, mergedAt, mergedBy, milestone, number, patchUrl, state, title, updatedAt, url, user); + return Objects.hash(allowMaintainerEdit, assignee, assignees, base, body, closedAt, comments, createdAt, diffUrl, dueDate, head, htmlUrl, id, isLocked, labels, mergeBase, mergeCommitSha, mergeable, merged, mergedAt, mergedBy, milestone, number, patchUrl, pinOrder, requestedReviewers, state, title, updatedAt, url, user); } @@ -738,6 +790,8 @@ public class PullRequest { sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n"); sb.append(" number: ").append(toIndentedString(number)).append("\n"); sb.append(" patchUrl: ").append(toIndentedString(patchUrl)).append("\n"); + sb.append(" pinOrder: ").append(toIndentedString(pinOrder)).append("\n"); + sb.append(" requestedReviewers: ").append(toIndentedString(requestedReviewers)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); diff --git a/src/main/java/io/gitea/model/PullRequestMeta.java b/src/main/java/io/gitea/model/PullRequestMeta.java index 17daac3..8d1a008 100644 --- a/src/main/java/io/gitea/model/PullRequestMeta.java +++ b/src/main/java/io/gitea/model/PullRequestMeta.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PullReview.java b/src/main/java/io/gitea/model/PullReview.java index b63e87f..c045712 100644 --- a/src/main/java/io/gitea/model/PullReview.java +++ b/src/main/java/io/gitea/model/PullReview.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -69,6 +69,9 @@ public class PullReview { @SerializedName("team") private Team team = null; + @SerializedName("updated_at") + private OffsetDateTime updatedAt = null; + @SerializedName("user") private User user = null; @@ -288,6 +291,24 @@ public class PullReview { this.team = team; } + public PullReview updatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + return this; + } + + /** + * Get updatedAt + * @return updatedAt + **/ + @ApiModelProperty(value = "") + public OffsetDateTime getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(OffsetDateTime updatedAt) { + this.updatedAt = updatedAt; + } + public PullReview user(User user) { this.user = user; return this; @@ -328,12 +349,13 @@ public class PullReview { Objects.equals(this.state, pullReview.state) && Objects.equals(this.submittedAt, pullReview.submittedAt) && Objects.equals(this.team, pullReview.team) && + Objects.equals(this.updatedAt, pullReview.updatedAt) && Objects.equals(this.user, pullReview.user); } @Override public int hashCode() { - return Objects.hash(body, commentsCount, commitId, dismissed, htmlUrl, id, official, pullRequestUrl, stale, state, submittedAt, team, user); + return Objects.hash(body, commentsCount, commitId, dismissed, htmlUrl, id, official, pullRequestUrl, stale, state, submittedAt, team, updatedAt, user); } @@ -354,6 +376,7 @@ public class PullReview { sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" submittedAt: ").append(toIndentedString(submittedAt)).append("\n"); sb.append(" team: ").append(toIndentedString(team)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" user: ").append(toIndentedString(user)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/PullReviewComment.java b/src/main/java/io/gitea/model/PullReviewComment.java index ccc4913..673f373 100644 --- a/src/main/java/io/gitea/model/PullReviewComment.java +++ b/src/main/java/io/gitea/model/PullReviewComment.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PullReviewRequestOptions.java b/src/main/java/io/gitea/model/PullReviewRequestOptions.java index 9c2bf23..dfd1130 100644 --- a/src/main/java/io/gitea/model/PullReviewRequestOptions.java +++ b/src/main/java/io/gitea/model/PullReviewRequestOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/PushMirror.java b/src/main/java/io/gitea/model/PushMirror.java index 34c062f..6761eb2 100644 --- a/src/main/java/io/gitea/model/PushMirror.java +++ b/src/main/java/io/gitea/model/PushMirror.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -51,6 +51,9 @@ public class PushMirror { @SerializedName("repo_name") private String repoName = null; + @SerializedName("sync_on_commit") + private Boolean syncOnCommit = null; + public PushMirror created(String created) { this.created = created; return this; @@ -177,6 +180,24 @@ public class PushMirror { this.repoName = repoName; } + public PushMirror syncOnCommit(Boolean syncOnCommit) { + this.syncOnCommit = syncOnCommit; + return this; + } + + /** + * Get syncOnCommit + * @return syncOnCommit + **/ + @ApiModelProperty(value = "") + public Boolean isSyncOnCommit() { + return syncOnCommit; + } + + public void setSyncOnCommit(Boolean syncOnCommit) { + this.syncOnCommit = syncOnCommit; + } + @Override public boolean equals(java.lang.Object o) { @@ -193,12 +214,13 @@ public class PushMirror { Objects.equals(this.lastUpdate, pushMirror.lastUpdate) && Objects.equals(this.remoteAddress, pushMirror.remoteAddress) && Objects.equals(this.remoteName, pushMirror.remoteName) && - Objects.equals(this.repoName, pushMirror.repoName); + Objects.equals(this.repoName, pushMirror.repoName) && + Objects.equals(this.syncOnCommit, pushMirror.syncOnCommit); } @Override public int hashCode() { - return Objects.hash(created, interval, lastError, lastUpdate, remoteAddress, remoteName, repoName); + return Objects.hash(created, interval, lastError, lastUpdate, remoteAddress, remoteName, repoName, syncOnCommit); } @@ -214,6 +236,7 @@ public class PushMirror { sb.append(" remoteAddress: ").append(toIndentedString(remoteAddress)).append("\n"); sb.append(" remoteName: ").append(toIndentedString(remoteName)).append("\n"); sb.append(" repoName: ").append(toIndentedString(repoName)).append("\n"); + sb.append(" syncOnCommit: ").append(toIndentedString(syncOnCommit)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/Reaction.java b/src/main/java/io/gitea/model/Reaction.java index 45fb7f3..01761d5 100644 --- a/src/main/java/io/gitea/model/Reaction.java +++ b/src/main/java/io/gitea/model/Reaction.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Reference.java b/src/main/java/io/gitea/model/Reference.java index 084258d..78a014f 100644 --- a/src/main/java/io/gitea/model/Reference.java +++ b/src/main/java/io/gitea/model/Reference.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Release.java b/src/main/java/io/gitea/model/Release.java index 02edc3b..dcd57d2 100644 --- a/src/main/java/io/gitea/model/Release.java +++ b/src/main/java/io/gitea/model/Release.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -74,6 +74,9 @@ public class Release { @SerializedName("target_commitish") private String targetCommitish = null; + @SerializedName("upload_url") + private String uploadUrl = null; + @SerializedName("url") private String url = null; @@ -322,6 +325,24 @@ public class Release { this.targetCommitish = targetCommitish; } + public Release uploadUrl(String uploadUrl) { + this.uploadUrl = uploadUrl; + return this; + } + + /** + * Get uploadUrl + * @return uploadUrl + **/ + @ApiModelProperty(value = "") + public String getUploadUrl() { + return uploadUrl; + } + + public void setUploadUrl(String uploadUrl) { + this.uploadUrl = uploadUrl; + } + public Release url(String url) { this.url = url; return this; @@ -381,13 +402,14 @@ public class Release { Objects.equals(this.tagName, release.tagName) && Objects.equals(this.tarballUrl, release.tarballUrl) && Objects.equals(this.targetCommitish, release.targetCommitish) && + Objects.equals(this.uploadUrl, release.uploadUrl) && Objects.equals(this.url, release.url) && Objects.equals(this.zipballUrl, release.zipballUrl); } @Override public int hashCode() { - return Objects.hash(assets, author, body, createdAt, draft, htmlUrl, id, name, prerelease, publishedAt, tagName, tarballUrl, targetCommitish, url, zipballUrl); + return Objects.hash(assets, author, body, createdAt, draft, htmlUrl, id, name, prerelease, publishedAt, tagName, tarballUrl, targetCommitish, uploadUrl, url, zipballUrl); } @@ -409,6 +431,7 @@ public class Release { sb.append(" tagName: ").append(toIndentedString(tagName)).append("\n"); sb.append(" tarballUrl: ").append(toIndentedString(tarballUrl)).append("\n"); sb.append(" targetCommitish: ").append(toIndentedString(targetCommitish)).append("\n"); + sb.append(" uploadUrl: ").append(toIndentedString(uploadUrl)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" zipballUrl: ").append(toIndentedString(zipballUrl)).append("\n"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/RenameUserOption.java b/src/main/java/io/gitea/model/RenameUserOption.java new file mode 100644 index 0000000..1f23777 --- /dev/null +++ b/src/main/java/io/gitea/model/RenameUserOption.java @@ -0,0 +1,95 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * RenameUserOption options when renaming a user + */ +@ApiModel(description = "RenameUserOption options when renaming a user") + +public class RenameUserOption { + @SerializedName("new_username") + private String newUsername = null; + + public RenameUserOption newUsername(String newUsername) { + this.newUsername = newUsername; + return this; + } + + /** + * New username for this user. This name cannot be in use yet by any other user. + * @return newUsername + **/ + @ApiModelProperty(required = true, value = "New username for this user. This name cannot be in use yet by any other user.") + public String getNewUsername() { + return newUsername; + } + + public void setNewUsername(String newUsername) { + this.newUsername = newUsername; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RenameUserOption renameUserOption = (RenameUserOption) o; + return Objects.equals(this.newUsername, renameUserOption.newUsername); + } + + @Override + public int hashCode() { + return Objects.hash(newUsername); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RenameUserOption {\n"); + + sb.append(" newUsername: ").append(toIndentedString(newUsername)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/RepoCollaboratorPermission.java b/src/main/java/io/gitea/model/RepoCollaboratorPermission.java index 1a86680..b6472d9 100644 --- a/src/main/java/io/gitea/model/RepoCollaboratorPermission.java +++ b/src/main/java/io/gitea/model/RepoCollaboratorPermission.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/RepoCommit.java b/src/main/java/io/gitea/model/RepoCommit.java index ac7571c..2ef0831 100644 --- a/src/main/java/io/gitea/model/RepoCommit.java +++ b/src/main/java/io/gitea/model/RepoCommit.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/RepoTopicOptions.java b/src/main/java/io/gitea/model/RepoTopicOptions.java index f5b165a..f52148a 100644 --- a/src/main/java/io/gitea/model/RepoTopicOptions.java +++ b/src/main/java/io/gitea/model/RepoTopicOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/RepoTransfer.java b/src/main/java/io/gitea/model/RepoTransfer.java index 6c34382..d11367b 100644 --- a/src/main/java/io/gitea/model/RepoTransfer.java +++ b/src/main/java/io/gitea/model/RepoTransfer.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Repository.java b/src/main/java/io/gitea/model/Repository.java index 504811e..80987f9 100644 --- a/src/main/java/io/gitea/model/Repository.java +++ b/src/main/java/io/gitea/model/Repository.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -56,6 +56,9 @@ public class Repository { @SerializedName("archived") private Boolean archived = null; + @SerializedName("archived_at") + private OffsetDateTime archivedAt = null; + @SerializedName("avatar_url") private String avatarUrl = null; @@ -65,6 +68,9 @@ public class Repository { @SerializedName("created_at") private OffsetDateTime createdAt = null; + @SerializedName("default_allow_maintainer_edit") + private Boolean defaultAllowMaintainerEdit = null; + @SerializedName("default_branch") private String defaultBranch = null; @@ -95,15 +101,24 @@ public class Repository { @SerializedName("full_name") private String fullName = null; + @SerializedName("has_actions") + private Boolean hasActions = null; + @SerializedName("has_issues") private Boolean hasIssues = null; + @SerializedName("has_packages") + private Boolean hasPackages = null; + @SerializedName("has_projects") private Boolean hasProjects = null; @SerializedName("has_pull_requests") private Boolean hasPullRequests = null; + @SerializedName("has_releases") + private Boolean hasReleases = null; + @SerializedName("has_wiki") private Boolean hasWiki = null; @@ -128,6 +143,9 @@ public class Repository { @SerializedName("languages_url") private String languagesUrl = null; + @SerializedName("link") + private String link = null; + @SerializedName("mirror") private Boolean mirror = null; @@ -182,6 +200,9 @@ public class Repository { @SerializedName("updated_at") private OffsetDateTime updatedAt = null; + @SerializedName("url") + private String url = null; + @SerializedName("watchers_count") private Long watchersCount = null; @@ -296,6 +317,24 @@ public class Repository { this.archived = archived; } + public Repository archivedAt(OffsetDateTime archivedAt) { + this.archivedAt = archivedAt; + return this; + } + + /** + * Get archivedAt + * @return archivedAt + **/ + @ApiModelProperty(value = "") + public OffsetDateTime getArchivedAt() { + return archivedAt; + } + + public void setArchivedAt(OffsetDateTime archivedAt) { + this.archivedAt = archivedAt; + } + public Repository avatarUrl(String avatarUrl) { this.avatarUrl = avatarUrl; return this; @@ -350,6 +389,24 @@ public class Repository { this.createdAt = createdAt; } + public Repository defaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + return this; + } + + /** + * Get defaultAllowMaintainerEdit + * @return defaultAllowMaintainerEdit + **/ + @ApiModelProperty(value = "") + public Boolean isDefaultAllowMaintainerEdit() { + return defaultAllowMaintainerEdit; + } + + public void setDefaultAllowMaintainerEdit(Boolean defaultAllowMaintainerEdit) { + this.defaultAllowMaintainerEdit = defaultAllowMaintainerEdit; + } + public Repository defaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; return this; @@ -530,6 +587,24 @@ public class Repository { this.fullName = fullName; } + public Repository hasActions(Boolean hasActions) { + this.hasActions = hasActions; + return this; + } + + /** + * Get hasActions + * @return hasActions + **/ + @ApiModelProperty(value = "") + public Boolean isHasActions() { + return hasActions; + } + + public void setHasActions(Boolean hasActions) { + this.hasActions = hasActions; + } + public Repository hasIssues(Boolean hasIssues) { this.hasIssues = hasIssues; return this; @@ -548,6 +623,24 @@ public class Repository { this.hasIssues = hasIssues; } + public Repository hasPackages(Boolean hasPackages) { + this.hasPackages = hasPackages; + return this; + } + + /** + * Get hasPackages + * @return hasPackages + **/ + @ApiModelProperty(value = "") + public Boolean isHasPackages() { + return hasPackages; + } + + public void setHasPackages(Boolean hasPackages) { + this.hasPackages = hasPackages; + } + public Repository hasProjects(Boolean hasProjects) { this.hasProjects = hasProjects; return this; @@ -584,6 +677,24 @@ public class Repository { this.hasPullRequests = hasPullRequests; } + public Repository hasReleases(Boolean hasReleases) { + this.hasReleases = hasReleases; + return this; + } + + /** + * Get hasReleases + * @return hasReleases + **/ + @ApiModelProperty(value = "") + public Boolean isHasReleases() { + return hasReleases; + } + + public void setHasReleases(Boolean hasReleases) { + this.hasReleases = hasReleases; + } + public Repository hasWiki(Boolean hasWiki) { this.hasWiki = hasWiki; return this; @@ -728,6 +839,24 @@ public class Repository { this.languagesUrl = languagesUrl; } + public Repository link(String link) { + this.link = link; + return this; + } + + /** + * Get link + * @return link + **/ + @ApiModelProperty(value = "") + public String getLink() { + return link; + } + + public void setLink(String link) { + this.link = link; + } + public Repository mirror(Boolean mirror) { this.mirror = mirror; return this; @@ -1052,6 +1181,24 @@ public class Repository { this.updatedAt = updatedAt; } + public Repository url(String url) { + this.url = url; + return this; + } + + /** + * Get url + * @return url + **/ + @ApiModelProperty(value = "") + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + public Repository watchersCount(Long watchersCount) { this.watchersCount = watchersCount; return this; @@ -1104,9 +1251,11 @@ public class Repository { Objects.equals(this.allowRebaseUpdate, repository.allowRebaseUpdate) && Objects.equals(this.allowSquashMerge, repository.allowSquashMerge) && Objects.equals(this.archived, repository.archived) && + Objects.equals(this.archivedAt, repository.archivedAt) && Objects.equals(this.avatarUrl, repository.avatarUrl) && Objects.equals(this.cloneUrl, repository.cloneUrl) && Objects.equals(this.createdAt, repository.createdAt) && + Objects.equals(this.defaultAllowMaintainerEdit, repository.defaultAllowMaintainerEdit) && Objects.equals(this.defaultBranch, repository.defaultBranch) && Objects.equals(this.defaultDeleteBranchAfterMerge, repository.defaultDeleteBranchAfterMerge) && Objects.equals(this.defaultMergeStyle, repository.defaultMergeStyle) && @@ -1117,9 +1266,12 @@ public class Repository { Objects.equals(this.fork, repository.fork) && Objects.equals(this.forksCount, repository.forksCount) && Objects.equals(this.fullName, repository.fullName) && + Objects.equals(this.hasActions, repository.hasActions) && Objects.equals(this.hasIssues, repository.hasIssues) && + Objects.equals(this.hasPackages, repository.hasPackages) && Objects.equals(this.hasProjects, repository.hasProjects) && Objects.equals(this.hasPullRequests, repository.hasPullRequests) && + Objects.equals(this.hasReleases, repository.hasReleases) && Objects.equals(this.hasWiki, repository.hasWiki) && Objects.equals(this.htmlUrl, repository.htmlUrl) && Objects.equals(this.id, repository.id) && @@ -1128,6 +1280,7 @@ public class Repository { Objects.equals(this.internalTracker, repository.internalTracker) && Objects.equals(this.language, repository.language) && Objects.equals(this.languagesUrl, repository.languagesUrl) && + Objects.equals(this.link, repository.link) && Objects.equals(this.mirror, repository.mirror) && Objects.equals(this.mirrorInterval, repository.mirrorInterval) && Objects.equals(this.mirrorUpdated, repository.mirrorUpdated) && @@ -1146,13 +1299,14 @@ public class Repository { Objects.equals(this.starsCount, repository.starsCount) && Objects.equals(this.template, repository.template) && Objects.equals(this.updatedAt, repository.updatedAt) && + Objects.equals(this.url, repository.url) && Objects.equals(this.watchersCount, repository.watchersCount) && Objects.equals(this.website, repository.website); } @Override public int hashCode() { - return Objects.hash(allowMergeCommits, allowRebase, allowRebaseExplicit, allowRebaseUpdate, allowSquashMerge, archived, avatarUrl, cloneUrl, createdAt, defaultBranch, defaultDeleteBranchAfterMerge, defaultMergeStyle, description, empty, externalTracker, externalWiki, fork, forksCount, fullName, hasIssues, hasProjects, hasPullRequests, hasWiki, htmlUrl, id, ignoreWhitespaceConflicts, internal, internalTracker, language, languagesUrl, mirror, mirrorInterval, mirrorUpdated, name, openIssuesCount, openPrCounter, originalUrl, owner, parent, permissions, _private, releaseCounter, repoTransfer, size, sshUrl, starsCount, template, updatedAt, watchersCount, website); + return Objects.hash(allowMergeCommits, allowRebase, allowRebaseExplicit, allowRebaseUpdate, allowSquashMerge, archived, archivedAt, avatarUrl, cloneUrl, createdAt, defaultAllowMaintainerEdit, defaultBranch, defaultDeleteBranchAfterMerge, defaultMergeStyle, description, empty, externalTracker, externalWiki, fork, forksCount, fullName, hasActions, hasIssues, hasPackages, hasProjects, hasPullRequests, hasReleases, hasWiki, htmlUrl, id, ignoreWhitespaceConflicts, internal, internalTracker, language, languagesUrl, link, mirror, mirrorInterval, mirrorUpdated, name, openIssuesCount, openPrCounter, originalUrl, owner, parent, permissions, _private, releaseCounter, repoTransfer, size, sshUrl, starsCount, template, updatedAt, url, watchersCount, website); } @@ -1167,9 +1321,11 @@ public class Repository { sb.append(" allowRebaseUpdate: ").append(toIndentedString(allowRebaseUpdate)).append("\n"); sb.append(" allowSquashMerge: ").append(toIndentedString(allowSquashMerge)).append("\n"); sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" archivedAt: ").append(toIndentedString(archivedAt)).append("\n"); sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); sb.append(" cloneUrl: ").append(toIndentedString(cloneUrl)).append("\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" defaultAllowMaintainerEdit: ").append(toIndentedString(defaultAllowMaintainerEdit)).append("\n"); sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); sb.append(" defaultDeleteBranchAfterMerge: ").append(toIndentedString(defaultDeleteBranchAfterMerge)).append("\n"); sb.append(" defaultMergeStyle: ").append(toIndentedString(defaultMergeStyle)).append("\n"); @@ -1180,9 +1336,12 @@ public class Repository { sb.append(" fork: ").append(toIndentedString(fork)).append("\n"); sb.append(" forksCount: ").append(toIndentedString(forksCount)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); + sb.append(" hasActions: ").append(toIndentedString(hasActions)).append("\n"); sb.append(" hasIssues: ").append(toIndentedString(hasIssues)).append("\n"); + sb.append(" hasPackages: ").append(toIndentedString(hasPackages)).append("\n"); sb.append(" hasProjects: ").append(toIndentedString(hasProjects)).append("\n"); sb.append(" hasPullRequests: ").append(toIndentedString(hasPullRequests)).append("\n"); + sb.append(" hasReleases: ").append(toIndentedString(hasReleases)).append("\n"); sb.append(" hasWiki: ").append(toIndentedString(hasWiki)).append("\n"); sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); @@ -1191,6 +1350,7 @@ public class Repository { sb.append(" internalTracker: ").append(toIndentedString(internalTracker)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); sb.append(" languagesUrl: ").append(toIndentedString(languagesUrl)).append("\n"); + sb.append(" link: ").append(toIndentedString(link)).append("\n"); sb.append(" mirror: ").append(toIndentedString(mirror)).append("\n"); sb.append(" mirrorInterval: ").append(toIndentedString(mirrorInterval)).append("\n"); sb.append(" mirrorUpdated: ").append(toIndentedString(mirrorUpdated)).append("\n"); @@ -1209,6 +1369,7 @@ public class Repository { sb.append(" starsCount: ").append(toIndentedString(starsCount)).append("\n"); sb.append(" template: ").append(toIndentedString(template)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" watchersCount: ").append(toIndentedString(watchersCount)).append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/RepositoryMeta.java b/src/main/java/io/gitea/model/RepositoryMeta.java index e5c9a78..359c503 100644 --- a/src/main/java/io/gitea/model/RepositoryMeta.java +++ b/src/main/java/io/gitea/model/RepositoryMeta.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/SearchResults.java b/src/main/java/io/gitea/model/SearchResults.java index 97586d9..7c74f37 100644 --- a/src/main/java/io/gitea/model/SearchResults.java +++ b/src/main/java/io/gitea/model/SearchResults.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Secret.java b/src/main/java/io/gitea/model/Secret.java new file mode 100644 index 0000000..47f63a3 --- /dev/null +++ b/src/main/java/io/gitea/model/Secret.java @@ -0,0 +1,119 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import org.threeten.bp.OffsetDateTime; + +/** + * Secret represents a secret + */ +@ApiModel(description = "Secret represents a secret") + +public class Secret { + @SerializedName("created_at") + private OffsetDateTime createdAt = null; + + @SerializedName("name") + private String name = null; + + public Secret createdAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + return this; + } + + /** + * Get createdAt + * @return createdAt + **/ + @ApiModelProperty(value = "") + public OffsetDateTime getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(OffsetDateTime createdAt) { + this.createdAt = createdAt; + } + + public Secret name(String name) { + this.name = name; + return this; + } + + /** + * the secret's name + * @return name + **/ + @ApiModelProperty(value = "the secret's name") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Secret secret = (Secret) o; + return Objects.equals(this.createdAt, secret.createdAt) && + Objects.equals(this.name, secret.name); + } + + @Override + public int hashCode() { + return Objects.hash(createdAt, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Secret {\n"); + + sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/ServerVersion.java b/src/main/java/io/gitea/model/ServerVersion.java index 960ec85..5f46b1b 100644 --- a/src/main/java/io/gitea/model/ServerVersion.java +++ b/src/main/java/io/gitea/model/ServerVersion.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/StopWatch.java b/src/main/java/io/gitea/model/StopWatch.java index 5ef63c5..dbfe992 100644 --- a/src/main/java/io/gitea/model/StopWatch.java +++ b/src/main/java/io/gitea/model/StopWatch.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/SubmitPullReviewOptions.java b/src/main/java/io/gitea/model/SubmitPullReviewOptions.java index 81839d7..4a0ce2e 100644 --- a/src/main/java/io/gitea/model/SubmitPullReviewOptions.java +++ b/src/main/java/io/gitea/model/SubmitPullReviewOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Tag.java b/src/main/java/io/gitea/model/Tag.java index cd6d207..9e6459f 100644 --- a/src/main/java/io/gitea/model/Tag.java +++ b/src/main/java/io/gitea/model/Tag.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/Team.java b/src/main/java/io/gitea/model/Team.java index 725502d..17b59a4 100644 --- a/src/main/java/io/gitea/model/Team.java +++ b/src/main/java/io/gitea/model/Team.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/TimelineComment.java b/src/main/java/io/gitea/model/TimelineComment.java index 98c5df8..2e36f15 100644 --- a/src/main/java/io/gitea/model/TimelineComment.java +++ b/src/main/java/io/gitea/model/TimelineComment.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/TopicName.java b/src/main/java/io/gitea/model/TopicName.java index 49af9a1..c6751d3 100644 --- a/src/main/java/io/gitea/model/TopicName.java +++ b/src/main/java/io/gitea/model/TopicName.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/TopicResponse.java b/src/main/java/io/gitea/model/TopicResponse.java index 286e73f..aaba258 100644 --- a/src/main/java/io/gitea/model/TopicResponse.java +++ b/src/main/java/io/gitea/model/TopicResponse.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/TrackedTime.java b/src/main/java/io/gitea/model/TrackedTime.java index 05ac4d0..c69d5a7 100644 --- a/src/main/java/io/gitea/model/TrackedTime.java +++ b/src/main/java/io/gitea/model/TrackedTime.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/TransferRepoOption.java b/src/main/java/io/gitea/model/TransferRepoOption.java index 3be6dff..bfe8f61 100644 --- a/src/main/java/io/gitea/model/TransferRepoOption.java +++ b/src/main/java/io/gitea/model/TransferRepoOption.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/UpdateFileOptions.java b/src/main/java/io/gitea/model/UpdateFileOptions.java index 544686d..aedabfe 100644 --- a/src/main/java/io/gitea/model/UpdateFileOptions.java +++ b/src/main/java/io/gitea/model/UpdateFileOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/UpdateRepoAvatarOption.java b/src/main/java/io/gitea/model/UpdateRepoAvatarOption.java new file mode 100644 index 0000000..4175c57 --- /dev/null +++ b/src/main/java/io/gitea/model/UpdateRepoAvatarOption.java @@ -0,0 +1,95 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateRepoAvatarUserOption options when updating the repo avatar + */ +@ApiModel(description = "UpdateRepoAvatarUserOption options when updating the repo avatar") + +public class UpdateRepoAvatarOption { + @SerializedName("image") + private String image = null; + + public UpdateRepoAvatarOption image(String image) { + this.image = image; + return this; + } + + /** + * image must be base64 encoded + * @return image + **/ + @ApiModelProperty(value = "image must be base64 encoded") + public String getImage() { + return image; + } + + public void setImage(String image) { + this.image = image; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateRepoAvatarOption updateRepoAvatarOption = (UpdateRepoAvatarOption) o; + return Objects.equals(this.image, updateRepoAvatarOption.image); + } + + @Override + public int hashCode() { + return Objects.hash(image); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateRepoAvatarOption {\n"); + + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/UpdateUserAvatarOption.java b/src/main/java/io/gitea/model/UpdateUserAvatarOption.java new file mode 100644 index 0000000..2bbe0ef --- /dev/null +++ b/src/main/java/io/gitea/model/UpdateUserAvatarOption.java @@ -0,0 +1,95 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.model; + +import java.util.Objects; +import java.util.Arrays; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateUserAvatarUserOption options when updating the user avatar + */ +@ApiModel(description = "UpdateUserAvatarUserOption options when updating the user avatar") + +public class UpdateUserAvatarOption { + @SerializedName("image") + private String image = null; + + public UpdateUserAvatarOption image(String image) { + this.image = image; + return this; + } + + /** + * image must be base64 encoded + * @return image + **/ + @ApiModelProperty(value = "image must be base64 encoded") + public String getImage() { + return image; + } + + public void setImage(String image) { + this.image = image; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateUserAvatarOption updateUserAvatarOption = (UpdateUserAvatarOption) o; + return Objects.equals(this.image, updateUserAvatarOption.image); + } + + @Override + public int hashCode() { + return Objects.hash(image); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateUserAvatarOption {\n"); + + sb.append(" image: ").append(toIndentedString(image)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(java.lang.Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + +} + diff --git a/src/main/java/io/gitea/model/User.java b/src/main/java/io/gitea/model/User.java index 5530b32..5af488f 100644 --- a/src/main/java/io/gitea/model/User.java +++ b/src/main/java/io/gitea/model/User.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/UserHeatmapData.java b/src/main/java/io/gitea/model/UserHeatmapData.java index b53e9de..833a5d1 100644 --- a/src/main/java/io/gitea/model/UserHeatmapData.java +++ b/src/main/java/io/gitea/model/UserHeatmapData.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/UserSettings.java b/src/main/java/io/gitea/model/UserSettings.java index 253437c..22121ad 100644 --- a/src/main/java/io/gitea/model/UserSettings.java +++ b/src/main/java/io/gitea/model/UserSettings.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/UserSettingsOptions.java b/src/main/java/io/gitea/model/UserSettingsOptions.java index 1562041..e35cc27 100644 --- a/src/main/java/io/gitea/model/UserSettingsOptions.java +++ b/src/main/java/io/gitea/model/UserSettingsOptions.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/WatchInfo.java b/src/main/java/io/gitea/model/WatchInfo.java index 3d86c84..d3e938b 100644 --- a/src/main/java/io/gitea/model/WatchInfo.java +++ b/src/main/java/io/gitea/model/WatchInfo.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/WikiCommit.java b/src/main/java/io/gitea/model/WikiCommit.java index 8395ff5..cdb8196 100644 --- a/src/main/java/io/gitea/model/WikiCommit.java +++ b/src/main/java/io/gitea/model/WikiCommit.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/WikiCommitList.java b/src/main/java/io/gitea/model/WikiCommitList.java index a17af11..e570087 100644 --- a/src/main/java/io/gitea/model/WikiCommitList.java +++ b/src/main/java/io/gitea/model/WikiCommitList.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/WikiPage.java b/src/main/java/io/gitea/model/WikiPage.java index 07e9009..b76dbf1 100644 --- a/src/main/java/io/gitea/model/WikiPage.java +++ b/src/main/java/io/gitea/model/WikiPage.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/main/java/io/gitea/model/WikiPageMetaData.java b/src/main/java/io/gitea/model/WikiPageMetaData.java index 043a7c0..7e73661 100644 --- a/src/main/java/io/gitea/model/WikiPageMetaData.java +++ b/src/main/java/io/gitea/model/WikiPageMetaData.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/test/java/io/gitea/api/ActivitypubApiTest.java b/src/test/java/io/gitea/api/ActivitypubApiTest.java index 3f31471..d37c15c 100644 --- a/src/test/java/io/gitea/api/ActivitypubApiTest.java +++ b/src/test/java/io/gitea/api/ActivitypubApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -42,8 +42,8 @@ public class ActivitypubApiTest { */ @Test public void activitypubPersonTest() throws ApiException { - String username = null; - ActivityPub response = api.activitypubPerson(username); + Integer userId = null; + ActivityPub response = api.activitypubPerson(userId); // TODO: test validations } @@ -58,8 +58,8 @@ public class ActivitypubApiTest { */ @Test public void activitypubPersonInboxTest() throws ApiException { - String username = null; - api.activitypubPersonInbox(username); + Integer userId = null; + api.activitypubPersonInbox(userId); // TODO: test validations } diff --git a/src/test/java/io/gitea/api/AdminApiTest.java b/src/test/java/io/gitea/api/AdminApiTest.java index 4e75309..5f72a59 100644 --- a/src/test/java/io/gitea/api/AdminApiTest.java +++ b/src/test/java/io/gitea/api/AdminApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -14,14 +14,19 @@ package io.gitea.api; import io.gitea.ApiException; +import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; import io.gitea.model.CreateOrgOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.CreateUserOption; import io.gitea.model.Cron; +import io.gitea.model.EditHookOption; import io.gitea.model.EditUserOption; +import io.gitea.model.Email; +import io.gitea.model.Hook; import io.gitea.model.Organization; import io.gitea.model.PublicKey; +import io.gitea.model.RenameUserOption; import io.gitea.model.Repository; import io.gitea.model.User; import org.junit.Test; @@ -58,6 +63,22 @@ public class AdminApiTest { // TODO: test validations } + /** + * Create a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCreateHookTest() throws ApiException { + CreateHookOption body = null; + Hook response = api.adminCreateHook(body); + + // TODO: test validations + } + /** * Create an organization * @@ -158,6 +179,22 @@ public class AdminApiTest { // TODO: test validations } + /** + * Delete a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminDeleteHookTest() throws ApiException { + Long id = null; + api.adminDeleteHook(id); + + // TODO: test validations + } + /** * Delete unadopted files * @@ -186,7 +223,8 @@ public class AdminApiTest { @Test public void adminDeleteUserTest() throws ApiException { String username = null; - api.adminDeleteUser(username); + Boolean purge = null; + api.adminDeleteUser(username, purge); // TODO: test validations } @@ -208,6 +246,23 @@ public class AdminApiTest { // TODO: test validations } + /** + * Update a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminEditHookTest() throws ApiException { + Long id = null; + EditHookOption body = null; + Hook response = api.adminEditHook(id, body); + + // TODO: test validations + } + /** * Edit an existing user * @@ -225,6 +280,23 @@ public class AdminApiTest { // TODO: test validations } + /** + * List all emails + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminGetAllEmailsTest() throws ApiException { + Integer page = null; + Integer limit = null; + List response = api.adminGetAllEmails(page, limit); + + // TODO: test validations + } + /** * List all organizations * @@ -243,7 +315,7 @@ public class AdminApiTest { } /** - * List all users + * Get a hook * * * @@ -251,10 +323,80 @@ public class AdminApiTest { * if the Api call fails */ @Test - public void adminGetAllUsersTest() throws ApiException { + public void adminGetHookTest() throws ApiException { + Long id = null; + Hook response = api.adminGetHook(id); + + // TODO: test validations + } + + /** + * List system's webhooks + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminListHooksTest() throws ApiException { Integer page = null; Integer limit = null; - List response = api.adminGetAllUsers(page, limit); + List response = api.adminListHooks(page, limit); + + // TODO: test validations + } + + /** + * Rename a user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminRenameUserTest() throws ApiException { + String username = null; + RenameUserOption body = null; + api.adminRenameUser(username, body); + + // TODO: test validations + } + + /** + * Search all emails + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminSearchEmailsTest() throws ApiException { + String q = null; + Integer page = null; + Integer limit = null; + List response = api.adminSearchEmails(q, page, limit); + + // TODO: test validations + } + + /** + * Search users according filter conditions + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminSearchUsersTest() throws ApiException { + Long sourceId = null; + String loginName = null; + Integer page = null; + Integer limit = null; + List response = api.adminSearchUsers(sourceId, loginName, page, limit); // TODO: test validations } diff --git a/src/test/java/io/gitea/api/IssueApiTest.java b/src/test/java/io/gitea/api/IssueApiTest.java index 6f92298..9fe5481 100644 --- a/src/test/java/io/gitea/api/IssueApiTest.java +++ b/src/test/java/io/gitea/api/IssueApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,20 +15,24 @@ package io.gitea.api; import io.gitea.ApiException; import io.gitea.model.AddTimeOption; +import io.gitea.model.Attachment; import io.gitea.model.Comment; import io.gitea.model.CreateIssueCommentOption; import io.gitea.model.CreateIssueOption; import io.gitea.model.CreateLabelOption; import io.gitea.model.CreateMilestoneOption; +import io.gitea.model.EditAttachmentOptions; import io.gitea.model.EditDeadlineOption; import io.gitea.model.EditIssueCommentOption; import io.gitea.model.EditIssueOption; import io.gitea.model.EditLabelOption; import io.gitea.model.EditMilestoneOption; import io.gitea.model.EditReactionOption; +import java.io.File; import io.gitea.model.Issue; import io.gitea.model.IssueDeadline; import io.gitea.model.IssueLabelsOption; +import io.gitea.model.IssueMeta; import io.gitea.model.Label; import io.gitea.model.Milestone; import org.threeten.bp.OffsetDateTime; @@ -184,6 +188,84 @@ public class IssueApiTest { // TODO: test validations } + /** + * Create an issue attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueCreateIssueAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + File attachment = null; + String name = null; + Attachment response = api.issueCreateIssueAttachment(owner, repo, index, attachment, name); + + // TODO: test validations + } + + /** + * Block the issue given in the body by the issue in path + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueCreateIssueBlockingTest() throws ApiException { + String owner = null; + String repo = null; + String index = null; + IssueMeta body = null; + Issue response = api.issueCreateIssueBlocking(owner, repo, index, body); + + // TODO: test validations + } + + /** + * Create a comment attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueCreateIssueCommentAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long id = null; + File attachment = null; + String name = null; + Attachment response = api.issueCreateIssueCommentAttachment(owner, repo, id, attachment, name); + + // TODO: test validations + } + + /** + * Make the issue in the url depend on the issue in the form. + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueCreateIssueDependenciesTest() throws ApiException { + String owner = null; + String repo = null; + String index = null; + IssueMeta body = null; + Issue response = api.issueCreateIssueDependencies(owner, repo, index, body); + + // TODO: test validations + } + /** * Create a label * @@ -294,6 +376,44 @@ public class IssueApiTest { // TODO: test validations } + /** + * Delete an issue attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueDeleteIssueAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + Long attachmentId = null; + api.issueDeleteIssueAttachment(owner, repo, index, attachmentId); + + // TODO: test validations + } + + /** + * Delete a comment attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueDeleteIssueCommentAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long id = null; + Long attachmentId = null; + api.issueDeleteIssueCommentAttachment(owner, repo, id, attachmentId); + + // TODO: test validations + } + /** * Remove a reaction from an issue * @@ -463,6 +583,46 @@ public class IssueApiTest { // TODO: test validations } + /** + * Edit an issue attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueEditIssueAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + Long attachmentId = null; + EditAttachmentOptions body = null; + Attachment response = api.issueEditIssueAttachment(owner, repo, index, attachmentId, body); + + // TODO: test validations + } + + /** + * Edit a comment attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueEditIssueCommentAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long id = null; + Long attachmentId = null; + EditAttachmentOptions body = null; + Attachment response = api.issueEditIssueCommentAttachment(owner, repo, id, attachmentId, body); + + // TODO: test validations + } + /** * 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. * @@ -616,6 +776,44 @@ public class IssueApiTest { // TODO: test validations } + /** + * Get an issue attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueGetIssueAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + Long attachmentId = null; + Attachment response = api.issueGetIssueAttachment(owner, repo, index, attachmentId); + + // TODO: test validations + } + + /** + * Get a comment attachment + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueGetIssueCommentAttachmentTest() throws ApiException { + String owner = null; + String repo = null; + Long id = null; + Long attachmentId = null; + Attachment response = api.issueGetIssueCommentAttachment(owner, repo, id, attachmentId); + + // TODO: test validations + } + /** * Get a list reactions of an issue * @@ -732,6 +930,82 @@ public class IssueApiTest { // TODO: test validations } + /** + * List issues that are blocked by this issue + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueListBlocksTest() throws ApiException { + String owner = null; + String repo = null; + String index = null; + Integer page = null; + Integer limit = null; + List response = api.issueListBlocks(owner, repo, index, page, limit); + + // TODO: test validations + } + + /** + * List issue's attachments + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueListIssueAttachmentsTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + List response = api.issueListIssueAttachments(owner, repo, index); + + // TODO: test validations + } + + /** + * List comment's attachments + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueListIssueCommentAttachmentsTest() throws ApiException { + String owner = null; + String repo = null; + Long id = null; + List response = api.issueListIssueCommentAttachments(owner, repo, id); + + // TODO: test validations + } + + /** + * List an issue's dependencies, i.e all issues that block this issue. + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueListIssueDependenciesTest() throws ApiException { + String owner = null; + String repo = null; + String index = null; + Integer page = null; + Integer limit = null; + List response = api.issueListIssueDependencies(owner, repo, index, page, limit); + + // TODO: test validations + } + /** * List a repository's issues * @@ -818,6 +1092,44 @@ public class IssueApiTest { // TODO: test validations } + /** + * Unblock the issue given in the body by the issue in path + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueRemoveIssueBlockingTest() throws ApiException { + String owner = null; + String repo = null; + String index = null; + IssueMeta body = null; + Issue response = api.issueRemoveIssueBlocking(owner, repo, index, body); + + // TODO: test validations + } + + /** + * Remove an issue dependency + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueRemoveIssueDependenciesTest() throws ApiException { + String owner = null; + String repo = null; + String index = null; + IssueMeta body = null; + Issue response = api.issueRemoveIssueDependencies(owner, repo, index, body); + + // TODO: test validations + } + /** * Remove a label from an issue * @@ -896,11 +1208,12 @@ public class IssueApiTest { Boolean created = null; Boolean mentioned = null; Boolean reviewRequested = null; + Boolean reviewed = null; String owner = null; String team = null; Integer page = null; Integer limit = null; - List response = api.issueSearchIssues(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, owner, team, page, limit); + List response = api.issueSearchIssues(state, labels, milestones, q, priorityRepoId, type, since, before, assigned, created, mentioned, reviewRequested, reviewed, owner, team, page, limit); // TODO: test validations } @@ -984,4 +1297,59 @@ public class IssueApiTest { // TODO: test validations } + /** + * Moves the Pin to the given Position + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void moveIssuePinTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + Long position = null; + api.moveIssuePin(owner, repo, index, position); + + // TODO: test validations + } + + /** + * Pin an Issue + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void pinIssueTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + api.pinIssue(owner, repo, index); + + // TODO: test validations + } + + /** + * Unpin an Issue + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void unpinIssueTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + api.unpinIssue(owner, repo, index); + + // TODO: test validations + } + } diff --git a/src/test/java/io/gitea/api/MiscellaneousApiTest.java b/src/test/java/io/gitea/api/MiscellaneousApiTest.java index b5404ef..181e83e 100644 --- a/src/test/java/io/gitea/api/MiscellaneousApiTest.java +++ b/src/test/java/io/gitea/api/MiscellaneousApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -14,7 +14,12 @@ package io.gitea.api; import io.gitea.ApiException; +import io.gitea.model.GitignoreTemplateInfo; +import io.gitea.model.LabelTemplate; +import io.gitea.model.LicenseTemplateInfo; +import io.gitea.model.LicensesTemplateListEntry; import io.gitea.model.MarkdownOption; +import io.gitea.model.MarkupOption; import io.gitea.model.NodeInfo; import io.gitea.model.ServerVersion; import org.junit.Test; @@ -34,6 +39,54 @@ public class MiscellaneousApiTest { private final MiscellaneousApi api = new MiscellaneousApi(); + /** + * Returns information about a gitignore template + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getGitignoreTemplateInfoTest() throws ApiException { + String name = null; + GitignoreTemplateInfo response = api.getGitignoreTemplateInfo(name); + + // TODO: test validations + } + + /** + * Returns all labels in a template + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getLabelTemplateInfoTest() throws ApiException { + String name = null; + List response = api.getLabelTemplateInfo(name); + + // TODO: test validations + } + + /** + * Returns information about a license template + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void getLicenseTemplateInfoTest() throws ApiException { + String name = null; + LicenseTemplateInfo response = api.getLicenseTemplateInfo(name); + + // TODO: test validations + } + /** * Returns the nodeinfo of the Gitea application * @@ -79,6 +132,51 @@ public class MiscellaneousApiTest { // TODO: test validations } + /** + * Returns a list of all gitignore templates + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listGitignoresTemplatesTest() throws ApiException { + List response = api.listGitignoresTemplates(); + + // TODO: test validations + } + + /** + * Returns a list of all label templates + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listLabelTemplatesTest() throws ApiException { + List response = api.listLabelTemplates(); + + // TODO: test validations + } + + /** + * Returns a list of all license templates + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void listLicenseTemplatesTest() throws ApiException { + List response = api.listLicenseTemplates(); + + // TODO: test validations + } + /** * Render a markdown document as HTML * @@ -111,4 +209,20 @@ public class MiscellaneousApiTest { // TODO: test validations } + /** + * Render a markup document as HTML + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void renderMarkupTest() throws ApiException { + MarkupOption body = null; + String response = api.renderMarkup(body); + + // TODO: test validations + } + } diff --git a/src/test/java/io/gitea/api/NotificationApiTest.java b/src/test/java/io/gitea/api/NotificationApiTest.java index 4716248..29cd0a4 100644 --- a/src/test/java/io/gitea/api/NotificationApiTest.java +++ b/src/test/java/io/gitea/api/NotificationApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/test/java/io/gitea/api/OrganizationApiTest.java b/src/test/java/io/gitea/api/OrganizationApiTest.java index bb4dd5a..192d9d6 100644 --- a/src/test/java/io/gitea/api/OrganizationApiTest.java +++ b/src/test/java/io/gitea/api/OrganizationApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -14,8 +14,10 @@ package io.gitea.api; import io.gitea.ApiException; +import io.gitea.model.Activity; import io.gitea.model.CreateHookOption; import io.gitea.model.CreateLabelOption; +import io.gitea.model.CreateOrUpdateSecretOption; import io.gitea.model.CreateOrgOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.CreateTeamOption; @@ -26,10 +28,13 @@ import io.gitea.model.EditTeamOption; import io.gitea.model.Hook; import io.gitea.model.InlineResponse200; import io.gitea.model.Label; +import org.threeten.bp.LocalDate; import io.gitea.model.Organization; import io.gitea.model.OrganizationPermissions; import io.gitea.model.Repository; +import io.gitea.model.Secret; import io.gitea.model.Team; +import io.gitea.model.UpdateUserAvatarOption; import io.gitea.model.User; import org.junit.Test; import org.junit.Ignore; @@ -82,6 +87,23 @@ public class OrganizationApiTest { // TODO: test validations } + /** + * Delete a secret in an organization + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteOrgSecretTest() throws ApiException { + String org = null; + String secretname = null; + api.deleteOrgSecret(org, secretname); + + // TODO: test validations + } + /** * Add a team member * @@ -217,6 +239,22 @@ public class OrganizationApiTest { // TODO: test validations } + /** + * Delete Avatar + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void orgDeleteAvatarTest() throws ApiException { + String org = null; + api.orgDeleteAvatar(org); + + // TODO: test validations + } + /** * Delete a hook * @@ -488,6 +526,43 @@ public class OrganizationApiTest { // TODO: test validations } + /** + * List an organization's actions secrets + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void orgListActionsSecretsTest() throws ApiException { + String org = null; + Integer page = null; + Integer limit = null; + List response = api.orgListActionsSecrets(org, page, limit); + + // TODO: test validations + } + + /** + * List an organization's activity feeds + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void orgListActivityFeedsTest() throws ApiException { + String org = null; + LocalDate date = null; + Integer page = null; + Integer limit = null; + List response = api.orgListActivityFeeds(org, date, page, limit); + + // TODO: test validations + } + /** * List the current user's organizations * @@ -595,6 +670,25 @@ public class OrganizationApiTest { // TODO: test validations } + /** + * List a team's activity feeds + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void orgListTeamActivityFeedsTest() throws ApiException { + Long id = null; + LocalDate date = null; + Integer page = null; + Integer limit = null; + List response = api.orgListTeamActivityFeeds(id, date, page, limit); + + // TODO: test validations + } + /** * List a particular member of team * @@ -754,6 +848,23 @@ public class OrganizationApiTest { // TODO: test validations } + /** + * Update Avatar + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void orgUpdateAvatarTest() throws ApiException { + String org = null; + UpdateUserAvatarOption body = null; + api.orgUpdateAvatar(org, body); + + // TODO: test validations + } + /** * Search for teams within an organization * @@ -774,4 +885,22 @@ public class OrganizationApiTest { // TODO: test validations } + /** + * Create or Update a secret value in an organization + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateOrgSecretTest() throws ApiException { + String org = null; + String secretname = null; + CreateOrUpdateSecretOption body = null; + api.updateOrgSecret(org, secretname, body); + + // TODO: test validations + } + } diff --git a/src/test/java/io/gitea/api/PackageApiTest.java b/src/test/java/io/gitea/api/PackageApiTest.java index fead6b1..d324e5d 100644 --- a/src/test/java/io/gitea/api/PackageApiTest.java +++ b/src/test/java/io/gitea/api/PackageApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/test/java/io/gitea/api/RepositoryApiTest.java b/src/test/java/io/gitea/api/RepositoryApiTest.java index 002d611..1e29a0f 100644 --- a/src/test/java/io/gitea/api/RepositoryApiTest.java +++ b/src/test/java/io/gitea/api/RepositoryApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,11 +15,13 @@ package io.gitea.api; import io.gitea.ApiException; import io.gitea.model.APIError; +import io.gitea.model.Activity; import io.gitea.model.AddCollaboratorOption; import io.gitea.model.AnnotatedTag; import io.gitea.model.Attachment; import io.gitea.model.Branch; import io.gitea.model.BranchProtection; +import io.gitea.model.ChangeFilesOptions; import io.gitea.model.ChangedFile; import io.gitea.model.CombinedStatus; import io.gitea.model.Commit; @@ -31,6 +33,7 @@ import io.gitea.model.CreateFileOptions; import io.gitea.model.CreateForkOption; import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; +import io.gitea.model.CreateOrUpdateSecretOption; import io.gitea.model.CreatePullRequestOption; import io.gitea.model.CreatePullReviewOptions; import io.gitea.model.CreatePushMirrorOption; @@ -52,14 +55,20 @@ import io.gitea.model.EditRepoOption; import java.io.File; import io.gitea.model.FileDeleteResponse; import io.gitea.model.FileResponse; +import io.gitea.model.FilesResponse; import io.gitea.model.GenerateRepoOption; import io.gitea.model.GitBlobResponse; import io.gitea.model.GitHook; import io.gitea.model.GitTreeResponse; import io.gitea.model.Hook; +import io.gitea.model.Issue; +import io.gitea.model.IssueConfig; +import io.gitea.model.IssueConfigValidation; import io.gitea.model.IssueTemplate; +import org.threeten.bp.LocalDate; import io.gitea.model.MergePullRequestOption; import io.gitea.model.MigrateRepoOptions; +import io.gitea.model.NewIssuePinsAllowed; import io.gitea.model.Note; import org.threeten.bp.OffsetDateTime; import io.gitea.model.PullRequest; @@ -81,6 +90,7 @@ import io.gitea.model.TopicResponse; import io.gitea.model.TrackedTime; import io.gitea.model.TransferRepoOption; import io.gitea.model.UpdateFileOptions; +import io.gitea.model.UpdateRepoAvatarOption; import io.gitea.model.User; import io.gitea.model.WatchInfo; import io.gitea.model.WikiCommitList; @@ -154,6 +164,24 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Delete a secret in a repository + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteRepoSecretTest() throws ApiException { + String owner = null; + String repo = null; + String secretname = null; + api.deleteRepoSecret(owner, repo, secretname); + + // TODO: test validations + } + /** * Create a repository using a template * @@ -374,6 +402,24 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Modify multiple files in a repository + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoChangeFilesTest() throws ApiException { + String owner = null; + String repo = null; + ChangeFilesOptions body = null; + FilesResponse response = api.repoChangeFiles(owner, repo, body); + + // TODO: test validations + } + /** * Check if a user is a collaborator of a repository * @@ -667,6 +713,23 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Delete avatar + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoDeleteAvatarTest() throws ApiException { + String owner = null; + String repo = null; + api.repoDeleteAvatar(owner, repo); + + // TODO: test validations + } + /** * Delete a specific branch from a repository * @@ -1220,9 +1283,12 @@ public class RepositoryApiTest { String sha = null; String path = null; Boolean stat = null; + Boolean verification = null; + Boolean files = null; Integer page = null; Integer limit = null; - List response = api.repoGetAllCommits(owner, repo, sha, path, stat, page, limit); + String not = null; + List response = api.repoGetAllCommits(owner, repo, sha, path, stat, verification, files, page, limit, not); // TODO: test validations } @@ -1426,6 +1492,23 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Returns the issue config for a repo + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoGetIssueConfigTest() throws ApiException { + String owner = null; + String repo = null; + IssueConfig response = api.repoGetIssueConfig(owner, repo); + + // TODO: test validations + } + /** * Get available issue templates for a repository * @@ -1478,6 +1561,23 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Gets the most recent non-prerelease, non-draft release of a repository, sorted by created_at + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoGetLatestReleaseTest() throws ApiException { + String owner = null; + String repo = null; + Release response = api.repoGetLatestRelease(owner, repo); + + // TODO: test validations + } + /** * Get a note corresponding to a single commit from a repository * @@ -1491,7 +1591,9 @@ public class RepositoryApiTest { String owner = null; String repo = null; String sha = null; - Note response = api.repoGetNote(owner, repo, sha); + Boolean verification = null; + Boolean files = null; + Note response = api.repoGetNote(owner, repo, sha, verification, files); // TODO: test validations } @@ -1529,7 +1631,9 @@ public class RepositoryApiTest { Long index = null; Integer page = null; Integer limit = null; - List response = api.repoGetPullRequestCommits(owner, repo, index, page, limit); + Boolean verification = null; + Boolean files = null; + List response = api.repoGetPullRequestCommits(owner, repo, index, page, limit, verification, files); // TODO: test validations } @@ -1753,7 +1857,10 @@ public class RepositoryApiTest { String owner = null; String repo = null; String sha = null; - Commit response = api.repoGetSingleCommit(owner, repo, sha); + Boolean stat = null; + Boolean verification = null; + Boolean files = null; + Commit response = api.repoGetSingleCommit(owner, repo, sha, stat, verification, files); // TODO: test validations } @@ -1832,6 +1939,26 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * List a repository's activity feeds + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoListActivityFeedsTest() throws ApiException { + String owner = null; + String repo = null; + LocalDate date = null; + Integer page = null; + Integer limit = null; + List response = api.repoListActivityFeeds(owner, repo, date, page, limit); + + // TODO: test validations + } + /** * Get specified ref or filtered repository's refs * @@ -1979,6 +2106,40 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * List a repo's pinned issues + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoListPinnedIssuesTest() throws ApiException { + String owner = null; + String repo = null; + List response = api.repoListPinnedIssues(owner, repo); + + // TODO: test validations + } + + /** + * List a repo's pinned pull requests + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoListPinnedPullRequestsTest() throws ApiException { + String owner = null; + String repo = null; + List response = api.repoListPinnedPullRequests(owner, repo); + + // TODO: test validations + } + /** * List a repo's pull requests * @@ -2270,6 +2431,23 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Returns if new Issue Pins are allowed + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoNewPinAllowedTest() throws ApiException { + String owner = null; + String repo = null; + NewIssuePinsAllowed response = api.repoNewPinAllowed(owner, repo); + + // TODO: test validations + } + /** * Check if a pull request has been merged * @@ -2452,6 +2630,24 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Update avatar + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoUpdateAvatarTest() throws ApiException { + String owner = null; + String repo = null; + UpdateRepoAvatarOption body = null; + api.repoUpdateAvatar(owner, repo, body); + + // TODO: test validations + } + /** * Update a file in a repository * @@ -2508,6 +2704,23 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Returns the validation information for a issue config + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void repoValidateIssueConfigTest() throws ApiException { + String owner = null; + String repo = null; + IssueConfigValidation response = api.repoValidateIssueConfig(owner, repo); + + // TODO: test validations + } + /** * search topics via keyword * @@ -2526,6 +2739,25 @@ public class RepositoryApiTest { // TODO: test validations } + /** + * Create or Update a secret value in a repository + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateRepoSecretTest() throws ApiException { + String owner = null; + String repo = null; + String secretname = null; + CreateOrUpdateSecretOption body = null; + api.updateRepoSecret(owner, repo, secretname, body); + + // TODO: test validations + } + /** * Check if the current user is watching a repo * diff --git a/src/test/java/io/gitea/api/SettingsApiTest.java b/src/test/java/io/gitea/api/SettingsApiTest.java index bc95d2a..6e92c3e 100644 --- a/src/test/java/io/gitea/api/SettingsApiTest.java +++ b/src/test/java/io/gitea/api/SettingsApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. diff --git a/src/test/java/io/gitea/api/UserApiTest.java b/src/test/java/io/gitea/api/UserApiTest.java index 8d5ba51..58c3f83 100644 --- a/src/test/java/io/gitea/api/UserApiTest.java +++ b/src/test/java/io/gitea/api/UserApiTest.java @@ -1,8 +1,8 @@ /* - * Gitea API. + * Gitea API * This documentation describes the Gitea API. * - * OpenAPI spec version: 1.18.0 + * OpenAPI spec version: 1.21.1 * * * NOTE: This class is auto generated by the swagger code generator program. @@ -15,16 +15,22 @@ package io.gitea.api; import io.gitea.ApiException; import io.gitea.model.AccessToken; +import io.gitea.model.Activity; import io.gitea.model.CreateAccessTokenOption; import io.gitea.model.CreateEmailOption; import io.gitea.model.CreateGPGKeyOption; +import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; import io.gitea.model.CreateOAuth2ApplicationOptions; +import io.gitea.model.CreateOrUpdateSecretOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.DeleteEmailOption; +import io.gitea.model.EditHookOption; import io.gitea.model.Email; import io.gitea.model.GPGKey; +import io.gitea.model.Hook; import io.gitea.model.InlineResponse2001; +import org.threeten.bp.LocalDate; import io.gitea.model.OAuth2Application; import org.threeten.bp.OffsetDateTime; import io.gitea.model.PublicKey; @@ -32,6 +38,7 @@ import io.gitea.model.Repository; import io.gitea.model.StopWatch; import io.gitea.model.Team; import io.gitea.model.TrackedTime; +import io.gitea.model.UpdateUserAvatarOption; import io.gitea.model.User; import io.gitea.model.UserHeatmapData; import io.gitea.model.UserSettings; @@ -69,6 +76,22 @@ public class UserApiTest { // TODO: test validations } + /** + * Delete a secret in a user scope + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void deleteUserSecretTest() throws ApiException { + String secretname = null; + api.deleteUserSecret(secretname); + + // TODO: test validations + } + /** * Get user settings * @@ -99,6 +122,23 @@ public class UserApiTest { // TODO: test validations } + /** + * Create or Update a secret value in a user scope + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void updateUserSecretTest() throws ApiException { + String secretname = null; + CreateOrUpdateSecretOption body = null; + api.updateUserSecret(secretname, body); + + // TODO: test validations + } + /** * Update user settings * @@ -148,6 +188,22 @@ public class UserApiTest { // TODO: test validations } + /** + * Create a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userCreateHookTest() throws ApiException { + CreateHookOption body = null; + Hook response = api.userCreateHook(body); + + // TODO: test validations + } + /** * creates a new OAuth2 application * @@ -175,8 +231,8 @@ public class UserApiTest { @Test public void userCreateTokenTest() throws ApiException { String username = null; - CreateAccessTokenOption userCreateToken = null; - AccessToken response = api.userCreateToken(username, userCreateToken); + CreateAccessTokenOption body = null; + AccessToken response = api.userCreateToken(username, body); // TODO: test validations } @@ -532,6 +588,21 @@ public class UserApiTest { // TODO: test validations } + /** + * Delete Avatar + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userDeleteAvatarTest() throws ApiException { + api.userDeleteAvatar(); + + // TODO: test validations + } + /** * Delete email addresses * @@ -548,6 +619,22 @@ public class UserApiTest { // TODO: test validations } + /** + * Delete a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userDeleteHookTest() throws ApiException { + Long id = null; + api.userDeleteHook(id); + + // TODO: test validations + } + /** * delete an OAuth2 Application * @@ -564,6 +651,23 @@ public class UserApiTest { // TODO: test validations } + /** + * Update a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userEditHookTest() throws ApiException { + Long id = null; + EditHookOption body = null; + Hook response = api.userEditHook(id, body); + + // TODO: test validations + } + /** * Get a user * @@ -611,6 +715,22 @@ public class UserApiTest { // TODO: test validations } + /** + * Get a hook + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userGetHookTest() throws ApiException { + Long id = null; + Hook response = api.userGetHook(id); + + // TODO: test validations + } + /** * get an OAuth2 Application * @@ -679,6 +799,26 @@ public class UserApiTest { // TODO: test validations } + /** + * List a user's activity feeds + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userListActivityFeedsTest() throws ApiException { + String username = null; + Boolean onlyPerformedBy = null; + LocalDate date = null; + Integer page = null; + Integer limit = null; + List response = api.userListActivityFeeds(username, onlyPerformedBy, date, page, limit); + + // TODO: test validations + } + /** * List the authenticated user's email addresses * @@ -748,6 +888,23 @@ public class UserApiTest { // TODO: test validations } + /** + * List the authenticated user's webhooks + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userListHooksTest() throws ApiException { + Integer page = null; + Integer limit = null; + List response = api.userListHooks(page, limit); + + // TODO: test validations + } + /** * List the given user's public keys * @@ -857,6 +1014,22 @@ public class UserApiTest { // TODO: test validations } + /** + * Update Avatar + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void userUpdateAvatarTest() throws ApiException { + UpdateUserAvatarOption body = null; + api.userUpdateAvatar(body); + + // TODO: test validations + } + /** * update an OAuth2 Application, this includes regenerating the client secret * diff --git a/src/test2/java/io/gitea/api/ActivitypubApiTest.java b/src/test2/java/io/gitea/api/ActivitypubApiTest.java new file mode 100644 index 0000000..3f31471 --- /dev/null +++ b/src/test2/java/io/gitea/api/ActivitypubApiTest.java @@ -0,0 +1,67 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.18.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.api; + +import io.gitea.ApiException; +import io.gitea.model.ActivityPub; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for ActivitypubApi + */ +@Ignore +public class ActivitypubApiTest { + + private final ActivitypubApi api = new ActivitypubApi(); + + + /** + * Returns the Person actor for a user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void activitypubPersonTest() throws ApiException { + String username = null; + ActivityPub response = api.activitypubPerson(username); + + // TODO: test validations + } + + /** + * Send to the inbox + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void activitypubPersonInboxTest() throws ApiException { + String username = null; + api.activitypubPersonInbox(username); + + // TODO: test validations + } + +} diff --git a/src/test2/java/io/gitea/api/AdminApiTest.java b/src/test2/java/io/gitea/api/AdminApiTest.java new file mode 100644 index 0000000..4e75309 --- /dev/null +++ b/src/test2/java/io/gitea/api/AdminApiTest.java @@ -0,0 +1,280 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.18.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.api; + +import io.gitea.ApiException; +import io.gitea.model.CreateKeyOption; +import io.gitea.model.CreateOrgOption; +import io.gitea.model.CreateRepoOption; +import io.gitea.model.CreateUserOption; +import io.gitea.model.Cron; +import io.gitea.model.EditUserOption; +import io.gitea.model.Organization; +import io.gitea.model.PublicKey; +import io.gitea.model.Repository; +import io.gitea.model.User; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for AdminApi + */ +@Ignore +public class AdminApiTest { + + private final AdminApi api = new AdminApi(); + + + /** + * Adopt unadopted files as a repository + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminAdoptRepositoryTest() throws ApiException { + String owner = null; + String repo = null; + api.adminAdoptRepository(owner, repo); + + // TODO: test validations + } + + /** + * Create an organization + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCreateOrgTest() throws ApiException { + String username = null; + CreateOrgOption organization = null; + Organization response = api.adminCreateOrg(username, organization); + + // TODO: test validations + } + + /** + * Add a public key on behalf of a user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCreatePublicKeyTest() throws ApiException { + String username = null; + CreateKeyOption key = null; + PublicKey response = api.adminCreatePublicKey(username, key); + + // TODO: test validations + } + + /** + * Create a repository on behalf of a user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCreateRepoTest() throws ApiException { + String username = null; + CreateRepoOption repository = null; + Repository response = api.adminCreateRepo(username, repository); + + // TODO: test validations + } + + /** + * Create a user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCreateUserTest() throws ApiException { + CreateUserOption body = null; + User response = api.adminCreateUser(body); + + // TODO: test validations + } + + /** + * List cron tasks + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCronListTest() throws ApiException { + Integer page = null; + Integer limit = null; + List response = api.adminCronList(page, limit); + + // TODO: test validations + } + + /** + * Run cron task + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminCronRunTest() throws ApiException { + String task = null; + api.adminCronRun(task); + + // TODO: test validations + } + + /** + * Delete unadopted files + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminDeleteUnadoptedRepositoryTest() throws ApiException { + String owner = null; + String repo = null; + api.adminDeleteUnadoptedRepository(owner, repo); + + // TODO: test validations + } + + /** + * Delete a user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminDeleteUserTest() throws ApiException { + String username = null; + api.adminDeleteUser(username); + + // TODO: test validations + } + + /** + * Delete a user's public key + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminDeleteUserPublicKeyTest() throws ApiException { + String username = null; + Long id = null; + api.adminDeleteUserPublicKey(username, id); + + // TODO: test validations + } + + /** + * Edit an existing user + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminEditUserTest() throws ApiException { + String username = null; + EditUserOption body = null; + User response = api.adminEditUser(username, body); + + // TODO: test validations + } + + /** + * List all organizations + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminGetAllOrgsTest() throws ApiException { + Integer page = null; + Integer limit = null; + List response = api.adminGetAllOrgs(page, limit); + + // TODO: test validations + } + + /** + * List all users + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminGetAllUsersTest() throws ApiException { + Integer page = null; + Integer limit = null; + List response = api.adminGetAllUsers(page, limit); + + // TODO: test validations + } + + /** + * List unadopted repositories + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void adminUnadoptedListTest() throws ApiException { + Integer page = null; + Integer limit = null; + String pattern = null; + List response = api.adminUnadoptedList(page, limit, pattern); + + // TODO: test validations + } + +} diff --git a/src/test2/java/io/gitea/api/IssueApiTest.java b/src/test2/java/io/gitea/api/IssueApiTest.java new file mode 100644 index 0000000..9fe5481 --- /dev/null +++ b/src/test2/java/io/gitea/api/IssueApiTest.java @@ -0,0 +1,1355 @@ +/* + * Gitea API + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.21.1 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + + +package io.gitea.api; + +import io.gitea.ApiException; +import io.gitea.model.AddTimeOption; +import io.gitea.model.Attachment; +import io.gitea.model.Comment; +import io.gitea.model.CreateIssueCommentOption; +import io.gitea.model.CreateIssueOption; +import io.gitea.model.CreateLabelOption; +import io.gitea.model.CreateMilestoneOption; +import io.gitea.model.EditAttachmentOptions; +import io.gitea.model.EditDeadlineOption; +import io.gitea.model.EditIssueCommentOption; +import io.gitea.model.EditIssueOption; +import io.gitea.model.EditLabelOption; +import io.gitea.model.EditMilestoneOption; +import io.gitea.model.EditReactionOption; +import java.io.File; +import io.gitea.model.Issue; +import io.gitea.model.IssueDeadline; +import io.gitea.model.IssueLabelsOption; +import io.gitea.model.IssueMeta; +import io.gitea.model.Label; +import io.gitea.model.Milestone; +import org.threeten.bp.OffsetDateTime; +import io.gitea.model.Reaction; +import io.gitea.model.TimelineComment; +import io.gitea.model.TrackedTime; +import io.gitea.model.User; +import io.gitea.model.WatchInfo; +import org.junit.Test; +import org.junit.Ignore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * API tests for IssueApi + */ +@Ignore +public class IssueApiTest { + + private final IssueApi api = new IssueApi(); + + + /** + * Add a label to an issue + * + * + * + * @throws ApiException + * if the Api call fails + */ + @Test + public void issueAddLabelTest() throws ApiException { + String owner = null; + String repo = null; + Long index = null; + IssueLabelsOption body = null; + List