diff --git a/.swagger-codegen/VERSION b/.swagger-codegen/VERSION index a625450..752a79e 100644 --- a/.swagger-codegen/VERSION +++ b/.swagger-codegen/VERSION @@ -1 +1 @@ -2.3.1 \ No newline at end of file +2.4.8 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 70cb81a..d3fa7d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,8 @@ # language: java jdk: - - oraclejdk8 - - oraclejdk7 + - openjdk8 + - openjdk11 before_install: # ensure gradlew has proper permission - chmod a+x ./gradlew diff --git a/build.gradle b/build.gradle index 925e1c5..650ab5a 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ if(hasProperty('target') && target == 'android') { javadoc { source = sourceSets.main.allJava - classpath = configurations.compileClasspath + classpath = sourceSets.main.compileClasspath options { @@ -115,5 +115,6 @@ dependencies { compile 'com.google.code.gson:gson:2.8.1' compile 'io.gsonfire:gson-fire:1.8.0' compile 'org.threeten:threetenbp:1.3.5' + compile 'javax.annotation:javax.annotation-api:1.3.2' testCompile 'junit:junit:4.12' } diff --git a/docs/APIError.md b/docs/APIError.md new file mode 100644 index 0000000..e95c91b --- /dev/null +++ b/docs/APIError.md @@ -0,0 +1,11 @@ + +# APIError + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/AccessToken.md b/docs/AccessToken.md index 5ee4506..928a5e2 100644 --- a/docs/AccessToken.md +++ b/docs/AccessToken.md @@ -4,9 +4,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **Long** | | [optional] -**name** | **String** | | [optional] -**sha1** | **String** | | [optional] +**name** | **String** | | diff --git a/docs/AdminApi.md b/docs/AdminApi.md index 8c58f9c..58d7554 100644 --- a/docs/AdminApi.md +++ b/docs/AdminApi.md @@ -11,6 +11,8 @@ Method | HTTP request | Description [**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 [**adminEditUser**](AdminApi.md#adminEditUser) | **PATCH** /admin/users/{username} | Edit an existing user +[**adminGetAllOrgs**](AdminApi.md#adminGetAllOrgs) | **GET** /admin/orgs | List all organizations +[**adminGetAllUsers**](AdminApi.md#adminGetAllUsers) | **GET** /admin/users | List all users @@ -595,3 +597,165 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **adminGetAllOrgs** +> List<Organization> adminGetAllOrgs(page, limit) + +List all organizations + +### 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: 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, maximum page size is 50 +try { + List result = apiInstance.adminGetAllOrgs(page, limit); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminGetAllOrgs"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **page** | **Integer**| page number of results to return (1-based) | [optional] + **limit** | **Integer**| page size of results, maximum page size is 50 | [optional] + +### Return type + +[**List<Organization>**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **adminGetAllUsers** +> List<User> adminGetAllUsers() + +List all users + +### 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: 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(); +try { + List result = apiInstance.adminGetAllUsers(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling AdminApi#adminGetAllUsers"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<User>**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + diff --git a/docs/AnnotatedTag.md b/docs/AnnotatedTag.md new file mode 100644 index 0000000..ed18920 --- /dev/null +++ b/docs/AnnotatedTag.md @@ -0,0 +1,16 @@ + +# AnnotatedTag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **String** | | [optional] +**object** | [**AnnotatedTagObject**](AnnotatedTagObject.md) | | [optional] +**sha** | **String** | | [optional] +**tag** | **String** | | [optional] +**tagger** | [**CommitUser**](CommitUser.md) | | [optional] +**url** | **String** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] + + + diff --git a/docs/AnnotatedTagObject.md b/docs/AnnotatedTagObject.md new file mode 100644 index 0000000..253dfcc --- /dev/null +++ b/docs/AnnotatedTagObject.md @@ -0,0 +1,12 @@ + +# AnnotatedTagObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | **String** | | [optional] +**type** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/Comment.md b/docs/Comment.md index 0dbf5a3..fb3bafa 100644 --- a/docs/Comment.md +++ b/docs/Comment.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **htmlUrl** | **String** | | [optional] **id** | **Long** | | [optional] **issueUrl** | **String** | | [optional] +**originalAuthor** | **String** | | [optional] +**originalAuthorId** | **Long** | | [optional] **pullRequestUrl** | **String** | | [optional] **updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **user** | [**User**](User.md) | | [optional] diff --git a/docs/Commit.md b/docs/Commit.md new file mode 100644 index 0000000..e236a3d --- /dev/null +++ b/docs/Commit.md @@ -0,0 +1,16 @@ + +# Commit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**User**](User.md) | | [optional] +**commit** | [**RepoCommit**](RepoCommit.md) | | [optional] +**committer** | [**User**](User.md) | | [optional] +**htmlUrl** | **String** | | [optional] +**parents** | [**List<CommitMeta>**](CommitMeta.md) | | [optional] +**sha** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/CommitMeta.md b/docs/CommitMeta.md new file mode 100644 index 0000000..25be92d --- /dev/null +++ b/docs/CommitMeta.md @@ -0,0 +1,11 @@ + +# CommitMeta + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/CommitUser.md b/docs/CommitUser.md new file mode 100644 index 0000000..d763ebd --- /dev/null +++ b/docs/CommitUser.md @@ -0,0 +1,12 @@ + +# CommitUser + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**date** | **String** | | [optional] +**email** | **String** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/docs/ContentsResponse.md b/docs/ContentsResponse.md new file mode 100644 index 0000000..3097291 --- /dev/null +++ b/docs/ContentsResponse.md @@ -0,0 +1,23 @@ + +# ContentsResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**links** | [**FileLinksResponse**](FileLinksResponse.md) | | [optional] +**content** | **String** | `content` is populated when `type` is `file`, otherwise null | [optional] +**downloadUrl** | **String** | | [optional] +**encoding** | **String** | `encoding` is populated when `type` is `file`, otherwise null | [optional] +**gitUrl** | **String** | | [optional] +**htmlUrl** | **String** | | [optional] +**name** | **String** | | [optional] +**path** | **String** | | [optional] +**sha** | **String** | | [optional] +**size** | **Long** | | [optional] +**submoduleGitUrl** | **String** | `submodule_git_url` is populated when `type` is `submodule`, otherwise null | [optional] +**target** | **String** | `target` is populated when `type` is `symlink`, otherwise null | [optional] +**type** | **String** | `type` will be `file`, `dir`, `symlink`, or `submodule` | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/CreateFileOptions.md b/docs/CreateFileOptions.md new file mode 100644 index 0000000..0c5aada --- /dev/null +++ b/docs/CreateFileOptions.md @@ -0,0 +1,15 @@ + +# CreateFileOptions + +## 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] +**content** | **String** | content must be base64 encoded | +**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] + + + diff --git a/docs/CreateHookOption.md b/docs/CreateHookOption.md index 8bf73ba..9b06ab2 100644 --- a/docs/CreateHookOption.md +++ b/docs/CreateHookOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **Boolean** | | [optional] +**branchFilter** | **String** | | [optional] **config** | **Map<String, String>** | | **events** | **List<String>** | | [optional] **type** | [**TypeEnum**](#TypeEnum) | | diff --git a/docs/CreateLabelOption.md b/docs/CreateLabelOption.md index c46d36b..5393f74 100644 --- a/docs/CreateLabelOption.md +++ b/docs/CreateLabelOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **color** | **String** | | +**description** | **String** | | [optional] **name** | **String** | | diff --git a/docs/CreateOrgOption.md b/docs/CreateOrgOption.md index 78d05dc..1145120 100644 --- a/docs/CreateOrgOption.md +++ b/docs/CreateOrgOption.md @@ -7,8 +7,19 @@ Name | Type | Description | Notes **description** | **String** | | [optional] **fullName** | **String** | | [optional] **location** | **String** | | [optional] +**repoAdminChangeTeamAccess** | **Boolean** | | [optional] **username** | **String** | | +**visibility** | [**VisibilityEnum**](#VisibilityEnum) | possible values are `public` (default), `limited` or `private` | [optional] **website** | **String** | | [optional] + +## Enum: VisibilityEnum +Name | Value +---- | ----- +PUBLIC | "public" +LIMITED | "limited" +PRIVATE | "private" + + diff --git a/docs/CreateRepoOption.md b/docs/CreateRepoOption.md index a9154ab..8bb081b 100644 --- a/docs/CreateRepoOption.md +++ b/docs/CreateRepoOption.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **autoInit** | **Boolean** | Whether the repository should be auto-intialized? | [optional] **description** | **String** | Description of the repository to create | [optional] **gitignores** | **String** | Gitignores to use | [optional] +**issueLabels** | **String** | Issue Label set to use | [optional] **license** | **String** | License to use | [optional] **name** | **String** | Name of the repository to create | **_private** | **Boolean** | Whether the repository is private | [optional] diff --git a/docs/CreateTeamOption.md b/docs/CreateTeamOption.md index 6d2ad62..a9037a1 100644 --- a/docs/CreateTeamOption.md +++ b/docs/CreateTeamOption.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **description** | **String** | | [optional] **name** | **String** | | **permission** | [**PermissionEnum**](#PermissionEnum) | | [optional] +**units** | **List<String>** | | [optional] diff --git a/docs/CreateUserOption.md b/docs/CreateUserOption.md index 1eda2da..7ccfb17 100644 --- a/docs/CreateUserOption.md +++ b/docs/CreateUserOption.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **email** | **String** | | **fullName** | **String** | | [optional] **loginName** | **String** | | [optional] +**mustChangePassword** | **Boolean** | | [optional] **password** | **String** | | **sendNotify** | **Boolean** | | [optional] **sourceId** | **Long** | | [optional] diff --git a/docs/DeleteFileOptions.md b/docs/DeleteFileOptions.md new file mode 100644 index 0000000..c3847f4 --- /dev/null +++ b/docs/DeleteFileOptions.md @@ -0,0 +1,15 @@ + +# DeleteFileOptions + +## 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] +**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] +**sha** | **String** | sha is the SHA for the file that already exists | + + + diff --git a/docs/AccessTokenName.md b/docs/EditGitHookOption.md similarity index 64% rename from docs/AccessTokenName.md rename to docs/EditGitHookOption.md index 64cb186..8ab95a9 100644 --- a/docs/AccessTokenName.md +++ b/docs/EditGitHookOption.md @@ -1,10 +1,10 @@ -# AccessTokenName +# EditGitHookOption ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**name** | **String** | | +**content** | **String** | | [optional] diff --git a/docs/EditHookOption.md b/docs/EditHookOption.md index 70b99be..7db1044 100644 --- a/docs/EditHookOption.md +++ b/docs/EditHookOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **active** | **Boolean** | | [optional] +**branchFilter** | **String** | | [optional] **config** | **Map<String, String>** | | [optional] **events** | **List<String>** | | [optional] diff --git a/docs/EditLabelOption.md b/docs/EditLabelOption.md index 32c72df..15f442c 100644 --- a/docs/EditLabelOption.md +++ b/docs/EditLabelOption.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **color** | **String** | | [optional] +**description** | **String** | | [optional] **name** | **String** | | [optional] diff --git a/docs/EditOrgOption.md b/docs/EditOrgOption.md index 5fe1c89..5341e21 100644 --- a/docs/EditOrgOption.md +++ b/docs/EditOrgOption.md @@ -7,7 +7,18 @@ Name | Type | Description | Notes **description** | **String** | | [optional] **fullName** | **String** | | [optional] **location** | **String** | | [optional] +**repoAdminChangeTeamAccess** | **Boolean** | | [optional] +**visibility** | [**VisibilityEnum**](#VisibilityEnum) | possible values are `public`, `limited` or `private` | [optional] **website** | **String** | | [optional] + +## Enum: VisibilityEnum +Name | Value +---- | ----- +PUBLIC | "public" +LIMITED | "limited" +PRIVATE | "private" + + diff --git a/docs/EditRepoOption.md b/docs/EditRepoOption.md new file mode 100644 index 0000000..e4a9b50 --- /dev/null +++ b/docs/EditRepoOption.md @@ -0,0 +1,26 @@ + +# EditRepoOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowMergeCommits** | **Boolean** | either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`. | [optional] +**allowRebase** | **Boolean** | either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. | [optional] +**allowRebaseExplicit** | **Boolean** | either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`. | [optional] +**allowSquashMerge** | **Boolean** | either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. | [optional] +**archived** | **Boolean** | set to `true` to archive this repository. | [optional] +**defaultBranch** | **String** | sets the default branch for this repository. | [optional] +**description** | **String** | a short description of the repository. | [optional] +**externalTracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] +**externalWiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] +**hasIssues** | **Boolean** | either `true` to enable issues for this repository or `false` to disable them. | [optional] +**hasPullRequests** | **Boolean** | either `true` to allow pull requests, or `false` to prevent pull request. | [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. `has_pull_requests` must be `true`. | [optional] +**internalTracker** | [**InternalTracker**](InternalTracker.md) | | [optional] +**name** | **String** | name of the repository | [optional] +**_private** | **Boolean** | either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. | [optional] +**website** | **String** | a URL with more information about the repository. | [optional] + + + diff --git a/docs/EditTeamOption.md b/docs/EditTeamOption.md index 673dcde..29967d2 100644 --- a/docs/EditTeamOption.md +++ b/docs/EditTeamOption.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes **description** | **String** | | [optional] **name** | **String** | | **permission** | [**PermissionEnum**](#PermissionEnum) | | [optional] +**units** | **List<String>** | | [optional] diff --git a/docs/EditUserOption.md b/docs/EditUserOption.md index 9a79b92..30892c6 100644 --- a/docs/EditUserOption.md +++ b/docs/EditUserOption.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **location** | **String** | | [optional] **loginName** | **String** | | [optional] **maxRepoCreation** | **Long** | | [optional] +**mustChangePassword** | **Boolean** | | [optional] **password** | **String** | | [optional] **prohibitLogin** | **Boolean** | | [optional] **sourceId** | **Long** | | [optional] diff --git a/docs/ExternalTracker.md b/docs/ExternalTracker.md new file mode 100644 index 0000000..172c0cf --- /dev/null +++ b/docs/ExternalTracker.md @@ -0,0 +1,12 @@ + +# ExternalTracker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**externalTrackerFormat** | **String** | External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. | [optional] +**externalTrackerStyle** | **String** | External Issue Tracker Number Format, either `numeric` or `alphanumeric` | [optional] +**externalTrackerUrl** | **String** | URL of external issue tracker. | [optional] + + + diff --git a/docs/ExternalWiki.md b/docs/ExternalWiki.md new file mode 100644 index 0000000..780c4b9 --- /dev/null +++ b/docs/ExternalWiki.md @@ -0,0 +1,10 @@ + +# ExternalWiki + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**externalWikiUrl** | **String** | URL of external wiki. | [optional] + + + diff --git a/docs/FileCommitResponse.md b/docs/FileCommitResponse.md new file mode 100644 index 0000000..99b41c6 --- /dev/null +++ b/docs/FileCommitResponse.md @@ -0,0 +1,17 @@ + +# FileCommitResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**committer** | [**CommitUser**](CommitUser.md) | | [optional] +**htmlUrl** | **String** | | [optional] +**message** | **String** | | [optional] +**parents** | [**List<CommitMeta>**](CommitMeta.md) | | [optional] +**sha** | **String** | | [optional] +**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/FileDeleteResponse.md b/docs/FileDeleteResponse.md new file mode 100644 index 0000000..09e3779 --- /dev/null +++ b/docs/FileDeleteResponse.md @@ -0,0 +1,12 @@ + +# FileDeleteResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**content** | **Object** | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] + + + diff --git a/docs/FileLinksResponse.md b/docs/FileLinksResponse.md new file mode 100644 index 0000000..91f5394 --- /dev/null +++ b/docs/FileLinksResponse.md @@ -0,0 +1,12 @@ + +# FileLinksResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**git** | **String** | | [optional] +**html** | **String** | | [optional] +**self** | **String** | | [optional] + + + diff --git a/docs/FileResponse.md b/docs/FileResponse.md new file mode 100644 index 0000000..0028927 --- /dev/null +++ b/docs/FileResponse.md @@ -0,0 +1,12 @@ + +# FileResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**FileCommitResponse**](FileCommitResponse.md) | | [optional] +**content** | [**ContentsResponse**](ContentsResponse.md) | | [optional] +**verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] + + + diff --git a/docs/GitBlobResponse.md b/docs/GitBlobResponse.md new file mode 100644 index 0000000..e31fc0f --- /dev/null +++ b/docs/GitBlobResponse.md @@ -0,0 +1,14 @@ + +# GitBlobResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **String** | | [optional] +**encoding** | **String** | | [optional] +**sha** | **String** | | [optional] +**size** | **Long** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/GitEntry.md b/docs/GitEntry.md new file mode 100644 index 0000000..9875255 --- /dev/null +++ b/docs/GitEntry.md @@ -0,0 +1,15 @@ + +# GitEntry + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**mode** | **String** | | [optional] +**path** | **String** | | [optional] +**sha** | **String** | | [optional] +**size** | **Long** | | [optional] +**type** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/GitHook.md b/docs/GitHook.md new file mode 100644 index 0000000..8f03e36 --- /dev/null +++ b/docs/GitHook.md @@ -0,0 +1,12 @@ + +# GitHook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**content** | **String** | | [optional] +**isActive** | **Boolean** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/docs/GitObject.md b/docs/GitObject.md new file mode 100644 index 0000000..88548d7 --- /dev/null +++ b/docs/GitObject.md @@ -0,0 +1,12 @@ + +# GitObject + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**sha** | **String** | | [optional] +**type** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/GitTreeResponse.md b/docs/GitTreeResponse.md new file mode 100644 index 0000000..7ea44d2 --- /dev/null +++ b/docs/GitTreeResponse.md @@ -0,0 +1,15 @@ + +# GitTreeResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**page** | **Long** | | [optional] +**sha** | **String** | | [optional] +**totalCount** | **Long** | | [optional] +**tree** | [**List<GitEntry>**](GitEntry.md) | | [optional] +**truncated** | **Boolean** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/Hook.md b/docs/Hook.md new file mode 100644 index 0000000..8df8c58 --- /dev/null +++ b/docs/Hook.md @@ -0,0 +1,16 @@ + +# Hook + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**active** | **Boolean** | | [optional] +**config** | **Map<String, String>** | | [optional] +**createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**events** | **List<String>** | | [optional] +**id** | **Long** | | [optional] +**type** | **String** | | [optional] +**updatedAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] + + + diff --git a/docs/Identity.md b/docs/Identity.md new file mode 100644 index 0000000..6c78401 --- /dev/null +++ b/docs/Identity.md @@ -0,0 +1,11 @@ + +# Identity + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **String** | | [optional] +**name** | **String** | | [optional] + + + diff --git a/docs/InlineResponse200.md b/docs/InlineResponse200.md new file mode 100644 index 0000000..ea00bde --- /dev/null +++ b/docs/InlineResponse200.md @@ -0,0 +1,11 @@ + +# InlineResponse200 + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List<Team>**](Team.md) | | [optional] +**ok** | **Boolean** | | [optional] + + + diff --git a/docs/UserSearchList.md b/docs/InlineResponse2001.md similarity index 90% rename from docs/UserSearchList.md rename to docs/InlineResponse2001.md index 3ea0837..3e7645b 100644 --- a/docs/UserSearchList.md +++ b/docs/InlineResponse2001.md @@ -1,5 +1,5 @@ -# UserSearchList +# InlineResponse2001 ## Properties Name | Type | Description | Notes diff --git a/docs/InternalTracker.md b/docs/InternalTracker.md new file mode 100644 index 0000000..7620b11 --- /dev/null +++ b/docs/InternalTracker.md @@ -0,0 +1,12 @@ + +# InternalTracker + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**allowOnlyContributorsToTrackTime** | **Boolean** | Let only contributors track time (Built-in issue tracker) | [optional] +**enableIssueDependencies** | **Boolean** | Enable dependencies for issues and pull requests (Built-in issue tracker) | [optional] +**enableTimeTracker** | **Boolean** | Enable time tracking (Built-in issue tracker) | [optional] + + + diff --git a/docs/Issue.md b/docs/Issue.md index dfd2ab4..9328054 100644 --- a/docs/Issue.md +++ b/docs/Issue.md @@ -15,6 +15,8 @@ Name | Type | Description | Notes **labels** | [**List<Label>**](Label.md) | | [optional] **milestone** | [**Milestone**](Milestone.md) | | [optional] **number** | **Long** | | [optional] +**originalAuthor** | **String** | | [optional] +**originalAuthorId** | **Long** | | [optional] **pullRequest** | [**PullRequestMeta**](PullRequestMeta.md) | | [optional] **state** | **String** | | [optional] **title** | **String** | | [optional] diff --git a/docs/IssueApi.md b/docs/IssueApi.md index 1e1f1ef..9ed2ae4 100644 --- a/docs/IssueApi.md +++ b/docs/IssueApi.md @@ -8,7 +8,7 @@ Method | HTTP request | Description [**issueAddTime**](IssueApi.md#issueAddTime) | **POST** /repos/{owner}/{repo}/issues/{id}/times | Add a tracked time to a issue [**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 +[**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. [**issueCreateLabel**](IssueApi.md#issueCreateLabel) | **POST** /repos/{owner}/{repo}/labels | Create a label [**issueCreateMilestone**](IssueApi.md#issueCreateMilestone) | **POST** /repos/{owner}/{repo}/milestones | Create a milestone [**issueDeleteComment**](IssueApi.md#issueDeleteComment) | **DELETE** /repos/{owner}/{repo}/issues/comments/{id} | Delete a comment @@ -17,8 +17,8 @@ Method | HTTP request | Description [**issueDeleteMilestone**](IssueApi.md#issueDeleteMilestone) | **DELETE** /repos/{owner}/{repo}/milestones/{id} | Delete a milestone [**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 -[**issueEditIssueDeadline**](IssueApi.md#issueEditIssueDeadline) | **POST** /repos/{owner}/{repo}/issues/{index}/deadline | Set an issue deadline. If set to null, the deadline is deleted. +[**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. +[**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 [**issueGetComments**](IssueApi.md#issueGetComments) | **GET** /repos/{owner}/{repo}/issues/{index}/comments | List all comments on an issue @@ -26,12 +26,14 @@ Method | HTTP request | Description [**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 milestones +[**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 [**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 [**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 +[**issueStartStopWatch**](IssueApi.md#issueStartStopWatch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/start | Start stopwatch on an issue. +[**issueStopWatch**](IssueApi.md#issueStopWatch) | **POST** /repos/{owner}/{repo}/issues/{index}/stopwatch/stop | Stop an issue's existing stopwatch. [**issueTrackedTimes**](IssueApi.md#issueTrackedTimes) | **GET** /repos/{owner}/{repo}/issues/{id}/times | List an issue's tracked times @@ -388,7 +390,7 @@ Name | Type | Description | Notes # **issueCreateIssue** > Issue issueCreateIssue(owner, repo, body) -Create an issue +Create an issue. If using deadline only the date will be taken into account, and time of day ignored. ### Example ```java @@ -1166,7 +1168,7 @@ Name | Type | Description | Notes # **issueEditIssue** > Issue issueEditIssue(owner, repo, index, body) -Edit an issue +Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. ### Example ```java @@ -1254,7 +1256,7 @@ Name | Type | Description | Notes # **issueEditIssueDeadline** > IssueDeadline issueEditIssueDeadline(owner, repo, index, body) -Set an issue deadline. If set to null, the deadline is deleted. +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. ### Example ```java @@ -1948,9 +1950,9 @@ Name | Type | Description | Notes # **issueGetMilestonesList** -> List<Milestone> issueGetMilestonesList(owner, repo) +> List<Milestone> issueGetMilestonesList(owner, repo, state) -Get all of a repository's milestones +Get all of a repository's opened milestones ### Example ```java @@ -2001,8 +2003,9 @@ Token.setApiKey("YOUR API KEY"); IssueApi apiInstance = new IssueApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo +String state = "state_example"; // String | Milestone state, Recognised values are open, closed and all. Defaults to \"open\" try { - List result = apiInstance.issueGetMilestonesList(owner, repo); + List result = apiInstance.issueGetMilestonesList(owner, repo, state); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IssueApi#issueGetMilestonesList"); @@ -2016,6 +2019,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | + **state** | **String**| Milestone state, Recognised values are open, closed and all. Defaults to \"open\" | [optional] ### Return type @@ -2118,7 +2122,7 @@ Name | Type | Description | Notes # **issueListIssues** -> List<Issue> issueListIssues(owner, repo, state, page, q) +> List<Issue> issueListIssues(owner, repo, state, labels, page, q) List a repository's issues @@ -2172,10 +2176,11 @@ IssueApi apiInstance = new IssueApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo String state = "state_example"; // String | whether issue is open or closed +String labels = "labels_example"; // String | comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded Integer page = 56; // Integer | page number of requested issues String q = "q_example"; // String | search string try { - List result = apiInstance.issueListIssues(owner, repo, state, page, q); + List result = apiInstance.issueListIssues(owner, repo, state, labels, page, q); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling IssueApi#issueListIssues"); @@ -2190,6 +2195,7 @@ Name | Type | Description | Notes **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | **state** | **String**| whether issue is open or closed | [optional] + **labels** | **String**| comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded | [optional] **page** | **Integer**| page number of requested issues | [optional] **q** | **String**| search string | [optional] @@ -2460,6 +2466,176 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **issueStartStopWatch** +> issueStartStopWatch(owner, repo, index) + +Start stopwatch on 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: 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 to create the stopwatch on +try { + apiInstance.issueStartStopWatch(owner, repo, index); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueStartStopWatch"); + 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 to create the stopwatch on | + +### 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **issueStopWatch** +> issueStopWatch(owner, repo, index) + +Stop an issue's existing stopwatch. + +### 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: 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 to stop the stopwatch on +try { + apiInstance.issueStopWatch(owner, repo, index); +} catch (ApiException e) { + System.err.println("Exception when calling IssueApi#issueStopWatch"); + 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 to stop the stopwatch on | + +### 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), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json diff --git a/docs/Label.md b/docs/Label.md index 3defc6e..faa999b 100644 --- a/docs/Label.md +++ b/docs/Label.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **color** | **String** | | [optional] +**description** | **String** | | [optional] **id** | **Long** | | [optional] **name** | **String** | | [optional] **url** | **String** | | [optional] diff --git a/docs/MergePullRequestOption.md b/docs/MergePullRequestOption.md new file mode 100644 index 0000000..b74a10a --- /dev/null +++ b/docs/MergePullRequestOption.md @@ -0,0 +1,22 @@ + +# MergePullRequestOption + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**_do** | [**DoEnum**](#DoEnum) | | +**mergeMessageField** | **String** | | [optional] +**mergeTitleField** | **String** | | [optional] + + + +## Enum: DoEnum +Name | Value +---- | ----- +MERGE | "merge" +REBASE | "rebase" +REBASE_MERGE | "rebase-merge" +SQUASH | "squash" + + + diff --git a/docs/MigrateRepoForm.md b/docs/MigrateRepoForm.md index 2d2f004..d75f3d9 100644 --- a/docs/MigrateRepoForm.md +++ b/docs/MigrateRepoForm.md @@ -8,10 +8,16 @@ Name | Type | Description | Notes **authUsername** | **String** | | [optional] **cloneAddr** | **String** | | **description** | **String** | | [optional] +**issues** | **Boolean** | | [optional] +**labels** | **Boolean** | | [optional] +**milestones** | **Boolean** | | [optional] **mirror** | **Boolean** | | [optional] **_private** | **Boolean** | | [optional] +**pullRequests** | **Boolean** | | [optional] +**releases** | **Boolean** | | [optional] **repoName** | **String** | | **uid** | **Long** | | +**wiki** | **Boolean** | | [optional] diff --git a/docs/MiscellaneousApi.md b/docs/MiscellaneousApi.md index 6922fe2..a8ac7bc 100644 --- a/docs/MiscellaneousApi.md +++ b/docs/MiscellaneousApi.md @@ -89,7 +89,7 @@ This endpoint does not need any parameter. # **renderMarkdown** -> renderMarkdown(body) +> String renderMarkdown(body) Render a markdown document as HTML @@ -142,7 +142,8 @@ Token.setApiKey("YOUR API KEY"); MiscellaneousApi apiInstance = new MiscellaneousApi(); MarkdownOption body = new MarkdownOption(); // MarkdownOption | try { - apiInstance.renderMarkdown(body); + String result = apiInstance.renderMarkdown(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MiscellaneousApi#renderMarkdown"); e.printStackTrace(); @@ -157,7 +158,7 @@ Name | Type | Description | Notes ### Return type -null (empty response body) +**String** ### Authorization @@ -170,7 +171,7 @@ null (empty response body) # **renderMarkdownRaw** -> renderMarkdownRaw(body) +> String renderMarkdownRaw(body) Render raw markdown as HTML @@ -223,7 +224,8 @@ Token.setApiKey("YOUR API KEY"); MiscellaneousApi apiInstance = new MiscellaneousApi(); String body = "body_example"; // String | Request body to render try { - apiInstance.renderMarkdownRaw(body); + String result = apiInstance.renderMarkdownRaw(body); + System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling MiscellaneousApi#renderMarkdownRaw"); e.printStackTrace(); @@ -238,7 +240,7 @@ Name | Type | Description | Notes ### Return type -null (empty response body) +**String** ### Authorization diff --git a/docs/Organization.md b/docs/Organization.md index f54f031..b6a48a2 100644 --- a/docs/Organization.md +++ b/docs/Organization.md @@ -9,7 +9,9 @@ Name | Type | Description | Notes **fullName** | **String** | | [optional] **id** | **Long** | | [optional] **location** | **String** | | [optional] +**repoAdminChangeTeamAccess** | **Boolean** | | [optional] **username** | **String** | | [optional] +**visibility** | **String** | | [optional] **website** | **String** | | [optional] diff --git a/docs/OrganizationApi.md b/docs/OrganizationApi.md index fdff348..8286e20 100644 --- a/docs/OrganizationApi.md +++ b/docs/OrganizationApi.md @@ -8,8 +8,10 @@ Method | HTTP request | Description [**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 +[**orgCreate**](OrganizationApi.md#orgCreate) | **POST** /orgs | Create an organization [**orgCreateHook**](OrganizationApi.md#orgCreateHook) | **POST** /orgs/{org}/hooks/ | Create a hook [**orgCreateTeam**](OrganizationApi.md#orgCreateTeam) | **POST** /orgs/{org}/teams | Create a team +[**orgDelete**](OrganizationApi.md#orgDelete) | **DELETE** /orgs/{org} | Delete an organization [**orgDeleteHook**](OrganizationApi.md#orgDeleteHook) | **DELETE** /orgs/{org}/hooks/{id} | Delete a hook [**orgDeleteMember**](OrganizationApi.md#orgDeleteMember) | **DELETE** /orgs/{org}/members/{username} | Remove a member from an organization [**orgDeleteTeam**](OrganizationApi.md#orgDeleteTeam) | **DELETE** /teams/{id} | Delete a team @@ -26,13 +28,15 @@ Method | HTTP request | Description [**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 +[**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 [**orgListTeamRepos**](OrganizationApi.md#orgListTeamRepos) | **GET** /teams/{id}/repos | List a team's repos [**orgListTeams**](OrganizationApi.md#orgListTeams) | **GET** /orgs/{org}/teams | List an organization's teams -[**orgListUserOrgs**](OrganizationApi.md#orgListUserOrgs) | **GET** /user/{username}/orgs | List a user's organizations +[**orgListUserOrgs**](OrganizationApi.md#orgListUserOrgs) | **GET** /users/{username}/orgs | List a user's organizations [**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 +[**teamSearch**](OrganizationApi.md#teamSearch) | **GET** /orgs/{org}/teams/search | Search for teams within an organization @@ -370,9 +374,91 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **orgCreate** +> Organization orgCreate(organization) + +Create 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: 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(); +CreateOrgOption organization = new CreateOrgOption(); // CreateOrgOption | +try { + Organization result = apiInstance.orgCreate(organization); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgCreate"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **organization** | [**CreateOrgOption**](CreateOrgOption.md)| | + +### Return type + +[**Organization**](Organization.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + # **orgCreateHook** -> List<Branch> orgCreateHook(org, body) +> Hook orgCreateHook(org, body) Create a hook @@ -426,7 +512,7 @@ OrganizationApi apiInstance = new OrganizationApi(); String org = "org_example"; // String | name of the organization CreateHookOption body = new CreateHookOption(); // CreateHookOption | try { - List result = apiInstance.orgCreateHook(org, body); + Hook result = apiInstance.orgCreateHook(org, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgCreateHook"); @@ -443,7 +529,7 @@ Name | Type | Description | Notes ### Return type -[**List<Branch>**](Branch.md) +[**Hook**](Hook.md) ### Authorization @@ -538,6 +624,87 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json + +# **orgDelete** +> orgDelete(org) + +Delete 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: 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 | organization that is to be deleted +try { + apiInstance.orgDelete(org); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgDelete"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| organization that is to be deleted | + +### 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + # **orgDeleteHook** > orgDeleteHook(org, id) @@ -854,7 +1021,7 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **org** | **String**| name of the organization to edit | - **body** | [**EditOrgOption**](EditOrgOption.md)| | [optional] + **body** | [**EditOrgOption**](EditOrgOption.md)| | ### Return type @@ -871,7 +1038,7 @@ Name | Type | Description | Notes # **orgEditHook** -> List<Branch> orgEditHook(org, id, body) +> Hook orgEditHook(org, id, body) Update a hook @@ -926,7 +1093,7 @@ String org = "org_example"; // String | name of the organization Long id = 789L; // Long | id of the hook to update EditHookOption body = new EditHookOption(); // EditHookOption | try { - List result = apiInstance.orgEditHook(org, id, body); + Hook result = apiInstance.orgEditHook(org, id, body); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgEditHook"); @@ -944,7 +1111,7 @@ Name | Type | Description | Notes ### Return type -[**List<Branch>**](Branch.md) +[**Hook**](Hook.md) ### Authorization @@ -1123,7 +1290,7 @@ Name | Type | Description | Notes # **orgGetHook** -> List<Branch> orgGetHook(org, id) +> Hook orgGetHook(org, id) Get a hook @@ -1177,7 +1344,7 @@ OrganizationApi apiInstance = new OrganizationApi(); String org = "org_example"; // String | name of the organization Long id = 789L; // Long | id of the hook to get try { - List result = apiInstance.orgGetHook(org, id); + Hook result = apiInstance.orgGetHook(org, id); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgGetHook"); @@ -1194,7 +1361,7 @@ Name | Type | Description | Notes ### Return type -[**List<Branch>**](Branch.md) +[**Hook**](Hook.md) ### Authorization @@ -1533,7 +1700,7 @@ This endpoint does not need any parameter. # **orgListHooks** -> List<Branch> orgListHooks(org) +> List<Hook> orgListHooks(org) List an organization's webhooks @@ -1586,7 +1753,7 @@ Token.setApiKey("YOUR API KEY"); OrganizationApi apiInstance = new OrganizationApi(); String org = "org_example"; // String | name of the organization try { - List result = apiInstance.orgListHooks(org); + List result = apiInstance.orgListHooks(org); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling OrganizationApi#orgListHooks"); @@ -1602,7 +1769,7 @@ Name | Type | Description | Notes ### Return type -[**List<Branch>**](Branch.md) +[**List<Hook>**](Hook.md) ### Authorization @@ -1854,6 +2021,90 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **orgListTeamMember** +> User orgListTeamMember(id, username) + +List a particular member of team + +### 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: 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 +String username = "username_example"; // String | username of the member to list +try { + User result = apiInstance.orgListTeamMember(id, username); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#orgListTeamMember"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **Long**| id of the team | + **username** | **String**| username of the member to list | + +### Return type + +[**User**](User.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -2440,3 +2691,93 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json + +# **teamSearch** +> InlineResponse200 teamSearch(org, q, includeDesc, limit, page) + +Search for teams within 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: 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 +String q = "q_example"; // String | keywords to search +Boolean includeDesc = true; // Boolean | include search within team description (defaults to true) +Integer limit = 56; // Integer | limit size of results +Integer page = 56; // Integer | page number of results to return (1-based) +try { + InlineResponse200 result = apiInstance.teamSearch(org, q, includeDesc, limit, page); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling OrganizationApi#teamSearch"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **org** | **String**| name of the organization | + **q** | **String**| keywords to search | [optional] + **includeDesc** | **Boolean**| include search within team description (defaults to true) | [optional] + **limit** | **Integer**| limit size of results | [optional] + **page** | **Integer**| page number of results to return (1-based) | [optional] + +### Return type + +[**InlineResponse200**](InlineResponse200.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + diff --git a/docs/PayloadCommit.md b/docs/PayloadCommit.md index ecea132..fe04829 100644 --- a/docs/PayloadCommit.md +++ b/docs/PayloadCommit.md @@ -4,10 +4,13 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**added** | **List<String>** | | [optional] **author** | [**PayloadUser**](PayloadUser.md) | | [optional] **committer** | [**PayloadUser**](PayloadUser.md) | | [optional] **id** | **String** | sha1 hash of the commit | [optional] **message** | **String** | | [optional] +**modified** | **List<String>** | | [optional] +**removed** | **List<String>** | | [optional] **timestamp** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **url** | **String** | | [optional] **verification** | [**PayloadCommitVerification**](PayloadCommitVerification.md) | | [optional] diff --git a/docs/Reference.md b/docs/Reference.md new file mode 100644 index 0000000..72d6f81 --- /dev/null +++ b/docs/Reference.md @@ -0,0 +1,12 @@ + +# Reference + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**object** | [**GitObject**](GitObject.md) | | [optional] +**ref** | **String** | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/RepoCommit.md b/docs/RepoCommit.md new file mode 100644 index 0000000..dcff042 --- /dev/null +++ b/docs/RepoCommit.md @@ -0,0 +1,14 @@ + +# RepoCommit + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**author** | [**CommitUser**](CommitUser.md) | | [optional] +**committer** | [**CommitUser**](CommitUser.md) | | [optional] +**message** | **String** | | [optional] +**tree** | [**CommitMeta**](CommitMeta.md) | | [optional] +**url** | **String** | | [optional] + + + diff --git a/docs/RepoTopicOptions.md b/docs/RepoTopicOptions.md new file mode 100644 index 0000000..8e0720f --- /dev/null +++ b/docs/RepoTopicOptions.md @@ -0,0 +1,10 @@ + +# RepoTopicOptions + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | **List<String>** | list of topic names | [optional] + + + diff --git a/docs/Repository.md b/docs/Repository.md index 4a03494..bd15e8b 100644 --- a/docs/Repository.md +++ b/docs/Repository.md @@ -4,20 +4,33 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**allowMergeCommits** | **Boolean** | | [optional] +**allowRebase** | **Boolean** | | [optional] +**allowRebaseExplicit** | **Boolean** | | [optional] +**allowSquashMerge** | **Boolean** | | [optional] **archived** | **Boolean** | | [optional] +**avatarUrl** | **String** | | [optional] **cloneUrl** | **String** | | [optional] **createdAt** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **defaultBranch** | **String** | | [optional] **description** | **String** | | [optional] **empty** | **Boolean** | | [optional] +**externalTracker** | [**ExternalTracker**](ExternalTracker.md) | | [optional] +**externalWiki** | [**ExternalWiki**](ExternalWiki.md) | | [optional] **fork** | **Boolean** | | [optional] **forksCount** | **Long** | | [optional] **fullName** | **String** | | [optional] +**hasIssues** | **Boolean** | | [optional] +**hasPullRequests** | **Boolean** | | [optional] +**hasWiki** | **Boolean** | | [optional] **htmlUrl** | **String** | | [optional] **id** | **Long** | | [optional] +**ignoreWhitespaceConflicts** | **Boolean** | | [optional] +**internalTracker** | [**InternalTracker**](InternalTracker.md) | | [optional] **mirror** | **Boolean** | | [optional] **name** | **String** | | [optional] **openIssuesCount** | **Long** | | [optional] +**originalUrl** | **String** | | [optional] **owner** | [**User**](User.md) | | [optional] **parent** | [**Repository**](Repository.md) | | [optional] **permissions** | [**Permission**](Permission.md) | | [optional] diff --git a/docs/RepositoryApi.md b/docs/RepositoryApi.md index 19bc955..270533e 100644 --- a/docs/RepositoryApi.md +++ b/docs/RepositoryApi.md @@ -6,9 +6,14 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**createCurrentUserRepo**](RepositoryApi.md#createCurrentUserRepo) | **POST** /user/repos | Create a repository [**createFork**](RepositoryApi.md#createFork) | **POST** /repos/{owner}/{repo}/forks | Fork a repository +[**getBlob**](RepositoryApi.md#getBlob) | **GET** /repos/{owner}/{repo}/git/blobs/{sha} | Gets the blob of a repository. +[**getTag**](RepositoryApi.md#getTag) | **GET** /repos/{owner}/{repo}/git/tags/{sha} | Gets the tag object of an annotated tag (not lightweight tags) +[**getTree**](RepositoryApi.md#getTree) | **GET** /repos/{owner}/{repo}/git/trees/{sha} | Gets the tree of a repository. [**listForks**](RepositoryApi.md#listForks) | **GET** /repos/{owner}/{repo}/forks | List a repository's forks [**repoAddCollaborator**](RepositoryApi.md#repoAddCollaborator) | **PUT** /repos/{owner}/{repo}/collaborators/{collaborator} | Add a collaborator to a repository +[**repoAddTopc**](RepositoryApi.md#repoAddTopc) | **PUT** /repos/{owner}/{repo}/topics/{topic} | Add a topic to a repository [**repoCheckCollaborator**](RepositoryApi.md#repoCheckCollaborator) | **GET** /repos/{owner}/{repo}/collaborators/{collaborator} | Check if a user is a collaborator of a repository +[**repoCreateFile**](RepositoryApi.md#repoCreateFile) | **POST** /repos/{owner}/{repo}/contents/{filepath} | Create a file in a repository [**repoCreateHook**](RepositoryApi.md#repoCreateHook) | **POST** /repos/{owner}/{repo}/hooks | Create a hook [**repoCreateKey**](RepositoryApi.md#repoCreateKey) | **POST** /repos/{owner}/{repo}/keys | Add a key to a repository [**repoCreatePullRequest**](RepositoryApi.md#repoCreatePullRequest) | **POST** /repos/{owner}/{repo}/pulls | Create a pull request @@ -17,28 +22,41 @@ Method | HTTP request | Description [**repoCreateStatus**](RepositoryApi.md#repoCreateStatus) | **POST** /repos/{owner}/{repo}/statuses/{sha} | Create a commit status [**repoDelete**](RepositoryApi.md#repoDelete) | **DELETE** /repos/{owner}/{repo} | Delete a repository [**repoDeleteCollaborator**](RepositoryApi.md#repoDeleteCollaborator) | **DELETE** /repos/{owner}/{repo}/collaborators/{collaborator} | Delete a collaborator from a repository +[**repoDeleteFile**](RepositoryApi.md#repoDeleteFile) | **DELETE** /repos/{owner}/{repo}/contents/{filepath} | Delete a file in a repository +[**repoDeleteGitHook**](RepositoryApi.md#repoDeleteGitHook) | **DELETE** /repos/{owner}/{repo}/hooks/git/{id} | Delete a Git hook in a repository [**repoDeleteHook**](RepositoryApi.md#repoDeleteHook) | **DELETE** /repos/{owner}/{repo}/hooks/{id} | Delete a hook in a repository [**repoDeleteKey**](RepositoryApi.md#repoDeleteKey) | **DELETE** /repos/{owner}/{repo}/keys/{id} | Delete a key from a repository [**repoDeleteRelease**](RepositoryApi.md#repoDeleteRelease) | **DELETE** /repos/{owner}/{repo}/releases/{id} | Delete a release [**repoDeleteReleaseAttachment**](RepositoryApi.md#repoDeleteReleaseAttachment) | **DELETE** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Delete a release attachment +[**repoDeleteTopic**](RepositoryApi.md#repoDeleteTopic) | **DELETE** /repos/{owner}/{repo}/topics/{topic} | Delete a topic from a repository +[**repoEdit**](RepositoryApi.md#repoEdit) | **PATCH** /repos/{owner}/{repo} | Edit a repository's properties. Only fields that are set will be changed. +[**repoEditGitHook**](RepositoryApi.md#repoEditGitHook) | **PATCH** /repos/{owner}/{repo}/hooks/git/{id} | Edit a Git hook in a repository [**repoEditHook**](RepositoryApi.md#repoEditHook) | **PATCH** /repos/{owner}/{repo}/hooks/{id} | Edit a hook in a repository [**repoEditPullRequest**](RepositoryApi.md#repoEditPullRequest) | **PATCH** /repos/{owner}/{repo}/pulls/{index} | Update a pull request [**repoEditRelease**](RepositoryApi.md#repoEditRelease) | **PATCH** /repos/{owner}/{repo}/releases/{id} | Update a release [**repoEditReleaseAttachment**](RepositoryApi.md#repoEditReleaseAttachment) | **PATCH** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Edit a release attachment [**repoGet**](RepositoryApi.md#repoGet) | **GET** /repos/{owner}/{repo} | Get a repository +[**repoGetAllCommits**](RepositoryApi.md#repoGetAllCommits) | **GET** /repos/{owner}/{repo}/commits | Get a list of all commits from a repository [**repoGetArchive**](RepositoryApi.md#repoGetArchive) | **GET** /repos/{owner}/{repo}/archive/{archive} | Get an archive of a repository [**repoGetBranch**](RepositoryApi.md#repoGetBranch) | **GET** /repos/{owner}/{repo}/branches/{branch} | Retrieve a specific branch from a repository [**repoGetByID**](RepositoryApi.md#repoGetByID) | **GET** /repositories/{id} | Get a repository by id [**repoGetCombinedStatusByRef**](RepositoryApi.md#repoGetCombinedStatusByRef) | **GET** /repos/{owner}/{repo}/commits/{ref}/statuses | Get a commit's combined status, by branch/tag/commit reference +[**repoGetContents**](RepositoryApi.md#repoGetContents) | **GET** /repos/{owner}/{repo}/contents/{filepath} | Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir +[**repoGetContentsList**](RepositoryApi.md#repoGetContentsList) | **GET** /repos/{owner}/{repo}/contents | Gets the metadata of all the entries of the root dir [**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 [**repoGetKey**](RepositoryApi.md#repoGetKey) | **GET** /repos/{owner}/{repo}/keys/{id} | Get a repository's key by id [**repoGetPullRequest**](RepositoryApi.md#repoGetPullRequest) | **GET** /repos/{owner}/{repo}/pulls/{index} | Get a pull request [**repoGetRawFile**](RepositoryApi.md#repoGetRawFile) | **GET** /repos/{owner}/{repo}/raw/{filepath} | Get a file from a repository [**repoGetRelease**](RepositoryApi.md#repoGetRelease) | **GET** /repos/{owner}/{repo}/releases/{id} | Get a release [**repoGetReleaseAttachment**](RepositoryApi.md#repoGetReleaseAttachment) | **GET** /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} | Get a release attachment +[**repoGetSingleCommit**](RepositoryApi.md#repoGetSingleCommit) | **GET** /repos/{owner}/{repo}/git/commits/{sha} | Get a single commit from a repository +[**repoListAllGitRefs**](RepositoryApi.md#repoListAllGitRefs) | **GET** /repos/{owner}/{repo}/git/refs | Get specified ref or filtered repository's refs [**repoListBranches**](RepositoryApi.md#repoListBranches) | **GET** /repos/{owner}/{repo}/branches | List a repository's branches [**repoListCollaborators**](RepositoryApi.md#repoListCollaborators) | **GET** /repos/{owner}/{repo}/collaborators | List a repository's collaborators +[**repoListGitHooks**](RepositoryApi.md#repoListGitHooks) | **GET** /repos/{owner}/{repo}/hooks/git | List the Git hooks in a repository +[**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 [**repoListPullRequests**](RepositoryApi.md#repoListPullRequests) | **GET** /repos/{owner}/{repo}/pulls | List a repo's pull requests @@ -47,6 +65,8 @@ Method | HTTP request | Description [**repoListStargazers**](RepositoryApi.md#repoListStargazers) | **GET** /repos/{owner}/{repo}/stargazers | List a repo's stargazers [**repoListStatuses**](RepositoryApi.md#repoListStatuses) | **GET** /repos/{owner}/{repo}/statuses/{sha} | Get a commit's statuses [**repoListSubscribers**](RepositoryApi.md#repoListSubscribers) | **GET** /repos/{owner}/{repo}/subscribers | List a repo's watchers +[**repoListTags**](RepositoryApi.md#repoListTags) | **GET** /repos/{owner}/{repo}/tags | List a repository's tags +[**repoListTopics**](RepositoryApi.md#repoListTopics) | **GET** /repos/{owner}/{repo}/topics | Get list of topics that a repository has [**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 @@ -54,6 +74,8 @@ Method | HTTP request | Description [**repoSearch**](RepositoryApi.md#repoSearch) | **GET** /repos/search | Search for repositories [**repoTestHook**](RepositoryApi.md#repoTestHook) | **POST** /repos/{owner}/{repo}/hooks/{id}/tests | Test a push webhook [**repoTrackedTimes**](RepositoryApi.md#repoTrackedTimes) | **GET** /repos/{owner}/{repo}/times | List a repo's tracked times +[**repoUpdateFile**](RepositoryApi.md#repoUpdateFile) | **PUT** /repos/{owner}/{repo}/contents/{filepath} | Update a file in a repository +[**repoUpdateTopics**](RepositoryApi.md#repoUpdateTopics) | **PUT** /repos/{owner}/{repo}/topics | Replace list of topics for a repository [**topicSearch**](RepositoryApi.md#topicSearch) | **GET** /topics/search | search topics via keyword [**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 @@ -223,6 +245,270 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **getBlob** +> GitBlobResponse getBlob(owner, repo, sha) + +Gets the blob of 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: 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 +String sha = "sha_example"; // String | sha of the commit +try { + GitBlobResponse result = apiInstance.getBlob(owner, repo, sha); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#getBlob"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **sha** | **String**| sha of the commit | + +### Return type + +[**GitBlobResponse**](GitBlobResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **getTag** +> AnnotatedTag getTag(owner, repo, sha) + +Gets the tag object of an annotated tag (not lightweight tags) + +### 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: 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 +String sha = "sha_example"; // String | sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. +try { + AnnotatedTag result = apiInstance.getTag(owner, repo, sha); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#getTag"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **sha** | **String**| sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. | + +### Return type + +[**AnnotatedTag**](AnnotatedTag.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **getTree** +> GitTreeResponse getTree(owner, repo, sha, recursive, page, perPage) + +Gets the tree of 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: 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 +String sha = "sha_example"; // String | sha of the commit +Boolean recursive = true; // Boolean | show all directories and files +Integer page = 56; // Integer | page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page +Integer perPage = 56; // Integer | number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE +try { + GitTreeResponse result = apiInstance.getTree(owner, repo, sha, recursive, page, perPage); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#getTree"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **sha** | **String**| sha of the commit | + **recursive** | **Boolean**| show all directories and files | [optional] + **page** | **Integer**| page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page | [optional] + **perPage** | **Integer**| number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE | [optional] + +### Return type + +[**GitTreeResponse**](GitTreeResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -399,11 +685,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoCheckCollaborator** -> repoCheckCollaborator(owner, repo, collaborator) + +# **repoAddTopc** +> repoAddTopc(owner, repo, topic) -Check if a user is a collaborator of a repository +Add a topic to a repository ### Example ```java @@ -454,11 +740,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String collaborator = "collaborator_example"; // String | username of the collaborator +String topic = "topic_example"; // String | name of the topic to add try { - apiInstance.repoCheckCollaborator(owner, repo, collaborator); + apiInstance.repoAddTopc(owner, repo, topic); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCheckCollaborator"); + System.err.println("Exception when calling RepositoryApi#repoAddTopc"); e.printStackTrace(); } ``` @@ -469,7 +755,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **collaborator** | **String**| username of the collaborator | + **topic** | **String**| name of the topic to add | ### Return type @@ -484,11 +770,1474 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoCreateHook** -> List<Branch> repoCreateHook(owner, repo, body) + +# **repoCheckCollaborator** +> repoCheckCollaborator(owner, repo, collaborator) -Create a hook +Check if a user is a collaborator of 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: 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 +String collaborator = "collaborator_example"; // String | username of the collaborator +try { + apiInstance.repoCheckCollaborator(owner, repo, collaborator); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCheckCollaborator"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **collaborator** | **String**| username of the collaborator | + +### 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoCreateFile** +> FileResponse repoCreateFile(owner, repo, filepath, body) + +Create a file 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: 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 +String filepath = "filepath_example"; // String | path of the file to create +CreateFileOptions body = new CreateFileOptions(); // CreateFileOptions | +try { + FileResponse result = apiInstance.repoCreateFile(owner, repo, filepath, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreateFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **filepath** | **String**| path of the file to create | + **body** | [**CreateFileOptions**](CreateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoCreateHook** +> Hook repoCreateHook(owner, repo, 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.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: 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 +CreateHookOption body = new CreateHookOption(); // CreateHookOption | +try { + Hook result = apiInstance.repoCreateHook(owner, repo, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreateHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**CreateHookOption**](CreateHookOption.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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoCreateKey** +> DeployKey repoCreateKey(owner, repo, body) + +Add a key to 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: 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 +CreateKeyOption body = new CreateKeyOption(); // CreateKeyOption | +try { + DeployKey result = apiInstance.repoCreateKey(owner, repo, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreateKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + +### Return type + +[**DeployKey**](DeployKey.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoCreatePullRequest** +> PullRequest repoCreatePullRequest(owner, repo, body) + +Create a pull request + +### 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: 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 +CreatePullRequestOption body = new CreatePullRequestOption(); // CreatePullRequestOption | +try { + PullRequest result = apiInstance.repoCreatePullRequest(owner, repo, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreatePullRequest"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**CreatePullRequestOption**](CreatePullRequestOption.md)| | [optional] + +### Return type + +[**PullRequest**](PullRequest.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoCreateRelease** +> Release repoCreateRelease(owner, repo, body) + +Create a release + +### 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: 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 +CreateReleaseOption body = new CreateReleaseOption(); // CreateReleaseOption | +try { + Release result = apiInstance.repoCreateRelease(owner, repo, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreateRelease"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**CreateReleaseOption**](CreateReleaseOption.md)| | [optional] + +### 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoCreateReleaseAttachment** +> Attachment repoCreateReleaseAttachment(owner, repo, id, attachment, name) + +Create a release 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.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: 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 +Long id = 789L; // Long | id of the release +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.repoCreateReleaseAttachment(owner, repo, id, attachment, name); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreateReleaseAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the release | + **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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: multipart/form-data + - **Accept**: application/json + + +# **repoCreateStatus** +> List<Status> repoCreateStatus(owner, repo, sha, body) + +Create a commit status + +### 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: 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 +String sha = "sha_example"; // String | sha of the commit +CreateStatusOption body = new CreateStatusOption(); // CreateStatusOption | +try { + List result = apiInstance.repoCreateStatus(owner, repo, sha, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoCreateStatus"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **sha** | **String**| sha of the commit | + **body** | [**CreateStatusOption**](CreateStatusOption.md)| | [optional] + +### Return type + +[**List<Status>**](Status.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDelete** +> repoDelete(owner, repo) + +Delete 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: 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 to delete +String repo = "repo_example"; // String | name of the repo to delete +try { + apiInstance.repoDelete(owner, repo); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDelete"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo to delete | + **repo** | **String**| name of the repo 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDeleteCollaborator** +> repoDeleteCollaborator(owner, repo, collaborator) + +Delete a collaborator from 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: 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 +String collaborator = "collaborator_example"; // String | username of the collaborator to delete +try { + apiInstance.repoDeleteCollaborator(owner, repo, collaborator); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteCollaborator"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **collaborator** | **String**| username of the collaborator 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDeleteFile** +> FileDeleteResponse repoDeleteFile(owner, repo, filepath, body) + +Delete a file 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: 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 +String filepath = "filepath_example"; // String | path of the file to delete +DeleteFileOptions body = new DeleteFileOptions(); // DeleteFileOptions | +try { + FileDeleteResponse result = apiInstance.repoDeleteFile(owner, repo, filepath, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **filepath** | **String**| path of the file to delete | + **body** | [**DeleteFileOptions**](DeleteFileOptions.md)| | + +### Return type + +[**FileDeleteResponse**](FileDeleteResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoDeleteGitHook** +> repoDeleteGitHook(owner, repo, id) + +Delete a Git hook 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: 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 +String id = "id_example"; // String | id of the hook to get +try { + apiInstance.repoDeleteGitHook(owner, repo, id); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteGitHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **String**| id of the hook to get | + +### 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDeleteHook** +> repoDeleteHook(owner, repo, id) + +Delete a hook 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: 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 +Long id = 789L; // Long | id of the hook to delete +try { + apiInstance.repoDeleteHook(owner, repo, id); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteHook"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDeleteKey** +> repoDeleteKey(owner, repo, id) + +Delete a key from 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: 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 +Long id = 789L; // Long | id of the key to delete +try { + apiInstance.repoDeleteKey(owner, repo, id); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteKey"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the key 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + + +# **repoDeleteRelease** +> repoDeleteRelease(owner, repo, id) + +Delete a release + +### 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: 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 +Long id = 789L; // Long | id of the release to delete +try { + apiInstance.repoDeleteRelease(owner, repo, id); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteRelease"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the release 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json, text/html + + +# **repoDeleteReleaseAttachment** +> repoDeleteReleaseAttachment(owner, repo, id, attachmentId) + +Delete a release 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.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: 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 +Long id = 789L; // Long | id of the release +Long attachmentId = 789L; // Long | id of the attachment to delete +try { + apiInstance.repoDeleteReleaseAttachment(owner, repo, id, attachmentId); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteReleaseAttachment"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **id** | **Long**| id of the release | + **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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoDeleteTopic** +> repoDeleteTopic(owner, repo, topic) + +Delete a topic from 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: 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 +String topic = "topic_example"; // String | name of the topic to delete +try { + apiInstance.repoDeleteTopic(owner, repo, topic); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoDeleteTopic"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **topic** | **String**| name of the topic 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), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoEdit** +> Repository repoEdit(owner, repo, body) + +Edit a repository's properties. Only fields that are set will be changed. ### Example ```java @@ -537,14 +2286,14 @@ Token.setApiKey("YOUR API KEY"); //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 -CreateHookOption body = new CreateHookOption(); // CreateHookOption | +String owner = "owner_example"; // String | owner of the repo to edit +String repo = "repo_example"; // String | name of the repo to edit +EditRepoOption body = new EditRepoOption(); // EditRepoOption | Properties of a repo that you can edit try { - List result = apiInstance.repoCreateHook(owner, repo, body); + Repository result = apiInstance.repoEdit(owner, repo, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCreateHook"); + System.err.println("Exception when calling RepositoryApi#repoEdit"); e.printStackTrace(); } ``` @@ -553,13 +2302,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repo | - **repo** | **String**| name of the repo | - **body** | [**CreateHookOption**](CreateHookOption.md)| | [optional] + **owner** | **String**| owner of the repo to edit | + **repo** | **String**| name of the repo to edit | + **body** | [**EditRepoOption**](EditRepoOption.md)| Properties of a repo that you can edit | [optional] ### Return type -[**List<Branch>**](Branch.md) +[**Repository**](Repository.md) ### Authorization @@ -567,14 +2316,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoCreateKey** -> DeployKey repoCreateKey(owner, repo, body) + +# **repoEditGitHook** +> GitHook repoEditGitHook(owner, repo, id, body) -Add a key to a repository +Edit a Git hook in a repository ### Example ```java @@ -625,12 +2374,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -CreateKeyOption body = new CreateKeyOption(); // CreateKeyOption | +String id = "id_example"; // String | id of the hook to get +EditGitHookOption body = new EditGitHookOption(); // EditGitHookOption | try { - DeployKey result = apiInstance.repoCreateKey(owner, repo, body); + GitHook result = apiInstance.repoEditGitHook(owner, repo, id, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCreateKey"); + System.err.println("Exception when calling RepositoryApi#repoEditGitHook"); e.printStackTrace(); } ``` @@ -641,11 +2391,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **body** | [**CreateKeyOption**](CreateKeyOption.md)| | [optional] + **id** | **String**| id of the hook to get | + **body** | [**EditGitHookOption**](EditGitHookOption.md)| | [optional] ### Return type -[**DeployKey**](DeployKey.md) +[**GitHook**](GitHook.md) ### Authorization @@ -653,14 +2404,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoCreatePullRequest** -> PullRequest repoCreatePullRequest(owner, repo, body) + +# **repoEditHook** +> Hook repoEditHook(owner, repo, id, body) -Create a pull request +Edit a hook in a repository ### Example ```java @@ -711,12 +2462,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -CreatePullRequestOption body = new CreatePullRequestOption(); // CreatePullRequestOption | +Long id = 789L; // Long | index of the hook +EditHookOption body = new EditHookOption(); // EditHookOption | try { - PullRequest result = apiInstance.repoCreatePullRequest(owner, repo, body); + Hook result = apiInstance.repoEditHook(owner, repo, id, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCreatePullRequest"); + System.err.println("Exception when calling RepositoryApi#repoEditHook"); e.printStackTrace(); } ``` @@ -727,11 +2479,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **body** | [**CreatePullRequestOption**](CreatePullRequestOption.md)| | [optional] + **id** | **Long**| index of the hook | + **body** | [**EditHookOption**](EditHookOption.md)| | [optional] ### Return type -[**PullRequest**](PullRequest.md) +[**Hook**](Hook.md) ### Authorization @@ -739,14 +2492,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoCreateRelease** -> Release repoCreateRelease(owner, repo, body) + +# **repoEditPullRequest** +> PullRequest repoEditPullRequest(owner, repo, index, body) -Create a release +Update a pull request ### Example ```java @@ -797,12 +2550,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -CreateReleaseOption body = new CreateReleaseOption(); // CreateReleaseOption | +Long index = 789L; // Long | index of the pull request to edit +EditPullRequestOption body = new EditPullRequestOption(); // EditPullRequestOption | try { - Release result = apiInstance.repoCreateRelease(owner, repo, body); + PullRequest result = apiInstance.repoEditPullRequest(owner, repo, index, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCreateRelease"); + System.err.println("Exception when calling RepositoryApi#repoEditPullRequest"); e.printStackTrace(); } ``` @@ -813,11 +2567,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **body** | [**CreateReleaseOption**](CreateReleaseOption.md)| | [optional] + **index** | **Long**| index of the pull request to edit | + **body** | [**EditPullRequestOption**](EditPullRequestOption.md)| | [optional] ### Return type -[**Release**](Release.md) +[**PullRequest**](PullRequest.md) ### Authorization @@ -828,11 +2583,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json - **Accept**: application/json - -# **repoCreateReleaseAttachment** -> Attachment repoCreateReleaseAttachment(owner, repo, id, attachment, name) + +# **repoEditRelease** +> Release repoEditRelease(owner, repo, id, body) -Create a release attachment +Update a release ### Example ```java @@ -883,14 +2638,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release -File attachment = new File("/path/to/file.txt"); // File | attachment to upload -String name = "name_example"; // String | name of the attachment +Long id = 789L; // Long | id of the release to edit +EditReleaseOption body = new EditReleaseOption(); // EditReleaseOption | try { - Attachment result = apiInstance.repoCreateReleaseAttachment(owner, repo, id, attachment, name); + Release result = apiInstance.repoEditRelease(owner, repo, id, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCreateReleaseAttachment"); + System.err.println("Exception when calling RepositoryApi#repoEditRelease"); e.printStackTrace(); } ``` @@ -901,13 +2655,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release | - **attachment** | **File**| attachment to upload | - **name** | **String**| name of the attachment | [optional] + **id** | **Long**| id of the release to edit | + **body** | [**EditReleaseOption**](EditReleaseOption.md)| | [optional] ### Return type -[**Attachment**](Attachment.md) +[**Release**](Release.md) ### Authorization @@ -915,14 +2668,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: multipart/form-data + - **Content-Type**: application/json - **Accept**: application/json - -# **repoCreateStatus** -> List<Status> repoCreateStatus(owner, repo, sha, body) + +# **repoEditReleaseAttachment** +> Attachment repoEditReleaseAttachment(owner, repo, id, attachmentId, body) -Create a commit status +Edit a release attachment ### Example ```java @@ -973,13 +2726,14 @@ Token.setApiKey("YOUR API KEY"); 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 | sha of the commit -CreateStatusOption body = new CreateStatusOption(); // CreateStatusOption | +Long id = 789L; // Long | id of the release +Long attachmentId = 789L; // Long | id of the attachment to edit +EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions | try { - List result = apiInstance.repoCreateStatus(owner, repo, sha, body); + Attachment result = apiInstance.repoEditReleaseAttachment(owner, repo, id, attachmentId, body); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoCreateStatus"); + System.err.println("Exception when calling RepositoryApi#repoEditReleaseAttachment"); e.printStackTrace(); } ``` @@ -990,12 +2744,13 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **sha** | **String**| sha of the commit | - **body** | [**CreateStatusOption**](CreateStatusOption.md)| | [optional] + **id** | **Long**| id of the release | + **attachmentId** | **Long**| id of the attachment to edit | + **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] ### Return type -[**List<Status>**](Status.md) +[**Attachment**](Attachment.md) ### Authorization @@ -1003,14 +2758,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json, text/plain + - **Content-Type**: application/json - **Accept**: application/json - -# **repoDelete** -> repoDelete(owner, repo) + +# **repoGet** +> Repository repoGet(owner, repo) -Delete a repository +Get a repository ### Example ```java @@ -1059,12 +2814,13 @@ Token.setApiKey("YOUR API KEY"); //Token.setApiKeyPrefix("Token"); RepositoryApi apiInstance = new RepositoryApi(); -String owner = "owner_example"; // String | owner of the repo to delete -String repo = "repo_example"; // String | name of the repo to delete +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo try { - apiInstance.repoDelete(owner, repo); + Repository result = apiInstance.repoGet(owner, repo); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoDelete"); + System.err.println("Exception when calling RepositoryApi#repoGet"); e.printStackTrace(); } ``` @@ -1073,12 +2829,12 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repo to delete | - **repo** | **String**| name of the repo to delete | + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | ### Return type -null (empty response body) +[**Repository**](Repository.md) ### Authorization @@ -1089,11 +2845,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoDeleteCollaborator** -> repoDeleteCollaborator(owner, repo, collaborator) + +# **repoGetAllCommits** +> List<Commit> repoGetAllCommits(owner, repo, sha, page) -Delete a collaborator from a repository +Get a list of all commits from a repository ### Example ```java @@ -1144,11 +2900,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String collaborator = "collaborator_example"; // String | username of the collaborator to delete +String sha = "sha_example"; // String | SHA or branch to start listing commits from (usually 'master') +Integer page = 56; // Integer | page number of requested commits try { - apiInstance.repoDeleteCollaborator(owner, repo, collaborator); + List result = apiInstance.repoGetAllCommits(owner, repo, sha, page); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoDeleteCollaborator"); + System.err.println("Exception when calling RepositoryApi#repoGetAllCommits"); e.printStackTrace(); } ``` @@ -1159,11 +2917,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **collaborator** | **String**| username of the collaborator to delete | + **sha** | **String**| SHA or branch to start listing commits from (usually 'master') | [optional] + **page** | **Integer**| page number of requested commits | [optional] ### Return type -null (empty response body) +[**List<Commit>**](Commit.md) ### Authorization @@ -1174,11 +2933,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoDeleteHook** -> repoDeleteHook(owner, repo, id) + +# **repoGetArchive** +> repoGetArchive(owner, repo, archive) -Delete a hook in a repository +Get an archive of a repository ### Example ```java @@ -1229,11 +2988,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 hook to delete +String archive = "archive_example"; // String | archive to download, consisting of a git reference and archive try { - apiInstance.repoDeleteHook(owner, repo, id); + apiInstance.repoGetArchive(owner, repo, archive); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoDeleteHook"); + System.err.println("Exception when calling RepositoryApi#repoGetArchive"); e.printStackTrace(); } ``` @@ -1244,7 +3003,7 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the hook to delete | + **archive** | **String**| archive to download, consisting of a git reference and archive | ### Return type @@ -1259,11 +3018,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoDeleteKey** -> repoDeleteKey(owner, repo, id) + +# **repoGetBranch** +> Branch repoGetBranch(owner, repo, branch) -Delete a key from a repository +Retrieve a specific branch from a repository ### Example ```java @@ -1314,11 +3073,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 key to delete +String branch = "branch_example"; // String | branch to get try { - apiInstance.repoDeleteKey(owner, repo, id); + Branch result = apiInstance.repoGetBranch(owner, repo, branch); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoDeleteKey"); + System.err.println("Exception when calling RepositoryApi#repoGetBranch"); e.printStackTrace(); } ``` @@ -1329,11 +3089,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the key to delete | + **branch** | **String**| branch to get | ### Return type -null (empty response body) +[**Branch**](Branch.md) ### Authorization @@ -1342,13 +3102,13 @@ null (empty response body) ### HTTP request headers - **Content-Type**: application/json, text/plain - - **Accept**: application/json, text/html + - **Accept**: application/json - -# **repoDeleteRelease** -> repoDeleteRelease(owner, repo, id) + +# **repoGetByID** +> Repository repoGetByID(id) -Delete a release +Get a repository by id ### Example ```java @@ -1397,13 +3157,12 @@ Token.setApiKey("YOUR API KEY"); //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 -Long id = 789L; // Long | id of the release to delete +Long id = 789L; // Long | id of the repo to get try { - apiInstance.repoDeleteRelease(owner, repo, id); + Repository result = apiInstance.repoGetByID(id); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoDeleteRelease"); + System.err.println("Exception when calling RepositoryApi#repoGetByID"); e.printStackTrace(); } ``` @@ -1412,13 +3171,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **owner** | **String**| owner of the repo | - **repo** | **String**| name of the repo | - **id** | **Long**| id of the release to delete | + **id** | **Long**| id of the repo to get | ### Return type -null (empty response body) +[**Repository**](Repository.md) ### Authorization @@ -1427,13 +3184,13 @@ null (empty response body) ### HTTP request headers - **Content-Type**: application/json, text/plain - - **Accept**: application/json, text/html + - **Accept**: application/json - -# **repoDeleteReleaseAttachment** -> repoDeleteReleaseAttachment(owner, repo, id, attachmentId) + +# **repoGetCombinedStatusByRef** +> Status repoGetCombinedStatusByRef(owner, repo, ref, page) -Delete a release attachment +Get a commit's combined status, by branch/tag/commit reference ### Example ```java @@ -1484,12 +3241,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release -Long attachmentId = 789L; // Long | id of the attachment to delete +String ref = "ref_example"; // String | name of branch/tag/commit +Integer page = 56; // Integer | page number of results try { - apiInstance.repoDeleteReleaseAttachment(owner, repo, id, attachmentId); + Status result = apiInstance.repoGetCombinedStatusByRef(owner, repo, ref, page); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoDeleteReleaseAttachment"); + System.err.println("Exception when calling RepositoryApi#repoGetCombinedStatusByRef"); e.printStackTrace(); } ``` @@ -1500,12 +3258,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release | - **attachmentId** | **Long**| id of the attachment to delete | + **ref** | **String**| name of branch/tag/commit | + **page** | **Integer**| page number of results | [optional] ### Return type -null (empty response body) +[**Status**](Status.md) ### Authorization @@ -1516,11 +3274,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoEditHook** -> List<Branch> repoEditHook(owner, repo, id, body) + +# **repoGetContents** +> ContentsResponse repoGetContents(owner, repo, filepath, ref) -Edit a hook in a repository +Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir ### Example ```java @@ -1571,13 +3329,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -Long id = 789L; // Long | index of the hook -EditHookOption body = new EditHookOption(); // EditHookOption | +String filepath = "filepath_example"; // String | path of the dir, file, symlink or submodule in the repo +String ref = "ref_example"; // String | The name of the commit/branch/tag. Default the repository’s default branch (usually master) try { - List result = apiInstance.repoEditHook(owner, repo, id, body); + ContentsResponse result = apiInstance.repoGetContents(owner, repo, filepath, ref); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoEditHook"); + System.err.println("Exception when calling RepositoryApi#repoGetContents"); e.printStackTrace(); } ``` @@ -1588,12 +3346,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| index of the hook | - **body** | [**EditHookOption**](EditHookOption.md)| | [optional] + **filepath** | **String**| path of the dir, file, symlink or submodule in the repo | + **ref** | **String**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] ### Return type -[**List<Branch>**](Branch.md) +[**ContentsResponse**](ContentsResponse.md) ### Authorization @@ -1604,11 +3362,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoEditPullRequest** -> PullRequest repoEditPullRequest(owner, repo, index, body) + +# **repoGetContentsList** +> List<ContentsResponse> repoGetContentsList(owner, repo, ref) -Update a pull request +Gets the metadata of all the entries of the root dir ### Example ```java @@ -1659,13 +3417,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 pull request to edit -EditPullRequestOption body = new EditPullRequestOption(); // EditPullRequestOption | +String ref = "ref_example"; // String | The name of the commit/branch/tag. Default the repository’s default branch (usually master) try { - PullRequest result = apiInstance.repoEditPullRequest(owner, repo, index, body); + List result = apiInstance.repoGetContentsList(owner, repo, ref); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoEditPullRequest"); + System.err.println("Exception when calling RepositoryApi#repoGetContentsList"); e.printStackTrace(); } ``` @@ -1676,12 +3433,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **index** | **Long**| index of the pull request to edit | - **body** | [**EditPullRequestOption**](EditPullRequestOption.md)| | [optional] + **ref** | **String**| The name of the commit/branch/tag. Default the repository’s default branch (usually master) | [optional] ### Return type -[**PullRequest**](PullRequest.md) +[**List<ContentsResponse>**](ContentsResponse.md) ### Authorization @@ -1689,14 +3445,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoEditRelease** -> Release repoEditRelease(owner, repo, id, body) + +# **repoGetEditorConfig** +> repoGetEditorConfig(owner, repo, filepath) -Update a release +Get the EditorConfig definitions of a file in a repository ### Example ```java @@ -1747,13 +3503,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release to edit -EditReleaseOption body = new EditReleaseOption(); // EditReleaseOption | +String filepath = "filepath_example"; // String | filepath of file to get try { - Release result = apiInstance.repoEditRelease(owner, repo, id, body); - System.out.println(result); + apiInstance.repoGetEditorConfig(owner, repo, filepath); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoEditRelease"); + System.err.println("Exception when calling RepositoryApi#repoGetEditorConfig"); e.printStackTrace(); } ``` @@ -1764,12 +3518,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release to edit | - **body** | [**EditReleaseOption**](EditReleaseOption.md)| | [optional] + **filepath** | **String**| filepath of file to get | ### Return type -[**Release**](Release.md) +null (empty response body) ### Authorization @@ -1777,14 +3530,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoEditReleaseAttachment** -> Attachment repoEditReleaseAttachment(owner, repo, id, attachmentId, body) + +# **repoGetGitHook** +> GitHook repoGetGitHook(owner, repo, id) -Edit a release attachment +Get a Git hook ### Example ```java @@ -1835,14 +3588,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release -Long attachmentId = 789L; // Long | id of the attachment to edit -EditAttachmentOptions body = new EditAttachmentOptions(); // EditAttachmentOptions | +String id = "id_example"; // String | id of the hook to get try { - Attachment result = apiInstance.repoEditReleaseAttachment(owner, repo, id, attachmentId, body); + GitHook result = apiInstance.repoGetGitHook(owner, repo, id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoEditReleaseAttachment"); + System.err.println("Exception when calling RepositoryApi#repoGetGitHook"); e.printStackTrace(); } ``` @@ -1853,13 +3604,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release | - **attachmentId** | **Long**| id of the attachment to edit | - **body** | [**EditAttachmentOptions**](EditAttachmentOptions.md)| | [optional] + **id** | **String**| id of the hook to get | ### Return type -[**Attachment**](Attachment.md) +[**GitHook**](GitHook.md) ### Authorization @@ -1867,14 +3616,14 @@ Name | Type | Description | Notes ### HTTP request headers - - **Content-Type**: application/json + - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGet** -> Repository repoGet(owner, repo) + +# **repoGetHook** +> Hook repoGetHook(owner, repo, id) -Get a repository +Get a hook ### Example ```java @@ -1925,11 +3674,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 hook to get try { - Repository result = apiInstance.repoGet(owner, repo); + Hook result = apiInstance.repoGetHook(owner, repo, id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGet"); + System.err.println("Exception when calling RepositoryApi#repoGetHook"); e.printStackTrace(); } ``` @@ -1940,10 +3690,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | + **id** | **Long**| id of the hook to get | ### Return type -[**Repository**](Repository.md) +[**Hook**](Hook.md) ### Authorization @@ -1954,11 +3705,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetArchive** -> repoGetArchive(owner, repo, archive) + +# **repoGetKey** +> DeployKey repoGetKey(owner, repo, id) -Get an archive of a repository +Get a repository's key by id ### Example ```java @@ -2009,11 +3760,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String archive = "archive_example"; // String | archive to download, consisting of a git reference and archive +Long id = 789L; // Long | id of the key to get try { - apiInstance.repoGetArchive(owner, repo, archive); + DeployKey result = apiInstance.repoGetKey(owner, repo, id); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetArchive"); + System.err.println("Exception when calling RepositoryApi#repoGetKey"); e.printStackTrace(); } ``` @@ -2024,11 +3776,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **archive** | **String**| archive to download, consisting of a git reference and archive | + **id** | **Long**| id of the key to get | ### Return type -null (empty response body) +[**DeployKey**](DeployKey.md) ### Authorization @@ -2039,11 +3791,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetBranch** -> Branch repoGetBranch(owner, repo, branch) + +# **repoGetPullRequest** +> PullRequest repoGetPullRequest(owner, repo, index) -Retrieve a specific branch from a repository +Get a pull request ### Example ```java @@ -2094,12 +3846,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String branch = "branch_example"; // String | branch to get +Long index = 789L; // Long | index of the pull request to get try { - Branch result = apiInstance.repoGetBranch(owner, repo, branch); + PullRequest result = apiInstance.repoGetPullRequest(owner, repo, index); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetBranch"); + System.err.println("Exception when calling RepositoryApi#repoGetPullRequest"); e.printStackTrace(); } ``` @@ -2110,11 +3862,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **branch** | **String**| branch to get | + **index** | **Long**| index of the pull request to get | ### Return type -[**Branch**](Branch.md) +[**PullRequest**](PullRequest.md) ### Authorization @@ -2125,11 +3877,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetByID** -> Repository repoGetByID(id) + +# **repoGetRawFile** +> repoGetRawFile(owner, repo, filepath) -Get a repository by id +Get a file from a repository ### Example ```java @@ -2178,12 +3930,13 @@ Token.setApiKey("YOUR API KEY"); //Token.setApiKeyPrefix("Token"); RepositoryApi apiInstance = new RepositoryApi(); -Long id = 789L; // Long | id of the repo to get +String owner = "owner_example"; // String | owner of the repo +String repo = "repo_example"; // String | name of the repo +String filepath = "filepath_example"; // String | filepath of the file to get try { - Repository result = apiInstance.repoGetByID(id); - System.out.println(result); + apiInstance.repoGetRawFile(owner, repo, filepath); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetByID"); + System.err.println("Exception when calling RepositoryApi#repoGetRawFile"); e.printStackTrace(); } ``` @@ -2192,11 +3945,13 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **id** | **Long**| id of the repo to get | + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **filepath** | **String**| filepath of the file to get | ### Return type -[**Repository**](Repository.md) +null (empty response body) ### Authorization @@ -2207,11 +3962,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetCombinedStatusByRef** -> Status repoGetCombinedStatusByRef(owner, repo, ref) + +# **repoGetRelease** +> Release repoGetRelease(owner, repo, id) -Get a commit's combined status, by branch/tag/commit reference +Get a release ### Example ```java @@ -2262,12 +4017,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String ref = "ref_example"; // String | name of branch/tag/commit +Long id = 789L; // Long | id of the release to get try { - Status result = apiInstance.repoGetCombinedStatusByRef(owner, repo, ref); + Release result = apiInstance.repoGetRelease(owner, repo, id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetCombinedStatusByRef"); + System.err.println("Exception when calling RepositoryApi#repoGetRelease"); e.printStackTrace(); } ``` @@ -2278,11 +4033,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **ref** | **String**| name of branch/tag/commit | + **id** | **Long**| id of the release to get | ### Return type -[**Status**](Status.md) +[**Release**](Release.md) ### Authorization @@ -2293,11 +4048,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetEditorConfig** -> repoGetEditorConfig(owner, repo, filepath) + +# **repoGetReleaseAttachment** +> Attachment repoGetReleaseAttachment(owner, repo, id, attachmentId) -Get the EditorConfig definitions of a file in a repository +Get a release attachment ### Example ```java @@ -2348,11 +4103,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String filepath = "filepath_example"; // String | filepath of file to get +Long id = 789L; // Long | id of the release +Long attachmentId = 789L; // Long | id of the attachment to get try { - apiInstance.repoGetEditorConfig(owner, repo, filepath); + Attachment result = apiInstance.repoGetReleaseAttachment(owner, repo, id, attachmentId); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetEditorConfig"); + System.err.println("Exception when calling RepositoryApi#repoGetReleaseAttachment"); e.printStackTrace(); } ``` @@ -2363,11 +4120,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **filepath** | **String**| filepath of file to get | + **id** | **Long**| id of the release | + **attachmentId** | **Long**| id of the attachment to get | ### Return type -null (empty response body) +[**Attachment**](Attachment.md) ### Authorization @@ -2378,11 +4136,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetHook** -> List<Branch> repoGetHook(owner, repo, id) + +# **repoGetSingleCommit** +> Commit repoGetSingleCommit(owner, repo, sha) -Get a hook +Get a single commit from a repository ### Example ```java @@ -2433,12 +4191,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 hook to get +String sha = "sha_example"; // String | the commit hash try { - List result = apiInstance.repoGetHook(owner, repo, id); + Commit result = apiInstance.repoGetSingleCommit(owner, repo, sha); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetHook"); + System.err.println("Exception when calling RepositoryApi#repoGetSingleCommit"); e.printStackTrace(); } ``` @@ -2449,11 +4207,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the hook to get | + **sha** | **String**| the commit hash | ### Return type -[**List<Branch>**](Branch.md) +[**Commit**](Commit.md) ### Authorization @@ -2464,11 +4222,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetKey** -> DeployKey repoGetKey(owner, repo, id) + +# **repoListAllGitRefs** +> List<Reference> repoListAllGitRefs(owner, repo) -Get a repository's key by id +Get specified ref or filtered repository's refs ### Example ```java @@ -2519,12 +4277,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 key to get try { - DeployKey result = apiInstance.repoGetKey(owner, repo, id); + List result = apiInstance.repoListAllGitRefs(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetKey"); + System.err.println("Exception when calling RepositoryApi#repoListAllGitRefs"); e.printStackTrace(); } ``` @@ -2535,11 +4292,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the key to get | ### Return type -[**DeployKey**](DeployKey.md) +[**List<Reference>**](Reference.md) ### Authorization @@ -2550,11 +4306,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetPullRequest** -> PullRequest repoGetPullRequest(owner, repo, index) + +# **repoListBranches** +> List<Branch> repoListBranches(owner, repo) -Get a pull request +List a repository's branches ### Example ```java @@ -2605,12 +4361,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 pull request to get try { - PullRequest result = apiInstance.repoGetPullRequest(owner, repo, index); + List result = apiInstance.repoListBranches(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetPullRequest"); + System.err.println("Exception when calling RepositoryApi#repoListBranches"); e.printStackTrace(); } ``` @@ -2621,11 +4376,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **index** | **Long**| index of the pull request to get | ### Return type -[**PullRequest**](PullRequest.md) +[**List<Branch>**](Branch.md) ### Authorization @@ -2636,11 +4390,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetRawFile** -> repoGetRawFile(owner, repo, filepath) + +# **repoListCollaborators** +> List<User> repoListCollaborators(owner, repo) -Get a file from a repository +List a repository's collaborators ### Example ```java @@ -2691,11 +4445,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -String filepath = "filepath_example"; // String | filepath of the file to get try { - apiInstance.repoGetRawFile(owner, repo, filepath); + List result = apiInstance.repoListCollaborators(owner, repo); + System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetRawFile"); + System.err.println("Exception when calling RepositoryApi#repoListCollaborators"); e.printStackTrace(); } ``` @@ -2706,11 +4460,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **filepath** | **String**| filepath of the file to get | ### Return type -null (empty response body) +[**List<User>**](User.md) ### Authorization @@ -2721,11 +4474,11 @@ null (empty response body) - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetRelease** -> Release repoGetRelease(owner, repo, id) + +# **repoListGitHooks** +> List<GitHook> repoListGitHooks(owner, repo) -Get a release +List the Git hooks in a repository ### Example ```java @@ -2776,12 +4529,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release to get try { - Release result = apiInstance.repoGetRelease(owner, repo, id); + List result = apiInstance.repoListGitHooks(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetRelease"); + System.err.println("Exception when calling RepositoryApi#repoListGitHooks"); e.printStackTrace(); } ``` @@ -2792,11 +4544,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release to get | ### Return type -[**Release**](Release.md) +[**List<GitHook>**](GitHook.md) ### Authorization @@ -2807,11 +4558,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoGetReleaseAttachment** -> Attachment repoGetReleaseAttachment(owner, repo, id, attachmentId) + +# **repoListGitRefs** +> List<Reference> repoListGitRefs(owner, repo, ref) -Get a release attachment +Get specified ref or filtered repository's refs ### Example ```java @@ -2862,13 +4613,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release -Long attachmentId = 789L; // Long | id of the attachment to get +String ref = "ref_example"; // String | part or full name of the ref try { - Attachment result = apiInstance.repoGetReleaseAttachment(owner, repo, id, attachmentId); + List result = apiInstance.repoListGitRefs(owner, repo, ref); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoGetReleaseAttachment"); + System.err.println("Exception when calling RepositoryApi#repoListGitRefs"); e.printStackTrace(); } ``` @@ -2879,12 +4629,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release | - **attachmentId** | **Long**| id of the attachment to get | + **ref** | **String**| part or full name of the ref | ### Return type -[**Attachment**](Attachment.md) +[**List<Reference>**](Reference.md) ### Authorization @@ -2895,11 +4644,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListBranches** -> List<Branch> repoListBranches(owner, repo) + +# **repoListHooks** +> List<Hook> repoListHooks(owner, repo) -List a repository's branches +List the hooks in a repository ### Example ```java @@ -2951,10 +4700,10 @@ 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.repoListBranches(owner, repo); + List result = apiInstance.repoListHooks(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListBranches"); + System.err.println("Exception when calling RepositoryApi#repoListHooks"); e.printStackTrace(); } ``` @@ -2968,7 +4717,7 @@ Name | Type | Description | Notes ### Return type -[**List<Branch>**](Branch.md) +[**List<Hook>**](Hook.md) ### Authorization @@ -2979,11 +4728,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListCollaborators** -> List<User> repoListCollaborators(owner, repo) + +# **repoListKeys** +> List<DeployKey> repoListKeys(owner, repo, keyId, fingerprint) -List a repository's collaborators +List a repository's keys ### Example ```java @@ -3034,11 +4783,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo +Integer keyId = 56; // Integer | the key_id to search for +String fingerprint = "fingerprint_example"; // String | fingerprint of the key try { - List result = apiInstance.repoListCollaborators(owner, repo); + List result = apiInstance.repoListKeys(owner, repo, keyId, fingerprint); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListCollaborators"); + System.err.println("Exception when calling RepositoryApi#repoListKeys"); e.printStackTrace(); } ``` @@ -3049,10 +4800,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | + **keyId** | **Integer**| the key_id to search for | [optional] + **fingerprint** | **String**| fingerprint of the key | [optional] ### Return type -[**List<User>**](User.md) +[**List<DeployKey>**](DeployKey.md) ### Authorization @@ -3063,11 +4816,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListHooks** -> List<Branch> repoListHooks(owner, repo) + +# **repoListPullRequests** +> List<PullRequest> repoListPullRequests(owner, repo, page, state, sort, milestone, labels) -List the hooks in a repository +List a repo's pull requests ### Example ```java @@ -3118,11 +4871,16 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo +Integer page = 56; // Integer | Page number +String state = "state_example"; // String | State of pull request: open or closed (optional) +String sort = "sort_example"; // String | Type of sort +Long milestone = 789L; // Long | ID of the milestone +List labels = Arrays.asList(56L); // List | Label IDs try { - List result = apiInstance.repoListHooks(owner, repo); + List result = apiInstance.repoListPullRequests(owner, repo, page, state, sort, milestone, labels); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListHooks"); + System.err.println("Exception when calling RepositoryApi#repoListPullRequests"); e.printStackTrace(); } ``` @@ -3133,10 +4891,15 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | + **page** | **Integer**| Page number | [optional] + **state** | **String**| State of pull request: open or closed (optional) | [optional] [enum: closed, open, all] + **sort** | **String**| Type of sort | [optional] [enum: oldest, recentupdate, leastupdate, mostcomment, leastcomment, priority] + **milestone** | **Long**| ID of the milestone | [optional] + **labels** | [**List<Long>**](Long.md)| Label IDs | [optional] ### Return type -[**List<Branch>**](Branch.md) +[**List<PullRequest>**](PullRequest.md) ### Authorization @@ -3147,11 +4910,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListKeys** -> List<DeployKey> repoListKeys(owner, repo, keyId, fingerprint) + +# **repoListReleaseAttachments** +> List<Attachment> repoListReleaseAttachments(owner, repo, id) -List a repository's keys +List release's attachments ### Example ```java @@ -3202,13 +4965,12 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -Integer keyId = 56; // Integer | the key_id to search for -String fingerprint = "fingerprint_example"; // String | fingerprint of the key +Long id = 789L; // Long | id of the release try { - List result = apiInstance.repoListKeys(owner, repo, keyId, fingerprint); + List result = apiInstance.repoListReleaseAttachments(owner, repo, id); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListKeys"); + System.err.println("Exception when calling RepositoryApi#repoListReleaseAttachments"); e.printStackTrace(); } ``` @@ -3219,12 +4981,11 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **keyId** | **Integer**| the key_id to search for | [optional] - **fingerprint** | **String**| fingerprint of the key | [optional] + **id** | **Long**| id of the release | ### Return type -[**List<DeployKey>**](DeployKey.md) +[**List<Attachment>**](Attachment.md) ### Authorization @@ -3235,11 +4996,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListPullRequests** -> List<PullRequest> repoListPullRequests(owner, repo, page, state, sort, milestone, labels) + +# **repoListReleases** +> List<Release> repoListReleases(owner, repo, page, perPage) -List a repo's pull requests +List a repo's releases ### Example ```java @@ -3290,16 +5051,13 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String owner = "owner_example"; // String | owner of the repo String repo = "repo_example"; // String | name of the repo -Integer page = 56; // Integer | Page number -String state = "state_example"; // String | State of pull request: open or closed (optional) -String sort = "sort_example"; // String | Type of sort -Long milestone = 789L; // Long | ID of the milestone -List labels = Arrays.asList(56L); // List | Label IDs +Integer page = 56; // Integer | page wants to load +Integer perPage = 56; // Integer | items count every page wants to load try { - List result = apiInstance.repoListPullRequests(owner, repo, page, state, sort, milestone, labels); + List result = apiInstance.repoListReleases(owner, repo, page, perPage); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListPullRequests"); + System.err.println("Exception when calling RepositoryApi#repoListReleases"); e.printStackTrace(); } ``` @@ -3310,15 +5068,12 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **page** | **Integer**| Page number | [optional] - **state** | **String**| State of pull request: open or closed (optional) | [optional] [enum: closed, open, all] - **sort** | **String**| Type of sort | [optional] [enum: oldest, recentupdate, leastupdate, mostcomment, leastcomment, priority] - **milestone** | **Long**| ID of the milestone | [optional] - **labels** | [**List<Long>**](Long.md)| Label IDs | [optional] + **page** | **Integer**| page wants to load | [optional] + **perPage** | **Integer**| items count every page wants to load | [optional] ### Return type -[**List<PullRequest>**](PullRequest.md) +[**List<Release>**](Release.md) ### Authorization @@ -3329,11 +5084,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListReleaseAttachments** -> List<Attachment> repoListReleaseAttachments(owner, repo, id) + +# **repoListStargazers** +> List<User> repoListStargazers(owner, repo) -List release's attachments +List a repo's stargazers ### Example ```java @@ -3384,12 +5139,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); 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 release try { - List result = apiInstance.repoListReleaseAttachments(owner, repo, id); + List result = apiInstance.repoListStargazers(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListReleaseAttachments"); + System.err.println("Exception when calling RepositoryApi#repoListStargazers"); e.printStackTrace(); } ``` @@ -3400,11 +5154,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **id** | **Long**| id of the release | ### Return type -[**List<Attachment>**](Attachment.md) +[**List<User>**](User.md) ### Authorization @@ -3415,11 +5168,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListReleases** -> List<Release> repoListReleases(owner, repo) + +# **repoListStatuses** +> List<Status> repoListStatuses(owner, repo, sha, page, sort, state) -List a repo's releases +Get a commit's statuses ### Example ```java @@ -3470,11 +5223,15 @@ Token.setApiKey("YOUR API KEY"); 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 | sha of the commit +Integer page = 56; // Integer | page number of results +String sort = "sort_example"; // String | type of sort +String state = "state_example"; // String | type of state try { - List result = apiInstance.repoListReleases(owner, repo); + List result = apiInstance.repoListStatuses(owner, repo, sha, page, sort, state); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListReleases"); + System.err.println("Exception when calling RepositoryApi#repoListStatuses"); e.printStackTrace(); } ``` @@ -3485,10 +5242,14 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | + **sha** | **String**| sha of the commit | + **page** | **Integer**| page number of results | [optional] + **sort** | **String**| type of sort | [optional] [enum: oldest, recentupdate, leastupdate, leastindex, highestindex] + **state** | **String**| type of state | [optional] [enum: pending, success, error, failure, warning] ### Return type -[**List<Release>**](Release.md) +[**List<Status>**](Status.md) ### Authorization @@ -3499,11 +5260,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListStargazers** -> List<User> repoListStargazers(owner, repo) + +# **repoListSubscribers** +> List<User> repoListSubscribers(owner, repo) -List a repo's stargazers +List a repo's watchers ### Example ```java @@ -3555,10 +5316,10 @@ 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.repoListStargazers(owner, repo); + List result = apiInstance.repoListSubscribers(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListStargazers"); + System.err.println("Exception when calling RepositoryApi#repoListSubscribers"); e.printStackTrace(); } ``` @@ -3583,11 +5344,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListStatuses** -> List<Status> repoListStatuses(owner, repo, sha) + +# **repoListTags** +> List<Tag> repoListTags(owner, repo) -Get a commit's statuses +List a repository's tags ### Example ```java @@ -3638,12 +5399,11 @@ Token.setApiKey("YOUR API KEY"); 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 | sha of the commit try { - List result = apiInstance.repoListStatuses(owner, repo, sha); + List result = apiInstance.repoListTags(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListStatuses"); + System.err.println("Exception when calling RepositoryApi#repoListTags"); e.printStackTrace(); } ``` @@ -3654,11 +5414,10 @@ Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | - **sha** | **String**| sha of the commit | ### Return type -[**List<Status>**](Status.md) +[**List<Tag>**](Tag.md) ### Authorization @@ -3669,11 +5428,11 @@ Name | Type | Description | Notes - **Content-Type**: application/json, text/plain - **Accept**: application/json - -# **repoListSubscribers** -> List<User> repoListSubscribers(owner, repo) + +# **repoListTopics** +> TopicName repoListTopics(owner, repo) -List a repo's watchers +Get list of topics that a repository has ### Example ```java @@ -3725,10 +5484,10 @@ 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.repoListSubscribers(owner, repo); + TopicName result = apiInstance.repoListTopics(owner, repo); System.out.println(result); } catch (ApiException e) { - System.err.println("Exception when calling RepositoryApi#repoListSubscribers"); + System.err.println("Exception when calling RepositoryApi#repoListTopics"); e.printStackTrace(); } ``` @@ -3742,7 +5501,7 @@ Name | Type | Description | Notes ### Return type -[**List<User>**](User.md) +[**TopicName**](TopicName.md) ### Authorization @@ -3755,7 +5514,7 @@ Name | Type | Description | Notes # **repoMergePullRequest** -> repoMergePullRequest(owner, repo, index) +> repoMergePullRequest(owner, repo, index, body) Merge a pull request @@ -3809,8 +5568,9 @@ RepositoryApi apiInstance = new RepositoryApi(); 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 pull request to merge +MergePullRequestOption body = new MergePullRequestOption(); // MergePullRequestOption | try { - apiInstance.repoMergePullRequest(owner, repo, index); + apiInstance.repoMergePullRequest(owner, repo, index, body); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#repoMergePullRequest"); e.printStackTrace(); @@ -3824,6 +5584,7 @@ Name | Type | Description | Notes **owner** | **String**| owner of the repo | **repo** | **String**| name of the repo | **index** | **Long**| index of the pull request to merge | + **body** | [**MergePullRequestOption**](MergePullRequestOption.md)| | [optional] ### Return type @@ -4090,7 +5851,7 @@ null (empty response body) # **repoSearch** -> SearchResults repoSearch(q, uid, page, limit, mode, exclusive, sort, order) +> SearchResults repoSearch(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order) Search for repositories @@ -4142,7 +5903,11 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String q = "q_example"; // String | keyword +Boolean topic = true; // Boolean | Limit search to repositories with keyword as topic +Boolean includeDesc = true; // Boolean | include search of keyword within repository description Long uid = 789L; // Long | search only for repos that the user with the given id owns or contributes to +Long starredBy = 789L; // Long | search only for repos that the user with the given id has starred +Boolean _private = true; // Boolean | include private repositories this user has access to (defaults to true) Integer page = 56; // Integer | page number of results to return (1-based) Integer limit = 56; // Integer | page size of results, maximum page size is 50 String mode = "mode_example"; // String | type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" @@ -4150,7 +5915,7 @@ Boolean exclusive = true; // Boolean | if `uid` is given, search only for repos String sort = "sort_example"; // String | sort repos by attribute. Supported values are \"alpha\", \"created\", \"updated\", \"size\", and \"id\". Default is \"alpha\" String order = "order_example"; // String | sort order, either \"asc\" (ascending) or \"desc\" (descending). Default is \"asc\", ignored if \"sort\" is not specified. try { - SearchResults result = apiInstance.repoSearch(q, uid, page, limit, mode, exclusive, sort, order); + SearchResults result = apiInstance.repoSearch(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#repoSearch"); @@ -4163,7 +5928,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **q** | **String**| keyword | [optional] + **topic** | **Boolean**| Limit search to repositories with keyword as topic | [optional] + **includeDesc** | **Boolean**| include search of keyword within repository description | [optional] **uid** | **Long**| search only for repos that the user with the given id owns or contributes to | [optional] + **starredBy** | **Long**| search only for repos that the user with the given id has starred | [optional] + **_private** | **Boolean**| include private repositories this user has access to (defaults to true) | [optional] **page** | **Integer**| page number of results to return (1-based) | [optional] **limit** | **Integer**| page size of results, maximum page size is 50 | [optional] **mode** | **String**| type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" | [optional] @@ -4348,6 +6117,179 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **repoUpdateFile** +> FileResponse repoUpdateFile(owner, repo, filepath, body) + +Update a file 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: 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 +String filepath = "filepath_example"; // String | path of the file to update +UpdateFileOptions body = new UpdateFileOptions(); // UpdateFileOptions | +try { + FileResponse result = apiInstance.repoUpdateFile(owner, repo, filepath, body); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoUpdateFile"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **filepath** | **String**| path of the file to update | + **body** | [**UpdateFileOptions**](UpdateFileOptions.md)| | + +### Return type + +[**FileResponse**](FileResponse.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + + +# **repoUpdateTopics** +> repoUpdateTopics(owner, repo, body) + +Replace list of topics for 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: 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 +RepoTopicOptions body = new RepoTopicOptions(); // RepoTopicOptions | +try { + apiInstance.repoUpdateTopics(owner, repo, body); +} catch (ApiException e) { + System.err.println("Exception when calling RepositoryApi#repoUpdateTopics"); + e.printStackTrace(); +} +``` + +### Parameters + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **owner** | **String**| owner of the repo | + **repo** | **String**| name of the repo | + **body** | [**RepoTopicOptions**](RepoTopicOptions.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), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -4355,7 +6297,7 @@ Name | Type | Description | Notes # **topicSearch** -> Repository topicSearch(q) +> List<TopicResponse> topicSearch(q) search topics via keyword @@ -4408,7 +6350,7 @@ Token.setApiKey("YOUR API KEY"); RepositoryApi apiInstance = new RepositoryApi(); String q = "q_example"; // String | keywords to search try { - Repository result = apiInstance.topicSearch(q); + List result = apiInstance.topicSearch(q); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling RepositoryApi#topicSearch"); @@ -4424,7 +6366,7 @@ Name | Type | Description | Notes ### Return type -[**Repository**](Repository.md) +[**List<TopicResponse>**](TopicResponse.md) ### Authorization diff --git a/docs/Tag.md b/docs/Tag.md new file mode 100644 index 0000000..042f405 --- /dev/null +++ b/docs/Tag.md @@ -0,0 +1,14 @@ + +# Tag + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**commit** | [**CommitMeta**](CommitMeta.md) | | [optional] +**id** | **String** | | [optional] +**name** | **String** | | [optional] +**tarballUrl** | **String** | | [optional] +**zipballUrl** | **String** | | [optional] + + + diff --git a/docs/Team.md b/docs/Team.md index e18af22..1818408 100644 --- a/docs/Team.md +++ b/docs/Team.md @@ -7,7 +7,9 @@ Name | Type | Description | Notes **description** | **String** | | [optional] **id** | **Long** | | [optional] **name** | **String** | | [optional] +**organization** | [**Organization**](Organization.md) | | [optional] **permission** | [**PermissionEnum**](#PermissionEnum) | | [optional] +**units** | **List<String>** | | [optional] diff --git a/docs/TopicName.md b/docs/TopicName.md new file mode 100644 index 0000000..8a0b6cc --- /dev/null +++ b/docs/TopicName.md @@ -0,0 +1,10 @@ + +# TopicName + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**topics** | **List<String>** | | [optional] + + + diff --git a/docs/TopicResponse.md b/docs/TopicResponse.md new file mode 100644 index 0000000..dd50fb4 --- /dev/null +++ b/docs/TopicResponse.md @@ -0,0 +1,14 @@ + +# TopicResponse + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] +**id** | **Long** | | [optional] +**repoCount** | **Long** | | [optional] +**topicName** | **String** | | [optional] +**updated** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] + + + diff --git a/docs/UpdateFileOptions.md b/docs/UpdateFileOptions.md new file mode 100644 index 0000000..31da6a3 --- /dev/null +++ b/docs/UpdateFileOptions.md @@ -0,0 +1,17 @@ + +# UpdateFileOptions + +## 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] +**content** | **String** | content must be base64 encoded | +**fromPath** | **String** | from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL | [optional] +**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] +**sha** | **String** | sha is the SHA for the file that already exists | + + + diff --git a/docs/User.md b/docs/User.md index 0a7a550..0bcd977 100644 --- a/docs/User.md +++ b/docs/User.md @@ -5,10 +5,13 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **avatarUrl** | **String** | URL to the user's avatar | [optional] +**created** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **email** | **String** | | [optional] **fullName** | **String** | the user's full name | [optional] **id** | **Long** | the user's id | [optional] +**isAdmin** | **Boolean** | Is the user an administrator | [optional] **language** | **String** | User locale | [optional] +**lastLogin** | [**OffsetDateTime**](OffsetDateTime.md) | | [optional] **login** | **String** | the user's username | [optional] diff --git a/docs/UserApi.md b/docs/UserApi.md index 7e5d3ef..3f9ea80 100644 --- a/docs/UserApi.md +++ b/docs/UserApi.md @@ -42,6 +42,7 @@ Method | HTTP request | Description [**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 [**userTrackedTimes**](UserApi.md#userTrackedTimes) | **GET** /repos/{owner}/{repo}/times/{user} | List a user's tracked times in a repo @@ -295,7 +296,7 @@ null (empty response body) # **userCreateToken** -> AccessToken userCreateToken(username, accessTokenName) +> userCreateToken(username, accessToken) Create an access token @@ -347,10 +348,9 @@ Token.setApiKey("YOUR API KEY"); UserApi apiInstance = new UserApi(); String username = "username_example"; // String | username of user -AccessTokenName accessTokenName = new AccessTokenName(); // AccessTokenName | +AccessToken accessToken = new AccessToken(); // AccessToken | try { - AccessToken result = apiInstance.userCreateToken(username, accessTokenName); - System.out.println(result); + apiInstance.userCreateToken(username, accessToken); } catch (ApiException e) { System.err.println("Exception when calling UserApi#userCreateToken"); e.printStackTrace(); @@ -362,11 +362,11 @@ try { Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **username** | **String**| username of user | - **accessTokenName** | [**AccessTokenName**](AccessTokenName.md)| | [optional] + **accessToken** | [**AccessToken**](AccessToken.md)| | [optional] ### Return type -[**AccessToken**](AccessToken.md) +null (empty response body) ### Authorization @@ -3124,6 +3124,84 @@ Name | Type | Description | Notes [AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) +### HTTP request headers + + - **Content-Type**: application/json, text/plain + - **Accept**: application/json + + +# **userListTeams** +> List<Team> userListTeams() + +List all the teams a user belongs to + +### 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: 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 { + List result = apiInstance.userListTeams(); + System.out.println(result); +} catch (ApiException e) { + System.err.println("Exception when calling UserApi#userListTeams"); + e.printStackTrace(); +} +``` + +### Parameters +This endpoint does not need any parameter. + +### Return type + +[**List<Team>**](Team.md) + +### Authorization + +[AccessToken](../README.md#AccessToken), [AuthorizationHeaderToken](../README.md#AuthorizationHeaderToken), [BasicAuth](../README.md#BasicAuth), [SudoHeader](../README.md#SudoHeader), [SudoParam](../README.md#SudoParam), [Token](../README.md#Token) + ### HTTP request headers - **Content-Type**: application/json, text/plain @@ -3131,7 +3209,7 @@ Name | Type | Description | Notes # **userSearch** -> UserSearchList userSearch(q, uid, limit) +> InlineResponse2001 userSearch(q, uid, limit) Search for users @@ -3186,7 +3264,7 @@ String q = "q_example"; // String | keyword Long uid = 789L; // Long | ID of the user to search for Integer limit = 56; // Integer | maximum number of users to return try { - UserSearchList result = apiInstance.userSearch(q, uid, limit); + InlineResponse2001 result = apiInstance.userSearch(q, uid, limit); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling UserApi#userSearch"); @@ -3204,7 +3282,7 @@ Name | Type | Description | Notes ### Return type -[**UserSearchList**](UserSearchList.md) +[**InlineResponse2001**](InlineResponse2001.md) ### Authorization diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 2c6137b..5c2d1cf 100644 Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index b7a3647..ca9d628 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,5 @@ -#Tue May 17 23:08:05 CST 2016 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.6-bin.zip diff --git a/gradlew b/gradlew index 9d82f78..83f2acf 100755 --- a/gradlew +++ b/gradlew @@ -1,4 +1,20 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## ## @@ -6,20 +22,38 @@ ## ############################################################################## -# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null APP_NAME="Gradle" APP_BASE_NAME=`basename "$0"` +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + # Use the maximum available, or set MAX_FD != -1 to use that value. MAX_FD="maximum" -warn ( ) { +warn () { echo "$*" } -die ( ) { +die () { echo echo "$*" echo @@ -30,6 +64,7 @@ die ( ) { cygwin=false msys=false darwin=false +nonstop=false case "`uname`" in CYGWIN* ) cygwin=true @@ -40,26 +75,11 @@ case "`uname`" in MINGW* ) msys=true ;; + NONSTOP* ) + nonstop=true + ;; esac -# Attempt to set APP_HOME -# Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi -done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null - CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar # Determine the Java command to use to start the JVM. @@ -85,7 +105,7 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then MAX_FD_LIMIT=`ulimit -H -n` if [ $? -eq 0 ] ; then if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then @@ -105,8 +125,8 @@ if $darwin; then GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" fi -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` JAVACMD=`cygpath --unix "$JAVACMD"` @@ -150,11 +170,19 @@ if $cygwin ; then esac fi -# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules -function splitJvmOpts() { - JVM_OPTS=("$@") +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " } -eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS -JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong +if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then + cd "$(dirname "$0")" +fi -exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" +exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index 5f19212..24467a1 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,90 +1,100 @@ -@if "%DEBUG%" == "" @echo off -@rem ########################################################################## -@rem -@rem Gradle startup script for Windows -@rem -@rem ########################################################################## - -@rem Set local scope for the variables with windows NT shell -if "%OS%"=="Windows_NT" setlocal - -@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= - -set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. -set APP_BASE_NAME=%~n0 -set APP_HOME=%DIRNAME% - -@rem Find java.exe -if defined JAVA_HOME goto findJavaFromJavaHome - -set JAVA_EXE=java.exe -%JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init - -echo. -echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:findJavaFromJavaHome -set JAVA_HOME=%JAVA_HOME:"=% -set JAVA_EXE=%JAVA_HOME%/bin/java.exe - -if exist "%JAVA_EXE%" goto init - -echo. -echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% -echo. -echo Please set the JAVA_HOME variable in your environment to match the -echo location of your Java installation. - -goto fail - -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args -if "%@eval[2+2]" == "4" goto 4NT_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* -goto execute - -:4NT_args -@rem Get arguments from the 4NT Shell from JP Software -set CMD_LINE_ARGS=%$ - -:execute -@rem Setup the command line - -set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar - -@rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% - -:end -@rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd - -:fail -rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of -rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 - -:mainEnd -if "%OS%"=="Windows_NT" endlocal - -:omega +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml index 2fe0c03..8813bf7 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,25 @@ + + io.swagger + swagger-codegen-maven-plugin + 2.4.8 + + + + generate + + + + + ${project.basedir} + ${project.basedir}/swagger.v1.json + java + io.gitea.api + io.gitea.model + + org.apache.maven.plugins maven-enforcer-plugin @@ -307,7 +326,7 @@ - 1.7 + 1.8 ${java.version} ${java.version} 1.8.0 diff --git a/src/main/java/io/gitea/ApiException.java b/src/main/java/io/gitea/ApiException.java index 449500e..2c8fec4 100644 --- a/src/main/java/io/gitea/ApiException.java +++ b/src/main/java/io/gitea/ApiException.java @@ -16,7 +16,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class ApiException extends Exception { private int code = 0; private Map> responseHeaders = null; diff --git a/src/main/java/io/gitea/Configuration.java b/src/main/java/io/gitea/Configuration.java index 4db8cf0..40a2288 100644 --- a/src/main/java/io/gitea/Configuration.java +++ b/src/main/java/io/gitea/Configuration.java @@ -13,7 +13,7 @@ package io.gitea; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Configuration { private static ApiClient defaultApiClient = new ApiClient(); diff --git a/src/main/java/io/gitea/JSON.java b/src/main/java/io/gitea/JSON.java index 51fbd4d..c8bcdf3 100644 --- a/src/main/java/io/gitea/JSON.java +++ b/src/main/java/io/gitea/JSON.java @@ -28,6 +28,7 @@ import org.threeten.bp.format.DateTimeFormatter; import io.gitea.model.*; +import okio.ByteString; import java.io.IOException; import java.io.StringReader; @@ -46,11 +47,13 @@ public class JSON { private SqlDateTypeAdapter sqlDateTypeAdapter = new SqlDateTypeAdapter(); private OffsetDateTimeTypeAdapter offsetDateTimeTypeAdapter = new OffsetDateTimeTypeAdapter(); private LocalDateTypeAdapter localDateTypeAdapter = new LocalDateTypeAdapter(); + private ByteArrayAdapter byteArrayAdapter = new ByteArrayAdapter(); public static GsonBuilder createGson() { GsonFireBuilder fireBuilder = new GsonFireBuilder() ; - return fireBuilder.createGsonBuilder(); + GsonBuilder builder = fireBuilder.createGsonBuilder(); + return builder; } private static String getDiscriminatorValue(JsonElement readElement, String discriminatorField) { @@ -75,6 +78,7 @@ public JSON() { .registerTypeAdapter(java.sql.Date.class, sqlDateTypeAdapter) .registerTypeAdapter(OffsetDateTime.class, offsetDateTimeTypeAdapter) .registerTypeAdapter(LocalDate.class, localDateTypeAdapter) + .registerTypeAdapter(byte[].class, byteArrayAdapter) .create(); } @@ -141,6 +145,34 @@ public T deserialize(String body, Type returnType) { } } + /** + * Gson TypeAdapter for Byte Array type + */ + public class ByteArrayAdapter extends TypeAdapter { + + @Override + public void write(JsonWriter out, byte[] value) throws IOException { + if (value == null) { + out.nullValue(); + } else { + out.value(ByteString.of(value).base64()); + } + } + + @Override + public byte[] read(JsonReader in) throws IOException { + switch (in.peek()) { + case NULL: + in.nextNull(); + return null; + default: + String bytesAsBase64 = in.nextString(); + ByteString byteString = ByteString.decodeBase64(bytesAsBase64); + return byteString.toByteArray(); + } + } + } + /** * Gson TypeAdapter for JSR310 OffsetDateTime type */ diff --git a/src/main/java/io/gitea/Pair.java b/src/main/java/io/gitea/Pair.java index 02dfd8a..914659d 100644 --- a/src/main/java/io/gitea/Pair.java +++ b/src/main/java/io/gitea/Pair.java @@ -13,7 +13,7 @@ package io.gitea; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Pair { private String name = ""; private String value = ""; diff --git a/src/main/java/io/gitea/StringUtil.java b/src/main/java/io/gitea/StringUtil.java index 8ae7e3c..1556ff2 100644 --- a/src/main/java/io/gitea/StringUtil.java +++ b/src/main/java/io/gitea/StringUtil.java @@ -13,7 +13,7 @@ package io.gitea; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class StringUtil { /** * Check if the given array contains the given value (with case-insensitive comparison). diff --git a/src/main/java/io/gitea/api/AdminApi.java b/src/main/java/io/gitea/api/AdminApi.java index 35b2500..8c91225 100644 --- a/src/main/java/io/gitea/api/AdminApi.java +++ b/src/main/java/io/gitea/api/AdminApi.java @@ -945,4 +945,242 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for adminGetAllOrgs + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results, maximum page size is 50 (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 adminGetAllOrgsCall(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/orgs"; + + 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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminGetAllOrgsValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = adminGetAllOrgsCall(page, limit, progressListener, progressRequestListener); + return call; + + } + + /** + * List all organizations + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results, maximum page size is 50 (optional) + * @return List<Organization> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List adminGetAllOrgs(Integer page, Integer limit) throws ApiException { + ApiResponse> resp = adminGetAllOrgsWithHttpInfo(page, limit); + return resp.getData(); + } + + /** + * List all organizations + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results, maximum page size is 50 (optional) + * @return ApiResponse<List<Organization>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> adminGetAllOrgsWithHttpInfo(Integer page, Integer limit) throws ApiException { + com.squareup.okhttp.Call call = adminGetAllOrgsValidateBeforeCall(page, limit, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List all organizations (asynchronously) + * + * @param page page number of results to return (1-based) (optional) + * @param limit page size of results, maximum page size is 50 (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 adminGetAllOrgsAsync(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 = adminGetAllOrgsValidateBeforeCall(page, limit, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for adminGetAllUsers + * @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 adminGetAllUsersCall(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(); + + 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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call adminGetAllUsersValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = adminGetAllUsersCall(progressListener, progressRequestListener); + return call; + + } + + /** + * List all users + * + * @return List<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List adminGetAllUsers() throws ApiException { + ApiResponse> resp = adminGetAllUsersWithHttpInfo(); + return resp.getData(); + } + + /** + * List all users + * + * @return ApiResponse<List<User>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> adminGetAllUsersWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List all users (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 adminGetAllUsersAsync(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 = adminGetAllUsersValidateBeforeCall(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 ecb36df..055cfe5 100644 --- a/src/main/java/io/gitea/api/IssueApi.java +++ b/src/main/java/io/gitea/api/IssueApi.java @@ -723,7 +723,7 @@ private com.squareup.okhttp.Call issueCreateIssueValidateBeforeCall(String owner } /** - * Create an issue + * Create an issue. If using deadline only the date will be taken into account, and time of day ignored. * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -737,7 +737,7 @@ public Issue issueCreateIssue(String owner, String repo, CreateIssueOption body) } /** - * Create an issue + * Create an issue. If using deadline only the date will be taken into account, and time of day ignored. * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -752,7 +752,7 @@ public ApiResponse issueCreateIssueWithHttpInfo(String owner, String repo } /** - * Create an issue (asynchronously) + * Create an issue. If using deadline only the date will be taken into account, and time of day ignored. (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -2029,7 +2029,7 @@ private com.squareup.okhttp.Call issueEditIssueValidateBeforeCall(String owner, } /** - * Edit an issue + * Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -2044,7 +2044,7 @@ public Issue issueEditIssue(String owner, String repo, Long index, EditIssueOpti } /** - * Edit an issue + * Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -2060,7 +2060,7 @@ public ApiResponse issueEditIssueWithHttpInfo(String owner, String repo, } /** - * Edit an issue (asynchronously) + * Edit an issue. If using deadline only the date will be taken into account, and time of day ignored. (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -2176,7 +2176,7 @@ private com.squareup.okhttp.Call issueEditIssueDeadlineValidateBeforeCall(String } /** - * Set an issue deadline. If set to null, the deadline is deleted. + * 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. * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -2191,7 +2191,7 @@ public IssueDeadline issueEditIssueDeadline(String owner, String repo, Long inde } /** - * Set an issue deadline. If set to null, the deadline is deleted. + * 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. * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -2207,7 +2207,7 @@ public ApiResponse issueEditIssueDeadlineWithHttpInfo(String owne } /** - * Set an issue deadline. If set to null, the deadline is deleted. (asynchronously) + * 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. (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -3262,12 +3262,13 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * Build call for issueGetMilestonesList * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (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 issueGetMilestonesListCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call issueGetMilestonesListCall(String owner, String repo, String state, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -3277,6 +3278,8 @@ public com.squareup.okhttp.Call issueGetMilestonesListCall(String owner, String List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (state != null) + localVarQueryParams.addAll(apiClient.parameterToPair("state", state)); Map localVarHeaderParams = new HashMap(); @@ -3311,7 +3314,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call issueGetMilestonesListValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call issueGetMilestonesListValidateBeforeCall(String owner, String repo, String state, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -3324,48 +3327,51 @@ private com.squareup.okhttp.Call issueGetMilestonesListValidateBeforeCall(String } - com.squareup.okhttp.Call call = issueGetMilestonesListCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = issueGetMilestonesListCall(owner, repo, state, progressListener, progressRequestListener); return call; } /** - * Get all of a repository's milestones + * Get all of a repository's opened milestones * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional) * @return List<Milestone> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List issueGetMilestonesList(String owner, String repo) throws ApiException { - ApiResponse> resp = issueGetMilestonesListWithHttpInfo(owner, repo); + public List issueGetMilestonesList(String owner, String repo, String state) throws ApiException { + ApiResponse> resp = issueGetMilestonesListWithHttpInfo(owner, repo, state); return resp.getData(); } /** - * Get all of a repository's milestones + * Get all of a repository's opened milestones * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (optional) * @return ApiResponse<List<Milestone>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> issueGetMilestonesListWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, null, null); + public ApiResponse> issueGetMilestonesListWithHttpInfo(String owner, String repo, String state) throws ApiException { + com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, state, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get all of a repository's milestones (asynchronously) + * Get all of a repository's opened milestones (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param state Milestone state, Recognised values are open, closed and all. Defaults to \"open\" (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 issueGetMilestonesListAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call issueGetMilestonesListAsync(String owner, String repo, String state, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3386,7 +3392,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = issueGetMilestonesListValidateBeforeCall(owner, repo, state, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -3535,6 +3541,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param state whether issue is open or closed (optional) + * @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) * @param page page number of requested issues (optional) * @param q search string (optional) * @param progressListener Progress listener @@ -3542,7 +3549,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call issueListIssuesCall(String owner, String repo, String state, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call issueListIssuesCall(String owner, String repo, String state, String labels, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -3554,6 +3561,8 @@ public com.squareup.okhttp.Call issueListIssuesCall(String owner, String repo, S List localVarCollectionQueryParams = new ArrayList(); if (state != null) localVarQueryParams.addAll(apiClient.parameterToPair("state", state)); + if (labels != null) + localVarQueryParams.addAll(apiClient.parameterToPair("labels", labels)); if (page != null) localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); if (q != null) @@ -3592,7 +3601,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call issueListIssuesValidateBeforeCall(String owner, String repo, String state, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call issueListIssuesValidateBeforeCall(String owner, String repo, String state, String labels, Integer page, String q, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -3605,7 +3614,7 @@ private com.squareup.okhttp.Call issueListIssuesValidateBeforeCall(String owner, } - com.squareup.okhttp.Call call = issueListIssuesCall(owner, repo, state, page, q, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = issueListIssuesCall(owner, repo, state, labels, page, q, progressListener, progressRequestListener); return call; } @@ -3616,13 +3625,14 @@ private com.squareup.okhttp.Call issueListIssuesValidateBeforeCall(String owner, * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param state whether issue is open or closed (optional) + * @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) * @param page page number of requested issues (optional) * @param q search string (optional) * @return List<Issue> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List issueListIssues(String owner, String repo, String state, Integer page, String q) throws ApiException { - ApiResponse> resp = issueListIssuesWithHttpInfo(owner, repo, state, page, q); + public List issueListIssues(String owner, String repo, String state, String labels, Integer page, String q) throws ApiException { + ApiResponse> resp = issueListIssuesWithHttpInfo(owner, repo, state, labels, page, q); return resp.getData(); } @@ -3632,13 +3642,14 @@ public List issueListIssues(String owner, String repo, String state, Inte * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param state whether issue is open or closed (optional) + * @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) * @param page page number of requested issues (optional) * @param q search string (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> issueListIssuesWithHttpInfo(String owner, String repo, String state, Integer page, String q) throws ApiException { - com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, page, q, null, null); + public ApiResponse> issueListIssuesWithHttpInfo(String owner, String repo, String state, String labels, Integer page, String q) throws ApiException { + com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, labels, page, q, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -3649,13 +3660,14 @@ public ApiResponse> issueListIssuesWithHttpInfo(String owner, String * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param state whether issue is open or closed (optional) + * @param labels comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded (optional) * @param page page number of requested issues (optional) * @param q search string (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 issueListIssuesAsync(String owner, String repo, String state, Integer page, String q, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call issueListIssuesAsync(String owner, String repo, String state, String labels, Integer page, String q, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3676,7 +3688,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, page, q, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = issueListIssuesValidateBeforeCall(owner, repo, state, labels, page, q, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -4110,6 +4122,284 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for issueStartStopWatch + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to create the stopwatch on (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 issueStartStopWatchCall(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}/stopwatch/start" + .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" + }; + 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", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueStartStopWatchValidateBeforeCall(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 issueStartStopWatch(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueStartStopWatch(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueStartStopWatch(Async)"); + } + + + com.squareup.okhttp.Call call = issueStartStopWatchCall(owner, repo, index, progressListener, progressRequestListener); + return call; + + } + + /** + * Start stopwatch on an issue. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to create the stopwatch on (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void issueStartStopWatch(String owner, String repo, Long index) throws ApiException { + issueStartStopWatchWithHttpInfo(owner, repo, index); + } + + /** + * Start stopwatch on an issue. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to create the stopwatch on (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueStartStopWatchWithHttpInfo(String owner, String repo, Long index) throws ApiException { + com.squareup.okhttp.Call call = issueStartStopWatchValidateBeforeCall(owner, repo, index, null, null); + return apiClient.execute(call); + } + + /** + * Start stopwatch on an issue. (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to create the stopwatch on (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 issueStartStopWatchAsync(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 = issueStartStopWatchValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for issueStopWatch + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to stop the stopwatch on (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 issueStopWatchCall(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}/stopwatch/stop" + .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" + }; + 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", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call issueStopWatchValidateBeforeCall(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 issueStopWatch(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling issueStopWatch(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling issueStopWatch(Async)"); + } + + + com.squareup.okhttp.Call call = issueStopWatchCall(owner, repo, index, progressListener, progressRequestListener); + return call; + + } + + /** + * Stop an issue's existing stopwatch. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to stop the stopwatch on (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void issueStopWatch(String owner, String repo, Long index) throws ApiException { + issueStopWatchWithHttpInfo(owner, repo, index); + } + + /** + * Stop an issue's existing stopwatch. + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to stop the stopwatch on (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse issueStopWatchWithHttpInfo(String owner, String repo, Long index) throws ApiException { + com.squareup.okhttp.Call call = issueStopWatchValidateBeforeCall(owner, repo, index, null, null); + return apiClient.execute(call); + } + + /** + * Stop an issue's existing stopwatch. (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the issue to stop the stopwatch on (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 issueStopWatchAsync(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 = issueStopWatchValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for issueTrackedTimes * @param owner owner of the repo (required) diff --git a/src/main/java/io/gitea/api/MiscellaneousApi.java b/src/main/java/io/gitea/api/MiscellaneousApi.java index 06a956d..144b90e 100644 --- a/src/main/java/io/gitea/api/MiscellaneousApi.java +++ b/src/main/java/io/gitea/api/MiscellaneousApi.java @@ -230,22 +230,25 @@ private com.squareup.okhttp.Call renderMarkdownValidateBeforeCall(MarkdownOption * Render a markdown 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 void renderMarkdown(MarkdownOption body) throws ApiException { - renderMarkdownWithHttpInfo(body); + public String renderMarkdown(MarkdownOption body) throws ApiException { + ApiResponse resp = renderMarkdownWithHttpInfo(body); + return resp.getData(); } /** * Render a markdown document as HTML * * @param body (optional) - * @return ApiResponse<Void> + * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse renderMarkdownWithHttpInfo(MarkdownOption body) throws ApiException { + public ApiResponse renderMarkdownWithHttpInfo(MarkdownOption body) throws ApiException { com.squareup.okhttp.Call call = renderMarkdownValidateBeforeCall(body, null, null); - return apiClient.execute(call); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** @@ -256,7 +259,7 @@ public ApiResponse renderMarkdownWithHttpInfo(MarkdownOption body) throws * @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 renderMarkdownAsync(MarkdownOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call renderMarkdownAsync(MarkdownOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -278,7 +281,8 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = renderMarkdownValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** @@ -348,22 +352,25 @@ private com.squareup.okhttp.Call renderMarkdownRawValidateBeforeCall(String body * Render raw markdown as HTML * * @param body Request body to render (required) + * @return String * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void renderMarkdownRaw(String body) throws ApiException { - renderMarkdownRawWithHttpInfo(body); + public String renderMarkdownRaw(String body) throws ApiException { + ApiResponse resp = renderMarkdownRawWithHttpInfo(body); + return resp.getData(); } /** * Render raw markdown as HTML * * @param body Request body to render (required) - * @return ApiResponse<Void> + * @return ApiResponse<String> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse renderMarkdownRawWithHttpInfo(String body) throws ApiException { + public ApiResponse renderMarkdownRawWithHttpInfo(String body) throws ApiException { com.squareup.okhttp.Call call = renderMarkdownRawValidateBeforeCall(body, null, null); - return apiClient.execute(call); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** @@ -374,7 +381,7 @@ public ApiResponse renderMarkdownRawWithHttpInfo(String body) throws ApiEx * @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 renderMarkdownRawAsync(String body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call renderMarkdownRawAsync(String body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -396,7 +403,8 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = renderMarkdownRawValidateBeforeCall(body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } } diff --git a/src/main/java/io/gitea/api/OrganizationApi.java b/src/main/java/io/gitea/api/OrganizationApi.java index 4dca277..2c8405f 100644 --- a/src/main/java/io/gitea/api/OrganizationApi.java +++ b/src/main/java/io/gitea/api/OrganizationApi.java @@ -27,13 +27,15 @@ import java.io.IOException; -import io.gitea.model.Branch; import io.gitea.model.CreateHookOption; +import io.gitea.model.CreateOrgOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.CreateTeamOption; import io.gitea.model.EditHookOption; import io.gitea.model.EditOrgOption; import io.gitea.model.EditTeamOption; +import io.gitea.model.Hook; +import io.gitea.model.InlineResponse200; import io.gitea.model.Organization; import io.gitea.model.Repository; import io.gitea.model.Team; @@ -588,6 +590,128 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, callback); return call; } + /** + * Build call for orgCreate + * @param 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 orgCreateCall(CreateOrgOption organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = organization; + + // create path and map variables + String localVarPath = "/orgs"; + + 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", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgCreateValidateBeforeCall(CreateOrgOption organization, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + // verify the required parameter 'organization' is set + if (organization == null) { + throw new ApiException("Missing the required parameter 'organization' when calling orgCreate(Async)"); + } + + + com.squareup.okhttp.Call call = orgCreateCall(organization, progressListener, progressRequestListener); + return call; + + } + + /** + * Create an organization + * + * @param organization (required) + * @return Organization + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Organization orgCreate(CreateOrgOption organization) throws ApiException { + ApiResponse resp = orgCreateWithHttpInfo(organization); + return resp.getData(); + } + + /** + * Create an organization + * + * @param organization (required) + * @return ApiResponse<Organization> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse orgCreateWithHttpInfo(CreateOrgOption organization) throws ApiException { + com.squareup.okhttp.Call call = orgCreateValidateBeforeCall(organization, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create an organization (asynchronously) + * + * @param 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 orgCreateAsync(CreateOrgOption organization, 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 = orgCreateValidateBeforeCall(organization, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for orgCreateHook * @param org name of the organization (required) @@ -663,11 +787,11 @@ private com.squareup.okhttp.Call orgCreateHookValidateBeforeCall(String org, Cre * * @param org name of the organization (required) * @param body (required) - * @return List<Branch> + * @return Hook * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List orgCreateHook(String org, CreateHookOption body) throws ApiException { - ApiResponse> resp = orgCreateHookWithHttpInfo(org, body); + public Hook orgCreateHook(String org, CreateHookOption body) throws ApiException { + ApiResponse resp = orgCreateHookWithHttpInfo(org, body); return resp.getData(); } @@ -676,12 +800,12 @@ public List orgCreateHook(String org, CreateHookOption body) throws ApiE * * @param org name of the organization (required) * @param body (required) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> orgCreateHookWithHttpInfo(String org, CreateHookOption body) throws ApiException { + public ApiResponse orgCreateHookWithHttpInfo(String org, CreateHookOption body) throws ApiException { com.squareup.okhttp.Call call = orgCreateHookValidateBeforeCall(org, body, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -694,7 +818,7 @@ public ApiResponse> orgCreateHookWithHttpInfo(String org, CreateHoo * @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 orgCreateHookAsync(String org, CreateHookOption body, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call orgCreateHookAsync(String org, CreateHookOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -716,7 +840,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = orgCreateHookValidateBeforeCall(org, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -847,6 +971,125 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for orgDelete + * @param org organization that is to be deleted (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 orgDeleteCall(String org, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/{org}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgDeleteValidateBeforeCall(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 orgDelete(Async)"); + } + + + com.squareup.okhttp.Call call = orgDeleteCall(org, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete an organization + * + * @param org organization that is to be deleted (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void orgDelete(String org) throws ApiException { + orgDeleteWithHttpInfo(org); + } + + /** + * Delete an organization + * + * @param org organization that is to be deleted (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse orgDeleteWithHttpInfo(String org) throws ApiException { + com.squareup.okhttp.Call call = orgDeleteValidateBeforeCall(org, null, null); + return apiClient.execute(call); + } + + /** + * Delete an organization (asynchronously) + * + * @param org organization that is to be deleted (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 orgDeleteAsync(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 = orgDeleteValidateBeforeCall(org, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for orgDeleteHook * @param org name of the organization (required) @@ -1227,7 +1470,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don /** * Build call for orgEdit * @param org name of the organization to edit (required) - * @param body (optional) + * @param body (required) * @param progressListener Progress listener * @param progressRequestListener Progress request listener * @return Call to execute @@ -1283,6 +1526,11 @@ private com.squareup.okhttp.Call orgEditValidateBeforeCall(String org, EditOrgOp throw new ApiException("Missing the required parameter 'org' when calling orgEdit(Async)"); } + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling orgEdit(Async)"); + } + com.squareup.okhttp.Call call = orgEditCall(org, body, progressListener, progressRequestListener); return call; @@ -1293,7 +1541,7 @@ private com.squareup.okhttp.Call orgEditValidateBeforeCall(String org, EditOrgOp * Edit an organization * * @param org name of the organization to edit (required) - * @param body (optional) + * @param body (required) * @return Organization * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ @@ -1306,7 +1554,7 @@ public Organization orgEdit(String org, EditOrgOption body) throws ApiException * Edit an organization * * @param org name of the organization to edit (required) - * @param body (optional) + * @param body (required) * @return ApiResponse<Organization> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ @@ -1320,7 +1568,7 @@ public ApiResponse orgEditWithHttpInfo(String org, EditOrgOption b * Edit an organization (asynchronously) * * @param org name of the organization to edit (required) - * @param body (optional) + * @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 @@ -1429,11 +1677,11 @@ private com.squareup.okhttp.Call orgEditHookValidateBeforeCall(String org, Long * @param org name of the organization (required) * @param id id of the hook to update (required) * @param body (optional) - * @return List<Branch> + * @return Hook * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List orgEditHook(String org, Long id, EditHookOption body) throws ApiException { - ApiResponse> resp = orgEditHookWithHttpInfo(org, id, body); + public Hook orgEditHook(String org, Long id, EditHookOption body) throws ApiException { + ApiResponse resp = orgEditHookWithHttpInfo(org, id, body); return resp.getData(); } @@ -1443,12 +1691,12 @@ public List orgEditHook(String org, Long id, EditHookOption body) throws * @param org name of the organization (required) * @param id id of the hook to update (required) * @param body (optional) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> orgEditHookWithHttpInfo(String org, Long id, EditHookOption body) throws ApiException { + public ApiResponse orgEditHookWithHttpInfo(String org, Long id, EditHookOption body) throws ApiException { com.squareup.okhttp.Call call = orgEditHookValidateBeforeCall(org, id, body, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1462,7 +1710,7 @@ public ApiResponse> orgEditHookWithHttpInfo(String org, Long id, Ed * @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 orgEditHookAsync(String org, Long id, EditHookOption body, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call orgEditHookAsync(String org, Long id, EditHookOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1484,7 +1732,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = orgEditHookValidateBeforeCall(org, id, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -1814,11 +2062,11 @@ private com.squareup.okhttp.Call orgGetHookValidateBeforeCall(String org, Long i * * @param org name of the organization (required) * @param id id of the hook to get (required) - * @return List<Branch> + * @return Hook * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List orgGetHook(String org, Long id) throws ApiException { - ApiResponse> resp = orgGetHookWithHttpInfo(org, id); + public Hook orgGetHook(String org, Long id) throws ApiException { + ApiResponse resp = orgGetHookWithHttpInfo(org, id); return resp.getData(); } @@ -1827,12 +2075,12 @@ public List orgGetHook(String org, Long id) throws ApiException { * * @param org name of the organization (required) * @param id id of the hook to get (required) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> orgGetHookWithHttpInfo(String org, Long id) throws ApiException { + public ApiResponse orgGetHookWithHttpInfo(String org, Long id) throws ApiException { com.squareup.okhttp.Call call = orgGetHookValidateBeforeCall(org, id, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -1845,7 +2093,7 @@ public ApiResponse> orgGetHookWithHttpInfo(String org, Long id) thr * @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 orgGetHookAsync(String org, Long id, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call orgGetHookAsync(String org, Long id, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1867,7 +2115,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = orgGetHookValidateBeforeCall(org, id, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -2433,11 +2681,11 @@ private com.squareup.okhttp.Call orgListHooksValidateBeforeCall(String org, fina * List an organization's webhooks * * @param org name of the organization (required) - * @return List<Branch> + * @return List<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List orgListHooks(String org) throws ApiException { - ApiResponse> resp = orgListHooksWithHttpInfo(org); + public List orgListHooks(String org) throws ApiException { + ApiResponse> resp = orgListHooksWithHttpInfo(org); return resp.getData(); } @@ -2445,12 +2693,12 @@ public List orgListHooks(String org) throws ApiException { * List an organization's webhooks * * @param org name of the organization (required) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<List<Hook>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> orgListHooksWithHttpInfo(String org) throws ApiException { + public ApiResponse> orgListHooksWithHttpInfo(String org) throws ApiException { com.squareup.okhttp.Call call = orgListHooksValidateBeforeCall(org, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -2462,7 +2710,7 @@ public ApiResponse> orgListHooksWithHttpInfo(String org) throws Api * @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 orgListHooksAsync(String org, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call orgListHooksAsync(String org, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2484,7 +2732,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = orgListHooksValidateBeforeCall(org, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -2857,6 +3105,139 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for orgListTeamMember + * @param id id of the team (required) + * @param username username of the member to list (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 orgListTeamMemberCall(Long id, String username, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/teams/{id}/members/{username}" + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call orgListTeamMemberValidateBeforeCall(Long id, String username, 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 orgListTeamMember(Async)"); + } + + // verify the required parameter 'username' is set + if (username == null) { + throw new ApiException("Missing the required parameter 'username' when calling orgListTeamMember(Async)"); + } + + + com.squareup.okhttp.Call call = orgListTeamMemberCall(id, username, progressListener, progressRequestListener); + return call; + + } + + /** + * List a particular member of team + * + * @param id id of the team (required) + * @param username username of the member to list (required) + * @return User + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public User orgListTeamMember(Long id, String username) throws ApiException { + ApiResponse resp = orgListTeamMemberWithHttpInfo(id, username); + return resp.getData(); + } + + /** + * List a particular member of team + * + * @param id id of the team (required) + * @param username username of the member to list (required) + * @return ApiResponse<User> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse orgListTeamMemberWithHttpInfo(Long id, String username) throws ApiException { + com.squareup.okhttp.Call call = orgListTeamMemberValidateBeforeCall(id, username, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a particular member of team (asynchronously) + * + * @param id id of the team (required) + * @param username username of the member to list (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 orgListTeamMemberAsync(Long id, String username, 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 = orgListTeamMemberValidateBeforeCall(id, username, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for orgListTeamMembers * @param id id of the team (required) @@ -3238,7 +3619,7 @@ public com.squareup.okhttp.Call orgListUserOrgsCall(String username, final Progr Object localVarPostBody = null; // create path and map variables - String localVarPath = "/user/{username}/orgs" + String localVarPath = "/users/{username}/orgs" .replaceAll("\\{" + "username" + "\\}", apiClient.escapeString(username.toString())); List localVarQueryParams = new ArrayList(); @@ -3746,4 +4127,151 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, callback); return call; } + /** + * Build call for teamSearch + * @param org name of the organization (required) + * @param q keywords to search (optional) + * @param includeDesc include search within team description (defaults to true) (optional) + * @param limit limit size of results (optional) + * @param page page number of results to return (1-based) (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 teamSearchCall(String org, String q, Boolean includeDesc, Integer limit, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/orgs/{org}/teams/search" + .replaceAll("\\{" + "org" + "\\}", apiClient.escapeString(org.toString())); + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + if (q != null) + localVarQueryParams.addAll(apiClient.parameterToPair("q", q)); + if (includeDesc != null) + localVarQueryParams.addAll(apiClient.parameterToPair("include_desc", includeDesc)); + if (limit != null) + localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + + 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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call teamSearchValidateBeforeCall(String org, String q, Boolean includeDesc, Integer limit, Integer page, 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 teamSearch(Async)"); + } + + + com.squareup.okhttp.Call call = teamSearchCall(org, q, includeDesc, limit, page, progressListener, progressRequestListener); + return call; + + } + + /** + * Search for teams within an organization + * + * @param org name of the organization (required) + * @param q keywords to search (optional) + * @param includeDesc include search within team description (defaults to true) (optional) + * @param limit limit size of results (optional) + * @param page page number of results to return (1-based) (optional) + * @return InlineResponse200 + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public InlineResponse200 teamSearch(String org, String q, Boolean includeDesc, Integer limit, Integer page) throws ApiException { + ApiResponse resp = teamSearchWithHttpInfo(org, q, includeDesc, limit, page); + return resp.getData(); + } + + /** + * Search for teams within an organization + * + * @param org name of the organization (required) + * @param q keywords to search (optional) + * @param includeDesc include search within team description (defaults to true) (optional) + * @param limit limit size of results (optional) + * @param page page number of results to return (1-based) (optional) + * @return ApiResponse<InlineResponse200> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse teamSearchWithHttpInfo(String org, String q, Boolean includeDesc, Integer limit, Integer page) throws ApiException { + com.squareup.okhttp.Call call = teamSearchValidateBeforeCall(org, q, includeDesc, limit, page, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Search for teams within an organization (asynchronously) + * + * @param org name of the organization (required) + * @param q keywords to search (optional) + * @param includeDesc include search within team description (defaults to true) (optional) + * @param limit limit size of results (optional) + * @param page page number of results to return (1-based) (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 teamSearchAsync(String org, String q, Boolean includeDesc, Integer limit, Integer page, 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 = teamSearchValidateBeforeCall(org, q, includeDesc, limit, page, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } } diff --git a/src/main/java/io/gitea/api/RepositoryApi.java b/src/main/java/io/gitea/api/RepositoryApi.java index ad337de..ed4344f 100644 --- a/src/main/java/io/gitea/api/RepositoryApi.java +++ b/src/main/java/io/gitea/api/RepositoryApi.java @@ -27,9 +27,14 @@ import java.io.IOException; +import io.gitea.model.APIError; import io.gitea.model.AddCollaboratorOption; +import io.gitea.model.AnnotatedTag; import io.gitea.model.Attachment; import io.gitea.model.Branch; +import io.gitea.model.Commit; +import io.gitea.model.ContentsResponse; +import io.gitea.model.CreateFileOptions; import io.gitea.model.CreateForkOption; import io.gitea.model.CreateHookOption; import io.gitea.model.CreateKeyOption; @@ -37,19 +42,35 @@ import io.gitea.model.CreateReleaseOption; import io.gitea.model.CreateRepoOption; import io.gitea.model.CreateStatusOption; +import io.gitea.model.DeleteFileOptions; import io.gitea.model.DeployKey; import io.gitea.model.EditAttachmentOptions; +import io.gitea.model.EditGitHookOption; import io.gitea.model.EditHookOption; import io.gitea.model.EditPullRequestOption; import io.gitea.model.EditReleaseOption; +import io.gitea.model.EditRepoOption; import java.io.File; +import io.gitea.model.FileDeleteResponse; +import io.gitea.model.FileResponse; +import io.gitea.model.GitBlobResponse; +import io.gitea.model.GitHook; +import io.gitea.model.GitTreeResponse; +import io.gitea.model.Hook; +import io.gitea.model.MergePullRequestOption; import io.gitea.model.MigrateRepoForm; import io.gitea.model.PullRequest; +import io.gitea.model.Reference; import io.gitea.model.Release; +import io.gitea.model.RepoTopicOptions; import io.gitea.model.Repository; import io.gitea.model.SearchResults; import io.gitea.model.Status; +import io.gitea.model.Tag; +import io.gitea.model.TopicName; +import io.gitea.model.TopicResponse; import io.gitea.model.TrackedTime; +import io.gitea.model.UpdateFileOptions; import io.gitea.model.User; import io.gitea.model.WatchInfo; @@ -333,21 +354,23 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don return call; } /** - * Build call for listForks + * Build call for getBlob * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param sha sha of the commit (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 listForksCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call getBlobCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/forks" + String localVarPath = "/repos/{owner}/{repo}/git/blobs/{sha}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -385,61 +408,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call listForksValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getBlobValidateBeforeCall(String owner, String repo, String sha, 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 listForks(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling getBlob(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling listForks(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling getBlob(Async)"); + } + + // verify the required parameter 'sha' is set + if (sha == null) { + throw new ApiException("Missing the required parameter 'sha' when calling getBlob(Async)"); } - com.squareup.okhttp.Call call = listForksCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getBlobCall(owner, repo, sha, progressListener, progressRequestListener); return call; } /** - * List a repository's forks + * Gets the blob of a repository. * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return List<Repository> + * @param sha sha of the commit (required) + * @return GitBlobResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List listForks(String owner, String repo) throws ApiException { - ApiResponse> resp = listForksWithHttpInfo(owner, repo); + public GitBlobResponse getBlob(String owner, String repo, String sha) throws ApiException { + ApiResponse resp = getBlobWithHttpInfo(owner, repo, sha); return resp.getData(); } /** - * List a repository's forks + * Gets the blob of a repository. * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return ApiResponse<List<Repository>> + * @param sha sha of the commit (required) + * @return ApiResponse<GitBlobResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> listForksWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = listForksValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse getBlobWithHttpInfo(String owner, String repo, String sha) throws ApiException { + com.squareup.okhttp.Call call = getBlobValidateBeforeCall(owner, repo, sha, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * List a repository's forks (asynchronously) + * Gets the blob of a repository. (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param sha sha of the commit (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 listForksAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call getBlobAsync(String owner, String repo, String sha, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -460,30 +491,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = listForksValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = getBlobValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoAddCollaborator + * Build call for getTag * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to add (required) - * @param body (optional) + * @param sha sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (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 repoAddCollaboratorCall(String owner, String repo, String collaborator, AddCollaboratorOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call getTagCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" + String localVarPath = "/repos/{owner}/{repo}/git/tags/{sha}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); + .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -517,73 +547,73 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoAddCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, AddCollaboratorOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getTagValidateBeforeCall(String owner, String repo, String sha, 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 repoAddCollaborator(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling getTag(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoAddCollaborator(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling getTag(Async)"); } - // verify the required parameter 'collaborator' is set - if (collaborator == null) { - throw new ApiException("Missing the required parameter 'collaborator' when calling repoAddCollaborator(Async)"); + // verify the required parameter 'sha' is set + if (sha == null) { + throw new ApiException("Missing the required parameter 'sha' when calling getTag(Async)"); } - com.squareup.okhttp.Call call = repoAddCollaboratorCall(owner, repo, collaborator, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getTagCall(owner, repo, sha, progressListener, progressRequestListener); return call; } /** - * Add a collaborator to a repository + * Gets the tag object of an annotated tag (not lightweight tags) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to add (required) - * @param body (optional) + * @param sha sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + * @return AnnotatedTag * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoAddCollaborator(String owner, String repo, String collaborator, AddCollaboratorOption body) throws ApiException { - repoAddCollaboratorWithHttpInfo(owner, repo, collaborator, body); + public AnnotatedTag getTag(String owner, String repo, String sha) throws ApiException { + ApiResponse resp = getTagWithHttpInfo(owner, repo, sha); + return resp.getData(); } /** - * Add a collaborator to a repository + * Gets the tag object of an annotated tag (not lightweight tags) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to add (required) - * @param body (optional) - * @return ApiResponse<Void> + * @param sha sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (required) + * @return ApiResponse<AnnotatedTag> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoAddCollaboratorWithHttpInfo(String owner, String repo, String collaborator, AddCollaboratorOption body) throws ApiException { - com.squareup.okhttp.Call call = repoAddCollaboratorValidateBeforeCall(owner, repo, collaborator, body, null, null); - return apiClient.execute(call); + public ApiResponse getTagWithHttpInfo(String owner, String repo, String sha) throws ApiException { + com.squareup.okhttp.Call call = getTagValidateBeforeCall(owner, repo, sha, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Add a collaborator to a repository (asynchronously) + * Gets the tag object of an annotated tag (not lightweight tags) (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to add (required) - * @param body (optional) + * @param sha sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags. (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 repoAddCollaboratorAsync(String owner, String repo, String collaborator, AddCollaboratorOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getTagAsync(String owner, String repo, String sha, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -604,31 +634,41 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoAddCollaboratorValidateBeforeCall(owner, repo, collaborator, body, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = getTagValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoCheckCollaborator + * Build call for getTree * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator (required) + * @param sha sha of the commit (required) + * @param recursive show all directories and files (optional) + * @param page page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page (optional) + * @param perPage number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE (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 repoCheckCollaboratorCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call getTreeCall(String owner, String repo, String sha, Boolean recursive, Integer page, Integer perPage, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" + String localVarPath = "/repos/{owner}/{repo}/git/trees/{sha}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); + .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (recursive != null) + localVarQueryParams.addAll(apiClient.parameterToPair("recursive", recursive)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (perPage != null) + localVarQueryParams.addAll(apiClient.parameterToPair("per_page", perPage)); Map localVarHeaderParams = new HashMap(); @@ -663,66 +703,78 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCheckCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call getTreeValidateBeforeCall(String owner, String repo, String sha, Boolean recursive, Integer page, Integer perPage, 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 repoCheckCollaborator(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling getTree(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCheckCollaborator(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling getTree(Async)"); } - // verify the required parameter 'collaborator' is set - if (collaborator == null) { - throw new ApiException("Missing the required parameter 'collaborator' when calling repoCheckCollaborator(Async)"); + // verify the required parameter 'sha' is set + if (sha == null) { + throw new ApiException("Missing the required parameter 'sha' when calling getTree(Async)"); } - com.squareup.okhttp.Call call = repoCheckCollaboratorCall(owner, repo, collaborator, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = getTreeCall(owner, repo, sha, recursive, page, perPage, progressListener, progressRequestListener); return call; } /** - * Check if a user is a collaborator of a repository + * Gets the tree of a repository. * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator (required) + * @param sha sha of the commit (required) + * @param recursive show all directories and files (optional) + * @param page page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page (optional) + * @param perPage number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE (optional) + * @return GitTreeResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoCheckCollaborator(String owner, String repo, String collaborator) throws ApiException { - repoCheckCollaboratorWithHttpInfo(owner, repo, collaborator); + public GitTreeResponse getTree(String owner, String repo, String sha, Boolean recursive, Integer page, Integer perPage) throws ApiException { + ApiResponse resp = getTreeWithHttpInfo(owner, repo, sha, recursive, page, perPage); + return resp.getData(); } /** - * Check if a user is a collaborator of a repository + * Gets the tree of a repository. * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator (required) - * @return ApiResponse<Void> + * @param sha sha of the commit (required) + * @param recursive show all directories and files (optional) + * @param page page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page (optional) + * @param perPage number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE (optional) + * @return ApiResponse<GitTreeResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoCheckCollaboratorWithHttpInfo(String owner, String repo, String collaborator) throws ApiException { - com.squareup.okhttp.Call call = repoCheckCollaboratorValidateBeforeCall(owner, repo, collaborator, null, null); - return apiClient.execute(call); + public ApiResponse getTreeWithHttpInfo(String owner, String repo, String sha, Boolean recursive, Integer page, Integer perPage) throws ApiException { + com.squareup.okhttp.Call call = getTreeValidateBeforeCall(owner, repo, sha, recursive, page, perPage, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Check if a user is a collaborator of a repository (asynchronously) + * Gets the tree of a repository. (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator (required) + * @param sha sha of the commit (required) + * @param recursive show all directories and files (optional) + * @param page page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page (optional) + * @param perPage number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE (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 repoCheckCollaboratorAsync(String owner, String repo, String collaborator, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call getTreeAsync(String owner, String repo, String sha, Boolean recursive, Integer page, Integer perPage, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -743,25 +795,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCheckCollaboratorValidateBeforeCall(owner, repo, collaborator, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = getTreeValidateBeforeCall(owner, repo, sha, recursive, page, perPage, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoCreateHook + * Build call for listForks * @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 repoCreateHookCall(String owner, String repo, CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call listForksCall(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}/hooks" + String localVarPath = "/repos/{owner}/{repo}/forks" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); @@ -779,7 +831,7 @@ public com.squareup.okhttp.Call repoCreateHookCall(String owner, String repo, Cr if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -797,68 +849,65 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCreateHookValidateBeforeCall(String owner, String repo, CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call listForksValidateBeforeCall(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 repoCreateHook(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling listForks(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCreateHook(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling listForks(Async)"); } - com.squareup.okhttp.Call call = repoCreateHookCall(owner, repo, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = listForksCall(owner, repo, progressListener, progressRequestListener); return call; } /** - * Create a hook + * List a repository's forks * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) - * @return List<Branch> + * @return List<Repository> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoCreateHook(String owner, String repo, CreateHookOption body) throws ApiException { - ApiResponse> resp = repoCreateHookWithHttpInfo(owner, repo, body); + public List listForks(String owner, String repo) throws ApiException { + ApiResponse> resp = listForksWithHttpInfo(owner, repo); return resp.getData(); } /** - * Create a hook + * List a repository's forks * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<List<Repository>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoCreateHookWithHttpInfo(String owner, String repo, CreateHookOption body) throws ApiException { - com.squareup.okhttp.Call call = repoCreateHookValidateBeforeCall(owner, repo, body, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> listForksWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = listForksValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Create a hook (asynchronously) + * List a repository's forks (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 repoCreateHookAsync(String owner, String repo, CreateHookOption body, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call listForksAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -879,28 +928,30 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCreateHookValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = listForksValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoCreateKey + * Build call for repoAddCollaborator * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param collaborator username of the collaborator to add (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 repoCreateKeyCall(String owner, String repo, CreateKeyOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoAddCollaboratorCall(String owner, String repo, String collaborator, AddCollaboratorOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/keys" + String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -916,7 +967,7 @@ public com.squareup.okhttp.Call repoCreateKeyCall(String owner, String repo, Cre if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -934,68 +985,73 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCreateKeyValidateBeforeCall(String owner, String repo, CreateKeyOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoAddCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, AddCollaboratorOption 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 repoCreateKey(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoAddCollaborator(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCreateKey(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoAddCollaborator(Async)"); + } + + // verify the required parameter 'collaborator' is set + if (collaborator == null) { + throw new ApiException("Missing the required parameter 'collaborator' when calling repoAddCollaborator(Async)"); } - com.squareup.okhttp.Call call = repoCreateKeyCall(owner, repo, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoAddCollaboratorCall(owner, repo, collaborator, body, progressListener, progressRequestListener); return call; } /** - * Add a key to a repository + * Add a collaborator to a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param collaborator username of the collaborator to add (required) * @param body (optional) - * @return DeployKey * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public DeployKey repoCreateKey(String owner, String repo, CreateKeyOption body) throws ApiException { - ApiResponse resp = repoCreateKeyWithHttpInfo(owner, repo, body); - return resp.getData(); + public void repoAddCollaborator(String owner, String repo, String collaborator, AddCollaboratorOption body) throws ApiException { + repoAddCollaboratorWithHttpInfo(owner, repo, collaborator, body); } /** - * Add a key to a repository + * Add a collaborator to a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param collaborator username of the collaborator to add (required) * @param body (optional) - * @return ApiResponse<DeployKey> + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoCreateKeyWithHttpInfo(String owner, String repo, CreateKeyOption body) throws ApiException { - com.squareup.okhttp.Call call = repoCreateKeyValidateBeforeCall(owner, repo, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + public ApiResponse repoAddCollaboratorWithHttpInfo(String owner, String repo, String collaborator, AddCollaboratorOption body) throws ApiException { + com.squareup.okhttp.Call call = repoAddCollaboratorValidateBeforeCall(owner, repo, collaborator, body, null, null); + return apiClient.execute(call); } /** - * Add a key to a repository (asynchronously) + * Add a collaborator to a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param collaborator username of the collaborator to add (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 repoCreateKeyAsync(String owner, String repo, CreateKeyOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoAddCollaboratorAsync(String owner, String repo, String collaborator, AddCollaboratorOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1016,28 +1072,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCreateKeyValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); + com.squareup.okhttp.Call call = repoAddCollaboratorValidateBeforeCall(owner, repo, collaborator, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); return call; } /** - * Build call for repoCreatePullRequest + * Build call for repoAddTopc * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) + * @param topic name of the topic to add (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 repoCreatePullRequestCall(String owner, String repo, CreatePullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call repoAddTopcCall(String owner, String repo, String topic, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/pulls" + String localVarPath = "/repos/{owner}/{repo}/topics/{topic}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "topic" + "\\}", apiClient.escapeString(topic.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1053,7 +1109,7 @@ public com.squareup.okhttp.Call repoCreatePullRequestCall(String owner, String r if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1071,68 +1127,70 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCreatePullRequestValidateBeforeCall(String owner, String repo, CreatePullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoAddTopcValidateBeforeCall(String owner, String repo, String topic, 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 repoCreatePullRequest(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoAddTopc(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCreatePullRequest(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoAddTopc(Async)"); + } + + // verify the required parameter 'topic' is set + if (topic == null) { + throw new ApiException("Missing the required parameter 'topic' when calling repoAddTopc(Async)"); } - com.squareup.okhttp.Call call = repoCreatePullRequestCall(owner, repo, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoAddTopcCall(owner, repo, topic, progressListener, progressRequestListener); return call; } /** - * Create a pull request + * Add a topic to a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) - * @return PullRequest + * @param topic name of the topic to add (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public PullRequest repoCreatePullRequest(String owner, String repo, CreatePullRequestOption body) throws ApiException { - ApiResponse resp = repoCreatePullRequestWithHttpInfo(owner, repo, body); - return resp.getData(); + public void repoAddTopc(String owner, String repo, String topic) throws ApiException { + repoAddTopcWithHttpInfo(owner, repo, topic); } /** - * Create a pull request + * Add a topic to a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) - * @return ApiResponse<PullRequest> + * @param topic name of the topic to add (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoCreatePullRequestWithHttpInfo(String owner, String repo, CreatePullRequestOption body) throws ApiException { - com.squareup.okhttp.Call call = repoCreatePullRequestValidateBeforeCall(owner, repo, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + public ApiResponse repoAddTopcWithHttpInfo(String owner, String repo, String topic) throws ApiException { + com.squareup.okhttp.Call call = repoAddTopcValidateBeforeCall(owner, repo, topic, null, null); + return apiClient.execute(call); } /** - * Create a pull request (asynchronously) + * Add a topic to a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) + * @param topic name of the topic to add (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 repoCreatePullRequestAsync(String owner, String repo, CreatePullRequestOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoAddTopcAsync(String owner, String repo, String topic, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1153,28 +1211,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCreatePullRequestValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); + com.squareup.okhttp.Call call = repoAddTopcValidateBeforeCall(owner, repo, topic, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); return call; } /** - * Build call for repoCreateRelease + * Build call for repoCheckCollaborator * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) + * @param collaborator username of the collaborator (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 repoCreateReleaseCall(String owner, String repo, CreateReleaseOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call repoCheckCollaboratorCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases" + String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1190,7 +1248,7 @@ public com.squareup.okhttp.Call repoCreateReleaseCall(String owner, String repo, if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1208,68 +1266,70 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCreateReleaseValidateBeforeCall(String owner, String repo, CreateReleaseOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoCheckCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, 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 repoCreateRelease(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoCheckCollaborator(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCreateRelease(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoCheckCollaborator(Async)"); + } + + // verify the required parameter 'collaborator' is set + if (collaborator == null) { + throw new ApiException("Missing the required parameter 'collaborator' when calling repoCheckCollaborator(Async)"); } - com.squareup.okhttp.Call call = repoCreateReleaseCall(owner, repo, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoCheckCollaboratorCall(owner, repo, collaborator, progressListener, progressRequestListener); return call; } /** - * Create a release + * Check if a user is a collaborator of a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) - * @return Release + * @param collaborator username of the collaborator (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Release repoCreateRelease(String owner, String repo, CreateReleaseOption body) throws ApiException { - ApiResponse resp = repoCreateReleaseWithHttpInfo(owner, repo, body); - return resp.getData(); + public void repoCheckCollaborator(String owner, String repo, String collaborator) throws ApiException { + repoCheckCollaboratorWithHttpInfo(owner, repo, collaborator); } /** - * Create a release + * Check if a user is a collaborator of a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) - * @return ApiResponse<Release> + * @param collaborator username of the collaborator (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoCreateReleaseWithHttpInfo(String owner, String repo, CreateReleaseOption body) throws ApiException { - com.squareup.okhttp.Call call = repoCreateReleaseValidateBeforeCall(owner, repo, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + public ApiResponse repoCheckCollaboratorWithHttpInfo(String owner, String repo, String collaborator) throws ApiException { + com.squareup.okhttp.Call call = repoCheckCollaboratorValidateBeforeCall(owner, repo, collaborator, null, null); + return apiClient.execute(call); } /** - * Create a release (asynchronously) + * Check if a user is a collaborator of a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param body (optional) + * @param collaborator username of the collaborator (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 repoCreateReleaseAsync(String owner, String repo, CreateReleaseOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoCheckCollaboratorAsync(String owner, String repo, String collaborator, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1290,42 +1350,36 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCreateReleaseValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); + com.squareup.okhttp.Call call = repoCheckCollaboratorValidateBeforeCall(owner, repo, collaborator, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); return call; } /** - * Build call for repoCreateReleaseAttachment + * Build call for repoCreateFile * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachment attachment to upload (required) - * @param name name of the attachment (optional) + * @param filepath path of the file to create (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 repoCreateReleaseAttachmentCall(String owner, String repo, Long id, File attachment, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + public com.squareup.okhttp.Call repoCreateFileCall(String owner, String repo, String filepath, CreateFileOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases/{id}/assets" + String localVarPath = "/repos/{owner}/{repo}/contents/{filepath}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.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" @@ -1334,7 +1388,7 @@ public com.squareup.okhttp.Call repoCreateReleaseAttachmentCall(String owner, St if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "multipart/form-data" + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1356,80 +1410,77 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCreateReleaseAttachmentValidateBeforeCall(String owner, String repo, Long id, File attachment, String name, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoCreateFileValidateBeforeCall(String owner, String repo, String filepath, CreateFileOptions 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 repoCreateReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoCreateFile(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCreateReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoCreateFile(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoCreateReleaseAttachment(Async)"); + // verify the required parameter 'filepath' is set + if (filepath == null) { + throw new ApiException("Missing the required parameter 'filepath' when calling repoCreateFile(Async)"); } - // verify the required parameter 'attachment' is set - if (attachment == null) { - throw new ApiException("Missing the required parameter 'attachment' when calling repoCreateReleaseAttachment(Async)"); + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling repoCreateFile(Async)"); } - com.squareup.okhttp.Call call = repoCreateReleaseAttachmentCall(owner, repo, id, attachment, name, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoCreateFileCall(owner, repo, filepath, body, progressListener, progressRequestListener); return call; } /** - * Create a release attachment + * Create a file in a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachment attachment to upload (required) - * @param name name of the attachment (optional) - * @return Attachment + * @param filepath path of the file to create (required) + * @param body (required) + * @return FileResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Attachment repoCreateReleaseAttachment(String owner, String repo, Long id, File attachment, String name) throws ApiException { - ApiResponse resp = repoCreateReleaseAttachmentWithHttpInfo(owner, repo, id, attachment, name); + public FileResponse repoCreateFile(String owner, String repo, String filepath, CreateFileOptions body) throws ApiException { + ApiResponse resp = repoCreateFileWithHttpInfo(owner, repo, filepath, body); return resp.getData(); } /** - * Create a release attachment + * Create a file in a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachment attachment to upload (required) - * @param name name of the attachment (optional) - * @return ApiResponse<Attachment> + * @param filepath path of the file to create (required) + * @param body (required) + * @return ApiResponse<FileResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoCreateReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, File attachment, String name) throws ApiException { - com.squareup.okhttp.Call call = repoCreateReleaseAttachmentValidateBeforeCall(owner, repo, id, attachment, name, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoCreateFileWithHttpInfo(String owner, String repo, String filepath, CreateFileOptions body) throws ApiException { + com.squareup.okhttp.Call call = repoCreateFileValidateBeforeCall(owner, repo, filepath, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Create a release attachment (asynchronously) + * Create a file in a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachment attachment to upload (required) - * @param name name of the attachment (optional) + * @param filepath path of the file to create (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 repoCreateReleaseAttachmentAsync(String owner, String repo, Long id, File attachment, String name, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoCreateFileAsync(String owner, String repo, String filepath, CreateFileOptions body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1450,30 +1501,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCreateReleaseAttachmentValidateBeforeCall(owner, repo, id, attachment, name, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoCreateFileValidateBeforeCall(owner, repo, filepath, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoCreateStatus + * Build call for repoCreateHook * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha sha of the commit (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 repoCreateStatusCall(String owner, String repo, String sha, CreateStatusOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoCreateHookCall(String owner, String repo, CreateHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = body; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/statuses/{sha}" + String localVarPath = "/repos/{owner}/{repo}/hooks" .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(); @@ -1489,7 +1538,7 @@ public com.squareup.okhttp.Call repoCreateStatusCall(String owner, String repo, if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json", "text/plain" + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1511,72 +1560,64 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoCreateStatusValidateBeforeCall(String owner, String repo, String sha, CreateStatusOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoCreateHookValidateBeforeCall(String owner, String repo, CreateHookOption 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 repoCreateStatus(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoCreateHook(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoCreateStatus(Async)"); - } - - // verify the required parameter 'sha' is set - if (sha == null) { - throw new ApiException("Missing the required parameter 'sha' when calling repoCreateStatus(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoCreateHook(Async)"); } - com.squareup.okhttp.Call call = repoCreateStatusCall(owner, repo, sha, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoCreateHookCall(owner, repo, body, progressListener, progressRequestListener); return call; } /** - * Create a commit status + * Create a hook * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha sha of the commit (required) * @param body (optional) - * @return List<Status> + * @return Hook * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoCreateStatus(String owner, String repo, String sha, CreateStatusOption body) throws ApiException { - ApiResponse> resp = repoCreateStatusWithHttpInfo(owner, repo, sha, body); + public Hook repoCreateHook(String owner, String repo, CreateHookOption body) throws ApiException { + ApiResponse resp = repoCreateHookWithHttpInfo(owner, repo, body); return resp.getData(); } /** - * Create a commit status + * Create a hook * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha sha of the commit (required) * @param body (optional) - * @return ApiResponse<List<Status>> + * @return ApiResponse<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoCreateStatusWithHttpInfo(String owner, String repo, String sha, CreateStatusOption body) throws ApiException { - com.squareup.okhttp.Call call = repoCreateStatusValidateBeforeCall(owner, repo, sha, body, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse repoCreateHookWithHttpInfo(String owner, String repo, CreateHookOption body) throws ApiException { + com.squareup.okhttp.Call call = repoCreateHookValidateBeforeCall(owner, repo, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Create a commit status (asynchronously) + * Create a hook (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param sha sha of the commit (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 repoCreateStatusAsync(String owner, String repo, String sha, CreateStatusOption body, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoCreateHookAsync(String owner, String repo, CreateHookOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1597,25 +1638,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoCreateStatusValidateBeforeCall(owner, repo, sha, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = repoCreateHookValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoDelete - * @param owner owner of the repo to delete (required) - * @param repo name of the repo to delete (required) + * Build call for repoCreateKey + * @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 repoDeleteCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + public com.squareup.okhttp.Call repoCreateKeyCall(String owner, String repo, CreateKeyOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}" + String localVarPath = "/repos/{owner}/{repo}/keys" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); @@ -1633,7 +1675,7 @@ public com.squareup.okhttp.Call repoDeleteCall(String owner, String repo, final if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json", "text/plain" + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1651,62 +1693,68 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoDeleteValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoCreateKeyValidateBeforeCall(String owner, String repo, CreateKeyOption 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 repoDelete(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoCreateKey(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoDelete(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoCreateKey(Async)"); } - com.squareup.okhttp.Call call = repoDeleteCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoCreateKeyCall(owner, repo, body, progressListener, progressRequestListener); return call; } /** - * Delete a repository + * Add a key to a repository * - * @param owner owner of the repo to delete (required) - * @param repo name of the repo to delete (required) + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @return DeployKey * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoDelete(String owner, String repo) throws ApiException { - repoDeleteWithHttpInfo(owner, repo); + public DeployKey repoCreateKey(String owner, String repo, CreateKeyOption body) throws ApiException { + ApiResponse resp = repoCreateKeyWithHttpInfo(owner, repo, body); + return resp.getData(); } /** - * Delete a repository + * Add a key to a repository * - * @param owner owner of the repo to delete (required) - * @param repo name of the repo to delete (required) - * @return ApiResponse<Void> + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @return ApiResponse<DeployKey> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoDeleteWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = repoDeleteValidateBeforeCall(owner, repo, null, null); - return apiClient.execute(call); + public ApiResponse repoCreateKeyWithHttpInfo(String owner, String repo, CreateKeyOption body) throws ApiException { + com.squareup.okhttp.Call call = repoCreateKeyValidateBeforeCall(owner, repo, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Delete a repository (asynchronously) + * Add a key to a repository (asynchronously) * - * @param owner owner of the repo to delete (required) - * @param repo name of the repo to delete (required) + * @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 repoDeleteAsync(String owner, String repo, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoCreateKeyAsync(String owner, String repo, CreateKeyOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1727,28 +1775,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoDeleteValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoCreateKeyValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoDeleteCollaborator + * Build call for repoCreatePullRequest * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to delete (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 repoDeleteCollaboratorCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + public com.squareup.okhttp.Call repoCreatePullRequestCall(String owner, String repo, CreatePullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" + String localVarPath = "/repos/{owner}/{repo}/pulls" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -1764,7 +1812,7 @@ public com.squareup.okhttp.Call repoDeleteCollaboratorCall(String owner, String if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json", "text/plain" + "application/json" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1782,70 +1830,68 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoDeleteCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoCreatePullRequestValidateBeforeCall(String owner, String repo, CreatePullRequestOption 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 repoDeleteCollaborator(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoCreatePullRequest(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteCollaborator(Async)"); - } - - // verify the required parameter 'collaborator' is set - if (collaborator == null) { - throw new ApiException("Missing the required parameter 'collaborator' when calling repoDeleteCollaborator(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoCreatePullRequest(Async)"); } - com.squareup.okhttp.Call call = repoDeleteCollaboratorCall(owner, repo, collaborator, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoCreatePullRequestCall(owner, repo, body, progressListener, progressRequestListener); return call; } /** - * Delete a collaborator from a repository + * Create a pull request * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to delete (required) + * @param body (optional) + * @return PullRequest * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoDeleteCollaborator(String owner, String repo, String collaborator) throws ApiException { - repoDeleteCollaboratorWithHttpInfo(owner, repo, collaborator); + public PullRequest repoCreatePullRequest(String owner, String repo, CreatePullRequestOption body) throws ApiException { + ApiResponse resp = repoCreatePullRequestWithHttpInfo(owner, repo, body); + return resp.getData(); } /** - * Delete a collaborator from a repository + * Create a pull request * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to delete (required) - * @return ApiResponse<Void> + * @param body (optional) + * @return ApiResponse<PullRequest> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoDeleteCollaboratorWithHttpInfo(String owner, String repo, String collaborator) throws ApiException { - com.squareup.okhttp.Call call = repoDeleteCollaboratorValidateBeforeCall(owner, repo, collaborator, null, null); - return apiClient.execute(call); + public ApiResponse repoCreatePullRequestWithHttpInfo(String owner, String repo, CreatePullRequestOption body) throws ApiException { + com.squareup.okhttp.Call call = repoCreatePullRequestValidateBeforeCall(owner, repo, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Delete a collaborator from a repository (asynchronously) + * Create a pull request (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param collaborator username of the collaborator to delete (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 repoDeleteCollaboratorAsync(String owner, String repo, String collaborator, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoCreatePullRequestAsync(String owner, String repo, CreatePullRequestOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -1866,35 +1912,179 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoDeleteCollaboratorValidateBeforeCall(owner, repo, collaborator, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoCreatePullRequestValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoDeleteHook + * Build call for repoCreateRelease * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to delete (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 repoDeleteHookCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoCreateReleaseCall(String owner, String repo, CreateReleaseOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/releases" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoCreateReleaseValidateBeforeCall(String owner, String repo, CreateReleaseOption 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 repoCreateRelease(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoCreateRelease(Async)"); + } + + + com.squareup.okhttp.Call call = repoCreateReleaseCall(owner, repo, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a release + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @return Release + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Release repoCreateRelease(String owner, String repo, CreateReleaseOption body) throws ApiException { + ApiResponse resp = repoCreateReleaseWithHttpInfo(owner, repo, body); + return resp.getData(); + } + + /** + * Create a release + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param body (optional) + * @return ApiResponse<Release> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoCreateReleaseWithHttpInfo(String owner, String repo, CreateReleaseOption body) throws ApiException { + com.squareup.okhttp.Call call = repoCreateReleaseValidateBeforeCall(owner, repo, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a release (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 repoCreateReleaseAsync(String owner, String repo, CreateReleaseOption 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 = repoCreateReleaseValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoCreateReleaseAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoCreateReleaseAttachmentCall(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}/hooks/{id}" + String localVarPath = "/repos/{owner}/{repo}/releases/{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" @@ -1903,7 +2093,7 @@ public com.squareup.okhttp.Call repoDeleteHookCall(String owner, String repo, Lo if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json", "text/plain" + "multipart/form-data" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -1921,70 +2111,2510 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoDeleteHookValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoCreateReleaseAttachmentValidateBeforeCall(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 repoDeleteHook(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoCreateReleaseAttachment(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteHook(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoCreateReleaseAttachment(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoDeleteHook(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling repoCreateReleaseAttachment(Async)"); + } + + // verify the required parameter 'attachment' is set + if (attachment == null) { + throw new ApiException("Missing the required parameter 'attachment' when calling repoCreateReleaseAttachment(Async)"); } - com.squareup.okhttp.Call call = repoDeleteHookCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoCreateReleaseAttachmentCall(owner, repo, id, attachment, name, progressListener, progressRequestListener); return call; } /** - * Delete a hook in a repository + * Create a release attachment * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to delete (required) + * @param id id of the release (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 void repoDeleteHook(String owner, String repo, Long id) throws ApiException { - repoDeleteHookWithHttpInfo(owner, repo, id); + public Attachment repoCreateReleaseAttachment(String owner, String repo, Long id, File attachment, String name) throws ApiException { + ApiResponse resp = repoCreateReleaseAttachmentWithHttpInfo(owner, repo, id, attachment, name); + return resp.getData(); } /** - * Delete a hook in a repository + * Create a release attachment * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to delete (required) - * @return ApiResponse<Void> + * @param id id of the release (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 repoCreateReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, File attachment, String name) throws ApiException { + com.squareup.okhttp.Call call = repoCreateReleaseAttachmentValidateBeforeCall(owner, repo, id, attachment, name, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a release attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoCreateReleaseAttachmentAsync(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 = repoCreateReleaseAttachmentValidateBeforeCall(owner, repo, id, attachment, name, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoCreateStatus + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha sha of the commit (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 repoCreateStatusCall(String owner, String repo, String sha, CreateStatusOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/statuses/{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(); + + 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", "Token" }; + return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoCreateStatusValidateBeforeCall(String owner, String repo, String sha, CreateStatusOption 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 repoCreateStatus(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoCreateStatus(Async)"); + } + + // verify the required parameter 'sha' is set + if (sha == null) { + throw new ApiException("Missing the required parameter 'sha' when calling repoCreateStatus(Async)"); + } + + + com.squareup.okhttp.Call call = repoCreateStatusCall(owner, repo, sha, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Create a commit status + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha sha of the commit (required) + * @param body (optional) + * @return List<Status> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List repoCreateStatus(String owner, String repo, String sha, CreateStatusOption body) throws ApiException { + ApiResponse> resp = repoCreateStatusWithHttpInfo(owner, repo, sha, body); + return resp.getData(); + } + + /** + * Create a commit status + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha sha of the commit (required) + * @param body (optional) + * @return ApiResponse<List<Status>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> repoCreateStatusWithHttpInfo(String owner, String repo, String sha, CreateStatusOption body) throws ApiException { + com.squareup.okhttp.Call call = repoCreateStatusValidateBeforeCall(owner, repo, sha, body, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Create a commit status (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param sha sha of the commit (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 repoCreateStatusAsync(String owner, String repo, String sha, CreateStatusOption 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 = repoCreateStatusValidateBeforeCall(owner, repo, sha, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoDelete + * @param owner owner of the repo to delete (required) + * @param repo name of the repo 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 repoDeleteCall(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}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteValidateBeforeCall(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 repoDelete(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDelete(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a repository + * + * @param owner owner of the repo to delete (required) + * @param repo name of the repo to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDelete(String owner, String repo) throws ApiException { + repoDeleteWithHttpInfo(owner, repo); + } + + /** + * Delete a repository + * + * @param owner owner of the repo to delete (required) + * @param repo name of the repo 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 repoDeleteWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteValidateBeforeCall(owner, repo, null, null); + return apiClient.execute(call); + } + + /** + * Delete a repository (asynchronously) + * + * @param owner owner of the repo to delete (required) + * @param repo name of the repo 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 repoDeleteAsync(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 = repoDeleteValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteCollaborator + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param collaborator username of the collaborator 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 repoDeleteCollaboratorCall(String owner, String repo, String collaborator, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/collaborators/{collaborator}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "collaborator" + "\\}", apiClient.escapeString(collaborator.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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteCollaboratorValidateBeforeCall(String owner, String repo, String collaborator, 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 repoDeleteCollaborator(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteCollaborator(Async)"); + } + + // verify the required parameter 'collaborator' is set + if (collaborator == null) { + throw new ApiException("Missing the required parameter 'collaborator' when calling repoDeleteCollaborator(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteCollaboratorCall(owner, repo, collaborator, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a collaborator from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param collaborator username of the collaborator to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDeleteCollaborator(String owner, String repo, String collaborator) throws ApiException { + repoDeleteCollaboratorWithHttpInfo(owner, repo, collaborator); + } + + /** + * Delete a collaborator from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param collaborator username of the collaborator 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 repoDeleteCollaboratorWithHttpInfo(String owner, String repo, String collaborator) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteCollaboratorValidateBeforeCall(owner, repo, collaborator, null, null); + return apiClient.execute(call); + } + + /** + * Delete a collaborator from a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param collaborator username of the collaborator 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 repoDeleteCollaboratorAsync(String owner, String repo, String collaborator, 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 = repoDeleteCollaboratorValidateBeforeCall(owner, repo, collaborator, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteFile + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to delete (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 repoDeleteFileCall(String owner, String repo, String filepath, DeleteFileOptions 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/{filepath}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteFileValidateBeforeCall(String owner, String repo, String filepath, DeleteFileOptions 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 repoDeleteFile(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteFile(Async)"); + } + + // verify the required parameter 'filepath' is set + if (filepath == null) { + throw new ApiException("Missing the required parameter 'filepath' when calling repoDeleteFile(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling repoDeleteFile(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteFileCall(owner, repo, filepath, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a file in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to delete (required) + * @param body (required) + * @return FileDeleteResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public FileDeleteResponse repoDeleteFile(String owner, String repo, String filepath, DeleteFileOptions body) throws ApiException { + ApiResponse resp = repoDeleteFileWithHttpInfo(owner, repo, filepath, body); + return resp.getData(); + } + + /** + * Delete a file in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to delete (required) + * @param body (required) + * @return ApiResponse<FileDeleteResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoDeleteFileWithHttpInfo(String owner, String repo, String filepath, DeleteFileOptions body) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteFileValidateBeforeCall(owner, repo, filepath, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Delete a file in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to delete (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 repoDeleteFileAsync(String owner, String repo, String filepath, DeleteFileOptions 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 = repoDeleteFileValidateBeforeCall(owner, repo, filepath, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoDeleteGitHook + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @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 repoDeleteGitHookCall(String owner, String repo, String id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/hooks/git/{id}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteGitHookValidateBeforeCall(String owner, String repo, String 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 repoDeleteGitHook(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteGitHook(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoDeleteGitHook(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteGitHookCall(owner, repo, id, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a Git hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the hook to get (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDeleteGitHook(String owner, String repo, String id) throws ApiException { + repoDeleteGitHookWithHttpInfo(owner, repo, id); + } + + /** + * Delete a Git hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the hook to get (required) + * @return ApiResponse<Void> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoDeleteGitHookWithHttpInfo(String owner, String repo, String id) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteGitHookValidateBeforeCall(owner, repo, id, null, null); + return apiClient.execute(call); + } + + /** + * Delete a Git hook in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @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 repoDeleteGitHookAsync(String owner, String repo, String 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 = repoDeleteGitHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteHook + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @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 repoDeleteHookCall(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}/hooks/{id}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteHookValidateBeforeCall(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 repoDeleteHook(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteHook(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoDeleteHook(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteHookCall(owner, repo, id, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @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 repoDeleteHook(String owner, String repo, Long id) throws ApiException { + repoDeleteHookWithHttpInfo(owner, repo, id); + } + + /** + * Delete a hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @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 repoDeleteHookWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteHookValidateBeforeCall(owner, repo, id, null, null); + return apiClient.execute(call); + } + + /** + * Delete a hook in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @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 repoDeleteHookAsync(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 = repoDeleteHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteKey + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key 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 repoDeleteKeyCall(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}/keys/{id}" + .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", "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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteKeyValidateBeforeCall(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 repoDeleteKey(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteKey(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoDeleteKey(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteKeyCall(owner, repo, id, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a key from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDeleteKey(String owner, String repo, Long id) throws ApiException { + repoDeleteKeyWithHttpInfo(owner, repo, id); + } + + /** + * Delete a key from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key 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 repoDeleteKeyWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteKeyValidateBeforeCall(owner, repo, id, null, null); + return apiClient.execute(call); + } + + /** + * Delete a key from a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key 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 repoDeleteKeyAsync(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 = repoDeleteKeyValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteRelease + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release 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 repoDeleteReleaseCall(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}/releases/{id}" + .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", "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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteReleaseValidateBeforeCall(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 repoDeleteRelease(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteRelease(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoDeleteRelease(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteReleaseCall(owner, repo, id, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a release + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDeleteRelease(String owner, String repo, Long id) throws ApiException { + repoDeleteReleaseWithHttpInfo(owner, repo, id); + } + + /** + * Delete a release + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release 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 repoDeleteReleaseWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteReleaseValidateBeforeCall(owner, repo, id, null, null); + return apiClient.execute(call); + } + + /** + * Delete a release (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release 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 repoDeleteReleaseAsync(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 = repoDeleteReleaseValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteReleaseAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoDeleteReleaseAttachmentCall(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}/releases/{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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteReleaseAttachmentValidateBeforeCall(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 repoDeleteReleaseAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteReleaseAttachment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoDeleteReleaseAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling repoDeleteReleaseAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteReleaseAttachmentCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a release attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoDeleteReleaseAttachment(String owner, String repo, Long id, Long attachmentId) throws ApiException { + repoDeleteReleaseAttachmentWithHttpInfo(owner, repo, id, attachmentId); + } + + /** + * Delete a release attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoDeleteReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, null, null); + return apiClient.execute(call); + } + + /** + * Delete a release attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoDeleteReleaseAttachmentAsync(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 = repoDeleteReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoDeleteTopic + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param topic name of the topic 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 repoDeleteTopicCall(String owner, String repo, String topic, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/topics/{topic}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "topic" + "\\}", apiClient.escapeString(topic.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", "Token" }; + return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoDeleteTopicValidateBeforeCall(String owner, String repo, String topic, 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 repoDeleteTopic(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteTopic(Async)"); + } + + // verify the required parameter 'topic' is set + if (topic == null) { + throw new ApiException("Missing the required parameter 'topic' when calling repoDeleteTopic(Async)"); + } + + + com.squareup.okhttp.Call call = repoDeleteTopicCall(owner, repo, topic, progressListener, progressRequestListener); + return call; + + } + + /** + * Delete a topic from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param topic name of the topic to delete (required) + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public void repoDeleteTopic(String owner, String repo, String topic) throws ApiException { + repoDeleteTopicWithHttpInfo(owner, repo, topic); + } + + /** + * Delete a topic from a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param topic name of the topic 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 repoDeleteTopicWithHttpInfo(String owner, String repo, String topic) throws ApiException { + com.squareup.okhttp.Call call = repoDeleteTopicValidateBeforeCall(owner, repo, topic, null, null); + return apiClient.execute(call); + } + + /** + * Delete a topic from a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param topic name of the topic 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 repoDeleteTopicAsync(String owner, String repo, String topic, 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 = repoDeleteTopicValidateBeforeCall(owner, repo, topic, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } + /** + * Build call for repoEdit + * @param owner owner of the repo to edit (required) + * @param repo name of the repo to edit (required) + * @param body Properties of a repo that you can edit (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 repoEditCall(String owner, String repo, EditRepoOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoEditValidateBeforeCall(String owner, String repo, EditRepoOption 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 repoEdit(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoEdit(Async)"); + } + + + com.squareup.okhttp.Call call = repoEditCall(owner, repo, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Edit a repository's properties. Only fields that are set will be changed. + * + * @param owner owner of the repo to edit (required) + * @param repo name of the repo to edit (required) + * @param body Properties of a repo that you can edit (optional) + * @return Repository + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Repository repoEdit(String owner, String repo, EditRepoOption body) throws ApiException { + ApiResponse resp = repoEditWithHttpInfo(owner, repo, body); + return resp.getData(); + } + + /** + * Edit a repository's properties. Only fields that are set will be changed. + * + * @param owner owner of the repo to edit (required) + * @param repo name of the repo to edit (required) + * @param body Properties of a repo that you can edit (optional) + * @return ApiResponse<Repository> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoEditWithHttpInfo(String owner, String repo, EditRepoOption body) throws ApiException { + com.squareup.okhttp.Call call = repoEditValidateBeforeCall(owner, repo, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Edit a repository's properties. Only fields that are set will be changed. (asynchronously) + * + * @param owner owner of the repo to edit (required) + * @param repo name of the repo to edit (required) + * @param body Properties of a repo that you can edit (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 repoEditAsync(String owner, String repo, EditRepoOption 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 = repoEditValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoEditGitHook + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the hook to get (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 repoEditGitHookCall(String owner, String repo, String id, EditGitHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/hooks/git/{id}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoEditGitHookValidateBeforeCall(String owner, String repo, String id, EditGitHookOption 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 repoEditGitHook(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoEditGitHook(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoEditGitHook(Async)"); + } + + + com.squareup.okhttp.Call call = repoEditGitHookCall(owner, repo, id, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Edit a Git hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the hook to get (required) + * @param body (optional) + * @return GitHook + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public GitHook repoEditGitHook(String owner, String repo, String id, EditGitHookOption body) throws ApiException { + ApiResponse resp = repoEditGitHookWithHttpInfo(owner, repo, id, body); + return resp.getData(); + } + + /** + * Edit a Git hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the hook to get (required) + * @param body (optional) + * @return ApiResponse<GitHook> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoEditGitHookWithHttpInfo(String owner, String repo, String id, EditGitHookOption body) throws ApiException { + com.squareup.okhttp.Call call = repoEditGitHookValidateBeforeCall(owner, repo, id, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Edit a Git hook in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the hook to get (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 repoEditGitHookAsync(String owner, String repo, String id, EditGitHookOption 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 = repoEditGitHookValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoEditHook + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id index of the hook (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 repoEditHookCall(String owner, String repo, Long id, EditHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/hooks/{id}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoEditHookValidateBeforeCall(String owner, String repo, Long id, EditHookOption 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 repoEditHook(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoEditHook(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoEditHook(Async)"); + } + + + com.squareup.okhttp.Call call = repoEditHookCall(owner, repo, id, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Edit a hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id index of the hook (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 repoEditHook(String owner, String repo, Long id, EditHookOption body) throws ApiException { + ApiResponse resp = repoEditHookWithHttpInfo(owner, repo, id, body); + return resp.getData(); + } + + /** + * Edit a hook in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id index of the hook (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 repoEditHookWithHttpInfo(String owner, String repo, Long id, EditHookOption body) throws ApiException { + com.squareup.okhttp.Call call = repoEditHookValidateBeforeCall(owner, repo, id, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Edit a hook in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id index of the hook (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 repoEditHookAsync(String owner, String repo, 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 = repoEditHookValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoEditPullRequest + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the pull request 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 repoEditPullRequestCall(String owner, String repo, Long index, EditPullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/pulls/{index}" + .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" + }; + 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", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoEditPullRequestValidateBeforeCall(String owner, String repo, Long index, EditPullRequestOption 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 repoEditPullRequest(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoEditPullRequest(Async)"); + } + + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling repoEditPullRequest(Async)"); + } + + + com.squareup.okhttp.Call call = repoEditPullRequestCall(owner, repo, index, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a pull request + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the pull request to edit (required) + * @param body (optional) + * @return PullRequest + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public PullRequest repoEditPullRequest(String owner, String repo, Long index, EditPullRequestOption body) throws ApiException { + ApiResponse resp = repoEditPullRequestWithHttpInfo(owner, repo, index, body); + return resp.getData(); + } + + /** + * Update a pull request + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the pull request to edit (required) + * @param body (optional) + * @return ApiResponse<PullRequest> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoEditPullRequestWithHttpInfo(String owner, String repo, Long index, EditPullRequestOption body) throws ApiException { + com.squareup.okhttp.Call call = repoEditPullRequestValidateBeforeCall(owner, repo, index, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Update a pull request (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param index index of the pull request 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 repoEditPullRequestAsync(String owner, String repo, Long index, EditPullRequestOption 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 = repoEditPullRequestValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoEditRelease + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release 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 repoEditReleaseCall(String owner, String repo, Long id, EditReleaseOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/releases/{id}" + .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" + }; + 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", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoEditReleaseValidateBeforeCall(String owner, String repo, Long id, EditReleaseOption 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 repoEditRelease(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoEditRelease(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoEditRelease(Async)"); + } + + + com.squareup.okhttp.Call call = repoEditReleaseCall(owner, repo, id, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a release + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release to edit (required) + * @param body (optional) + * @return Release + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Release repoEditRelease(String owner, String repo, Long id, EditReleaseOption body) throws ApiException { + ApiResponse resp = repoEditReleaseWithHttpInfo(owner, repo, id, body); + return resp.getData(); + } + + /** + * Update a release + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release to edit (required) + * @param body (optional) + * @return ApiResponse<Release> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoEditReleaseWithHttpInfo(String owner, String repo, Long id, EditReleaseOption body) throws ApiException { + com.squareup.okhttp.Call call = repoEditReleaseValidateBeforeCall(owner, repo, id, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Update a release (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release 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 repoEditReleaseAsync(String owner, String repo, Long id, EditReleaseOption 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 = repoEditReleaseValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoEditReleaseAttachment + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoEditReleaseAttachmentCall(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}/releases/{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", "Token" }; + return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoEditReleaseAttachmentValidateBeforeCall(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 repoEditReleaseAttachment(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoEditReleaseAttachment(Async)"); + } + + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoEditReleaseAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling repoEditReleaseAttachment(Async)"); + } + + + com.squareup.okhttp.Call call = repoEditReleaseAttachmentCall(owner, repo, id, attachmentId, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Edit a release attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoEditReleaseAttachment(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body) throws ApiException { + ApiResponse resp = repoEditReleaseAttachmentWithHttpInfo(owner, repo, id, attachmentId, body); + return resp.getData(); + } + + /** + * Edit a release attachment + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoEditReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body) throws ApiException { + com.squareup.okhttp.Call call = repoEditReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Edit a release attachment (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the release (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 repoEditReleaseAttachmentAsync(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 = repoEditReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoGet + * @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 repoGetCall(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}" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoGetValidateBeforeCall(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 repoGet(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoGet(Async)"); + } + + + com.squareup.okhttp.Call call = repoGetCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Get a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return Repository + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public Repository repoGet(String owner, String repo) throws ApiException { + ApiResponse resp = repoGetWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * Get a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<Repository> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoDeleteHookWithHttpInfo(String owner, String repo, Long id) throws ApiException { - com.squareup.okhttp.Call call = repoDeleteHookValidateBeforeCall(owner, repo, id, null, null); - return apiClient.execute(call); + public ApiResponse repoGetWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoGetValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Delete a hook in a repository (asynchronously) + * Get a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @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 repoDeleteHookAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetAsync(String owner, String repo, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2005,38 +4635,43 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoDeleteHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoGetValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoDeleteKey + * Build call for repoGetAllCommits * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to delete (required) + * @param sha SHA or branch to start listing commits from (usually 'master') (optional) + * @param page page number of requested commits (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 repoDeleteKeyCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetAllCommitsCall(String owner, String repo, String sha, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/keys/{id}" + String localVarPath = "/repos/{owner}/{repo}/commits" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (sha != null) + localVarQueryParams.addAll(apiClient.parameterToPair("sha", sha)); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); Map localVarHeaderParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json", "text/html" + "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); @@ -2060,70 +4695,71 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoDeleteKeyValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetAllCommitsValidateBeforeCall(String owner, String repo, String sha, Integer page, 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 repoDeleteKey(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetAllCommits(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteKey(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoDeleteKey(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetAllCommits(Async)"); } - com.squareup.okhttp.Call call = repoDeleteKeyCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetAllCommitsCall(owner, repo, sha, page, progressListener, progressRequestListener); return call; } /** - * Delete a key from a repository + * Get a list of all commits from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to delete (required) + * @param sha SHA or branch to start listing commits from (usually 'master') (optional) + * @param page page number of requested commits (optional) + * @return List<Commit> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoDeleteKey(String owner, String repo, Long id) throws ApiException { - repoDeleteKeyWithHttpInfo(owner, repo, id); + public List repoGetAllCommits(String owner, String repo, String sha, Integer page) throws ApiException { + ApiResponse> resp = repoGetAllCommitsWithHttpInfo(owner, repo, sha, page); + return resp.getData(); } /** - * Delete a key from a repository + * Get a list of all commits from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to delete (required) - * @return ApiResponse<Void> + * @param sha SHA or branch to start listing commits from (usually 'master') (optional) + * @param page page number of requested commits (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 repoDeleteKeyWithHttpInfo(String owner, String repo, Long id) throws ApiException { - com.squareup.okhttp.Call call = repoDeleteKeyValidateBeforeCall(owner, repo, id, null, null); - return apiClient.execute(call); + public ApiResponse> repoGetAllCommitsWithHttpInfo(String owner, String repo, String sha, Integer page) throws ApiException { + com.squareup.okhttp.Call call = repoGetAllCommitsValidateBeforeCall(owner, repo, sha, page, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Delete a key from a repository (asynchronously) + * Get a list of all commits from a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to delete (required) + * @param sha SHA or branch to start listing commits from (usually 'master') (optional) + * @param page page number of requested commits (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 repoDeleteKeyAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetAllCommitsAsync(String owner, String repo, String sha, Integer page, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2144,28 +4780,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoDeleteKeyValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoGetAllCommitsValidateBeforeCall(owner, repo, sha, page, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoDeleteRelease + * Build call for repoGetArchive * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to delete (required) + * @param archive archive to download, consisting of a git reference and archive (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 repoDeleteReleaseCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetArchiveCall(String owner, String repo, String archive, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases/{id}" + String localVarPath = "/repos/{owner}/{repo}/archive/{archive}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + .replaceAll("\\{" + "archive" + "\\}", apiClient.escapeString(archive.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2175,7 +4812,7 @@ public com.squareup.okhttp.Call repoDeleteReleaseCall(String owner, String repo, Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { - "application/json", "text/html" + "application/json" }; final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); @@ -2199,70 +4836,70 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoDeleteReleaseValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetArchiveValidateBeforeCall(String owner, String repo, String archive, 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 repoDeleteRelease(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetArchive(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteRelease(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetArchive(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoDeleteRelease(Async)"); + // verify the required parameter 'archive' is set + if (archive == null) { + throw new ApiException("Missing the required parameter 'archive' when calling repoGetArchive(Async)"); } - com.squareup.okhttp.Call call = repoDeleteReleaseCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetArchiveCall(owner, repo, archive, progressListener, progressRequestListener); return call; } /** - * Delete a release + * Get an archive of a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to delete (required) + * @param archive archive to download, consisting of a git reference and archive (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoDeleteRelease(String owner, String repo, Long id) throws ApiException { - repoDeleteReleaseWithHttpInfo(owner, repo, id); + public void repoGetArchive(String owner, String repo, String archive) throws ApiException { + repoGetArchiveWithHttpInfo(owner, repo, archive); } /** - * Delete a release + * Get an archive of a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to delete (required) + * @param archive archive to download, consisting of a git reference and archive (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoDeleteReleaseWithHttpInfo(String owner, String repo, Long id) throws ApiException { - com.squareup.okhttp.Call call = repoDeleteReleaseValidateBeforeCall(owner, repo, id, null, null); + public ApiResponse repoGetArchiveWithHttpInfo(String owner, String repo, String archive) throws ApiException { + com.squareup.okhttp.Call call = repoGetArchiveValidateBeforeCall(owner, repo, archive, null, null); return apiClient.execute(call); } /** - * Delete a release (asynchronously) + * Get an archive of a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to delete (required) + * @param archive archive to download, consisting of a git reference and archive (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 repoDeleteReleaseAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetArchiveAsync(String owner, String repo, String archive, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2283,30 +4920,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoDeleteReleaseValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetArchiveValidateBeforeCall(owner, repo, archive, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /** - * Build call for repoDeleteReleaseAttachment + * Build call for repoGetBranch * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to delete (required) + * @param branch branch 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 repoDeleteReleaseAttachmentCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetBranchCall(String owner, String repo, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}" + String localVarPath = "/repos/{owner}/{repo}/branches/{branch}" .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())); + .replaceAll("\\{" + "branch" + "\\}", apiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -2340,78 +4975,73 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoDeleteReleaseAttachmentValidateBeforeCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetBranchValidateBeforeCall(String owner, String repo, String branch, 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 repoDeleteReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetBranch(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoDeleteReleaseAttachment(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoDeleteReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetBranch(Async)"); } - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { - throw new ApiException("Missing the required parameter 'attachmentId' when calling repoDeleteReleaseAttachment(Async)"); + // verify the required parameter 'branch' is set + if (branch == null) { + throw new ApiException("Missing the required parameter 'branch' when calling repoGetBranch(Async)"); } - com.squareup.okhttp.Call call = repoDeleteReleaseAttachmentCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetBranchCall(owner, repo, branch, progressListener, progressRequestListener); return call; } /** - * Delete a release attachment + * Retrieve a specific branch from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to delete (required) + * @param branch branch to get (required) + * @return Branch * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoDeleteReleaseAttachment(String owner, String repo, Long id, Long attachmentId) throws ApiException { - repoDeleteReleaseAttachmentWithHttpInfo(owner, repo, id, attachmentId); + public Branch repoGetBranch(String owner, String repo, String branch) throws ApiException { + ApiResponse resp = repoGetBranchWithHttpInfo(owner, repo, branch); + return resp.getData(); } /** - * Delete a release attachment + * Retrieve a specific branch from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to delete (required) - * @return ApiResponse<Void> + * @param branch branch to get (required) + * @return ApiResponse<Branch> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoDeleteReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId) throws ApiException { - com.squareup.okhttp.Call call = repoDeleteReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, null, null); - return apiClient.execute(call); + public ApiResponse repoGetBranchWithHttpInfo(String owner, String repo, String branch) throws ApiException { + com.squareup.okhttp.Call call = repoGetBranchValidateBeforeCall(owner, repo, branch, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Delete a release attachment (asynchronously) + * Retrieve a specific branch from a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to delete (required) + * @param branch branch 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 repoDeleteReleaseAttachmentAsync(String owner, String repo, Long id, Long attachmentId, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetBranchAsync(String owner, String repo, String branch, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2432,28 +5062,24 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoDeleteReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoGetBranchValidateBeforeCall(owner, repo, branch, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoEditHook - * @param owner owner of the repo (required) - * @param repo name of the repo (required) - * @param id index of the hook (required) - * @param body (optional) + * Build call for repoGetByID + * @param id id of the repo 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 repoEditHookCall(String owner, String repo, Long id, EditHookOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call repoGetByIDCall(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}/hooks/{id}" - .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + String localVarPath = "/repositories/{id}" .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -2488,76 +5114,57 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoEditHookValidateBeforeCall(String owner, String repo, Long id, EditHookOption 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 repoEditHook(Async)"); - } - - // verify the required parameter 'repo' is set - if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoEditHook(Async)"); - } + private com.squareup.okhttp.Call repoGetByIDValidateBeforeCall(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 repoEditHook(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling repoGetByID(Async)"); } - com.squareup.okhttp.Call call = repoEditHookCall(owner, repo, id, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetByIDCall(id, progressListener, progressRequestListener); return call; } /** - * Edit a hook in a repository + * Get a repository by id * - * @param owner owner of the repo (required) - * @param repo name of the repo (required) - * @param id index of the hook (required) - * @param body (optional) - * @return List<Branch> + * @param id id of the repo to get (required) + * @return Repository * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoEditHook(String owner, String repo, Long id, EditHookOption body) throws ApiException { - ApiResponse> resp = repoEditHookWithHttpInfo(owner, repo, id, body); + public Repository repoGetByID(Long id) throws ApiException { + ApiResponse resp = repoGetByIDWithHttpInfo(id); return resp.getData(); } /** - * Edit a hook in a repository + * Get a repository by id * - * @param owner owner of the repo (required) - * @param repo name of the repo (required) - * @param id index of the hook (required) - * @param body (optional) - * @return ApiResponse<List<Branch>> + * @param id id of the repo to get (required) + * @return ApiResponse<Repository> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoEditHookWithHttpInfo(String owner, String repo, Long id, EditHookOption body) throws ApiException { - com.squareup.okhttp.Call call = repoEditHookValidateBeforeCall(owner, repo, id, body, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse repoGetByIDWithHttpInfo(Long id) throws ApiException { + com.squareup.okhttp.Call call = repoGetByIDValidateBeforeCall(id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Edit a hook in a repository (asynchronously) + * Get a repository by id (asynchronously) * - * @param owner owner of the repo (required) - * @param repo name of the repo (required) - * @param id index of the hook (required) - * @param body (optional) + * @param id id of the repo 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 repoEditHookAsync(String owner, String repo, Long id, EditHookOption body, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoGetByIDAsync(Long id, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2578,33 +5185,35 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoEditHookValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = repoGetByIDValidateBeforeCall(id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoEditPullRequest + * Build call for repoGetCombinedStatusByRef * @param owner owner of the repo (required) - * @param repo name of the repo (required) - * @param index index of the pull request to edit (required) - * @param body (optional) + * @param repo name of the repo (required) + * @param ref name of branch/tag/commit (required) + * @param page page number 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 repoEditPullRequestCall(String owner, String repo, Long index, EditPullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call repoGetCombinedStatusByRefCall(String owner, String repo, String ref, Integer page, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/pulls/{index}" + String localVarPath = "/repos/{owner}/{repo}/commits/{ref}/statuses" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + .replaceAll("\\{" + "ref" + "\\}", apiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); Map localVarHeaderParams = new HashMap(); @@ -2617,7 +5226,7 @@ public com.squareup.okhttp.Call repoEditPullRequestCall(String owner, String rep if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2635,76 +5244,76 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoEditPullRequestValidateBeforeCall(String owner, String repo, Long index, EditPullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetCombinedStatusByRefValidateBeforeCall(String owner, String repo, String ref, Integer page, 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 repoEditPullRequest(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetCombinedStatusByRef(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoEditPullRequest(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetCombinedStatusByRef(Async)"); } - // verify the required parameter 'index' is set - if (index == null) { - throw new ApiException("Missing the required parameter 'index' when calling repoEditPullRequest(Async)"); + // verify the required parameter 'ref' is set + if (ref == null) { + throw new ApiException("Missing the required parameter 'ref' when calling repoGetCombinedStatusByRef(Async)"); } - com.squareup.okhttp.Call call = repoEditPullRequestCall(owner, repo, index, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetCombinedStatusByRefCall(owner, repo, ref, page, progressListener, progressRequestListener); return call; } /** - * Update a pull request + * Get a commit's combined status, by branch/tag/commit reference * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to edit (required) - * @param body (optional) - * @return PullRequest + * @param ref name of branch/tag/commit (required) + * @param page page number of results (optional) + * @return Status * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public PullRequest repoEditPullRequest(String owner, String repo, Long index, EditPullRequestOption body) throws ApiException { - ApiResponse resp = repoEditPullRequestWithHttpInfo(owner, repo, index, body); + public Status repoGetCombinedStatusByRef(String owner, String repo, String ref, Integer page) throws ApiException { + ApiResponse resp = repoGetCombinedStatusByRefWithHttpInfo(owner, repo, ref, page); return resp.getData(); } /** - * Update a pull request + * Get a commit's combined status, by branch/tag/commit reference * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to edit (required) - * @param body (optional) - * @return ApiResponse<PullRequest> + * @param ref name of branch/tag/commit (required) + * @param page page number of results (optional) + * @return ApiResponse<Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoEditPullRequestWithHttpInfo(String owner, String repo, Long index, EditPullRequestOption body) throws ApiException { - com.squareup.okhttp.Call call = repoEditPullRequestValidateBeforeCall(owner, repo, index, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetCombinedStatusByRefWithHttpInfo(String owner, String repo, String ref, Integer page) throws ApiException { + com.squareup.okhttp.Call call = repoGetCombinedStatusByRefValidateBeforeCall(owner, repo, ref, page, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Update a pull request (asynchronously) + * Get a commit's combined status, by branch/tag/commit reference (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to edit (required) - * @param body (optional) + * @param ref name of branch/tag/commit (required) + * @param page page number 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 repoEditPullRequestAsync(String owner, String repo, Long index, EditPullRequestOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetCombinedStatusByRefAsync(String owner, String repo, String ref, Integer page, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2725,33 +5334,35 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoEditPullRequestValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetCombinedStatusByRefValidateBeforeCall(owner, repo, ref, page, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoEditRelease + * Build call for repoGetContents * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to edit (required) - * @param body (optional) + * @param filepath path of the dir, file, symlink or submodule in the repo (required) + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (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 repoEditReleaseCall(String owner, String repo, Long id, EditReleaseOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call repoGetContentsCall(String owner, String repo, String filepath, String ref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases/{id}" + String localVarPath = "/repos/{owner}/{repo}/contents/{filepath}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (ref != null) + localVarQueryParams.addAll(apiClient.parameterToPair("ref", ref)); Map localVarHeaderParams = new HashMap(); @@ -2764,7 +5375,7 @@ public com.squareup.okhttp.Call repoEditReleaseCall(String owner, String repo, L if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2782,76 +5393,76 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoEditReleaseValidateBeforeCall(String owner, String repo, Long id, EditReleaseOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetContentsValidateBeforeCall(String owner, String repo, String filepath, String ref, 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 repoEditRelease(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetContents(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoEditRelease(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetContents(Async)"); } - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoEditRelease(Async)"); + // verify the required parameter 'filepath' is set + if (filepath == null) { + throw new ApiException("Missing the required parameter 'filepath' when calling repoGetContents(Async)"); } - com.squareup.okhttp.Call call = repoEditReleaseCall(owner, repo, id, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetContentsCall(owner, repo, filepath, ref, progressListener, progressRequestListener); return call; } /** - * Update a release + * Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to edit (required) - * @param body (optional) - * @return Release + * @param filepath path of the dir, file, symlink or submodule in the repo (required) + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + * @return ContentsResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Release repoEditRelease(String owner, String repo, Long id, EditReleaseOption body) throws ApiException { - ApiResponse resp = repoEditReleaseWithHttpInfo(owner, repo, id, body); + public ContentsResponse repoGetContents(String owner, String repo, String filepath, String ref) throws ApiException { + ApiResponse resp = repoGetContentsWithHttpInfo(owner, repo, filepath, ref); return resp.getData(); } /** - * Update a release + * Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to edit (required) - * @param body (optional) - * @return ApiResponse<Release> + * @param filepath path of the dir, file, symlink or submodule in the repo (required) + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + * @return ApiResponse<ContentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoEditReleaseWithHttpInfo(String owner, String repo, Long id, EditReleaseOption body) throws ApiException { - com.squareup.okhttp.Call call = repoEditReleaseValidateBeforeCall(owner, repo, id, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetContentsWithHttpInfo(String owner, String repo, String filepath, String ref) throws ApiException { + com.squareup.okhttp.Call call = repoGetContentsValidateBeforeCall(owner, repo, filepath, ref, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Update a release (asynchronously) + * Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to edit (required) - * @param body (optional) + * @param filepath path of the dir, file, symlink or submodule in the repo (required) + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (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 repoEditReleaseAsync(String owner, String repo, Long id, EditReleaseOption body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetContentsAsync(String owner, String repo, String filepath, String ref, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -2872,35 +5483,33 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoEditReleaseValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetContentsValidateBeforeCall(owner, repo, filepath, ref, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoEditReleaseAttachment + * Build call for repoGetContentsList * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to edit (required) - * @param body (optional) + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (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 repoEditReleaseAttachmentCall(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = body; + public com.squareup.okhttp.Call repoGetContentsListCall(String owner, String repo, String ref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}" + String localVarPath = "/repos/{owner}/{repo}/contents" .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())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (ref != null) + localVarQueryParams.addAll(apiClient.parameterToPair("ref", ref)); Map localVarHeaderParams = new HashMap(); @@ -2913,7 +5522,7 @@ public com.squareup.okhttp.Call repoEditReleaseAttachmentCall(String owner, Stri if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept); final String[] localVarContentTypes = { - "application/json" + "application/json", "text/plain" }; final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); @@ -2931,84 +5540,68 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" }; - return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoEditReleaseAttachmentValidateBeforeCall(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetContentsListValidateBeforeCall(String owner, String repo, String ref, 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 repoEditReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetContentsList(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoEditReleaseAttachment(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoEditReleaseAttachment(Async)"); - } - - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { - throw new ApiException("Missing the required parameter 'attachmentId' when calling repoEditReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetContentsList(Async)"); } - com.squareup.okhttp.Call call = repoEditReleaseAttachmentCall(owner, repo, id, attachmentId, body, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetContentsListCall(owner, repo, ref, progressListener, progressRequestListener); return call; } /** - * Edit a release attachment + * Gets the metadata of all the entries of the root dir * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to edit (required) - * @param body (optional) - * @return Attachment + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + * @return List<ContentsResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Attachment repoEditReleaseAttachment(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body) throws ApiException { - ApiResponse resp = repoEditReleaseAttachmentWithHttpInfo(owner, repo, id, attachmentId, body); + public List repoGetContentsList(String owner, String repo, String ref) throws ApiException { + ApiResponse> resp = repoGetContentsListWithHttpInfo(owner, repo, ref); return resp.getData(); } /** - * Edit a release attachment + * Gets the metadata of all the entries of the root dir * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to edit (required) - * @param body (optional) - * @return ApiResponse<Attachment> + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (optional) + * @return ApiResponse<List<ContentsResponse>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoEditReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body) throws ApiException { - com.squareup.okhttp.Call call = repoEditReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, body, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> repoGetContentsListWithHttpInfo(String owner, String repo, String ref) throws ApiException { + com.squareup.okhttp.Call call = repoGetContentsListValidateBeforeCall(owner, repo, ref, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Edit a release attachment (asynchronously) + * Gets the metadata of all the entries of the root dir (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to edit (required) - * @param body (optional) + * @param ref The name of the commit/branch/tag. Default the repository’s default branch (usually master) (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 repoEditReleaseAttachmentAsync(String owner, String repo, Long id, Long attachmentId, EditAttachmentOptions body, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetContentsListAsync(String owner, String repo, String ref, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3029,27 +5622,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoEditReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, body, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetContentsListValidateBeforeCall(owner, repo, ref, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGet + * Build call for repoGetEditorConfig * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param filepath filepath of file 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 repoGetCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetEditorConfigCall(String owner, String repo, String filepath, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}" + String localVarPath = "/repos/{owner}/{repo}/editorconfig/{filepath}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3087,61 +5682,66 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetEditorConfigValidateBeforeCall(String owner, String repo, String filepath, 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 repoGet(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetEditorConfig(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGet(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetEditorConfig(Async)"); + } + + // verify the required parameter 'filepath' is set + if (filepath == null) { + throw new ApiException("Missing the required parameter 'filepath' when calling repoGetEditorConfig(Async)"); } - com.squareup.okhttp.Call call = repoGetCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetEditorConfigCall(owner, repo, filepath, progressListener, progressRequestListener); return call; } /** - * Get a repository + * Get the EditorConfig definitions of a file in a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return Repository + * @param filepath filepath of file to get (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Repository repoGet(String owner, String repo) throws ApiException { - ApiResponse resp = repoGetWithHttpInfo(owner, repo); - return resp.getData(); + public void repoGetEditorConfig(String owner, String repo, String filepath) throws ApiException { + repoGetEditorConfigWithHttpInfo(owner, repo, filepath); } /** - * Get a repository + * Get the EditorConfig definitions of a file in a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return ApiResponse<Repository> + * @param filepath filepath of file to get (required) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = repoGetValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + public ApiResponse repoGetEditorConfigWithHttpInfo(String owner, String repo, String filepath) throws ApiException { + com.squareup.okhttp.Call call = repoGetEditorConfigValidateBeforeCall(owner, repo, filepath, null, null); + return apiClient.execute(call); } /** - * Get a repository (asynchronously) + * Get the EditorConfig definitions of a file in a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param filepath filepath of file 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 repoGetAsync(String owner, String repo, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetEditorConfigAsync(String owner, String repo, String filepath, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3162,29 +5762,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); + com.squareup.okhttp.Call call = repoGetEditorConfigValidateBeforeCall(owner, repo, filepath, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); return call; } /** - * Build call for repoGetArchive + * Build call for repoGetGitHook * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param archive archive to download, consisting of a git reference and archive (required) + * @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 repoGetArchiveCall(String owner, String repo, String archive, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetGitHookCall(String owner, String repo, String id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/archive/{archive}" + String localVarPath = "/repos/{owner}/{repo}/hooks/git/{id}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "archive" + "\\}", apiClient.escapeString(archive.toString())); + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3222,66 +5821,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetArchiveValidateBeforeCall(String owner, String repo, String archive, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetGitHookValidateBeforeCall(String owner, String repo, String 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 repoGetArchive(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetGitHook(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetArchive(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetGitHook(Async)"); } - // verify the required parameter 'archive' is set - if (archive == null) { - throw new ApiException("Missing the required parameter 'archive' when calling repoGetArchive(Async)"); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoGetGitHook(Async)"); } - com.squareup.okhttp.Call call = repoGetArchiveCall(owner, repo, archive, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetGitHookCall(owner, repo, id, progressListener, progressRequestListener); return call; } /** - * Get an archive of a repository + * Get a Git hook * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param archive archive to download, consisting of a git reference and archive (required) + * @param id id of the hook to get (required) + * @return GitHook * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoGetArchive(String owner, String repo, String archive) throws ApiException { - repoGetArchiveWithHttpInfo(owner, repo, archive); + public GitHook repoGetGitHook(String owner, String repo, String id) throws ApiException { + ApiResponse resp = repoGetGitHookWithHttpInfo(owner, repo, id); + return resp.getData(); } /** - * Get an archive of a repository + * Get a Git hook * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param archive archive to download, consisting of a git reference and archive (required) - * @return ApiResponse<Void> + * @param id id of the hook to get (required) + * @return ApiResponse<GitHook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetArchiveWithHttpInfo(String owner, String repo, String archive) throws ApiException { - com.squareup.okhttp.Call call = repoGetArchiveValidateBeforeCall(owner, repo, archive, null, null); - return apiClient.execute(call); + public ApiResponse repoGetGitHookWithHttpInfo(String owner, String repo, String id) throws ApiException { + com.squareup.okhttp.Call call = repoGetGitHookValidateBeforeCall(owner, repo, id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Get an archive of a repository (asynchronously) + * Get a Git hook (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param archive archive to download, consisting of a git reference and archive (required) + * @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 repoGetArchiveAsync(String owner, String repo, String archive, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetGitHookAsync(String owner, String repo, String id, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3302,28 +5904,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetArchiveValidateBeforeCall(owner, repo, archive, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoGetGitHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetBranch + * Build call for repoGetHook * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param branch branch to get (required) + * @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 repoGetBranchCall(String owner, String repo, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetHookCall(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}/branches/{branch}" + String localVarPath = "/repos/{owner}/{repo}/hooks/{id}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "branch" + "\\}", apiClient.escapeString(branch.toString())); + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3361,69 +5964,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetBranchValidateBeforeCall(String owner, String repo, String branch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetHookValidateBeforeCall(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 repoGetBranch(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetHook(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetBranch(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetHook(Async)"); } - // verify the required parameter 'branch' is set - if (branch == null) { - throw new ApiException("Missing the required parameter 'branch' when calling repoGetBranch(Async)"); + // verify the required parameter 'id' is set + if (id == null) { + throw new ApiException("Missing the required parameter 'id' when calling repoGetHook(Async)"); } - com.squareup.okhttp.Call call = repoGetBranchCall(owner, repo, branch, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetHookCall(owner, repo, id, progressListener, progressRequestListener); return call; } /** - * Retrieve a specific branch from a repository + * Get a hook * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param branch branch to get (required) - * @return Branch + * @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 Branch repoGetBranch(String owner, String repo, String branch) throws ApiException { - ApiResponse resp = repoGetBranchWithHttpInfo(owner, repo, branch); + public Hook repoGetHook(String owner, String repo, Long id) throws ApiException { + ApiResponse resp = repoGetHookWithHttpInfo(owner, repo, id); return resp.getData(); } /** - * Retrieve a specific branch from a repository + * Get a hook * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param branch branch to get (required) - * @return ApiResponse<Branch> + * @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 repoGetBranchWithHttpInfo(String owner, String repo, String branch) throws ApiException { - com.squareup.okhttp.Call call = repoGetBranchValidateBeforeCall(owner, repo, branch, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetHookWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = repoGetHookValidateBeforeCall(owner, repo, id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Retrieve a specific branch from a repository (asynchronously) + * Get a hook (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param branch branch to get (required) + * @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 repoGetBranchAsync(String owner, String repo, String branch, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetHookAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3444,24 +6047,28 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetBranchValidateBeforeCall(owner, repo, branch, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetByID - * @param id id of the repo to get (required) + * Build call for repoGetKey + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key 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 repoGetByIDCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetKeyCall(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 = "/repositories/{id}" + String localVarPath = "/repos/{owner}/{repo}/keys/{id}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); List localVarQueryParams = new ArrayList(); @@ -3500,53 +6107,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetByIDValidateBeforeCall(Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetKeyValidateBeforeCall(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 repoGetKey(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoGetKey(Async)"); + } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoGetByID(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling repoGetKey(Async)"); } - com.squareup.okhttp.Call call = repoGetByIDCall(id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetKeyCall(owner, repo, id, progressListener, progressRequestListener); return call; } /** - * Get a repository by id + * Get a repository's key by id * - * @param id id of the repo to get (required) - * @return Repository + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key to get (required) + * @return DeployKey * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Repository repoGetByID(Long id) throws ApiException { - ApiResponse resp = repoGetByIDWithHttpInfo(id); + public DeployKey repoGetKey(String owner, String repo, Long id) throws ApiException { + ApiResponse resp = repoGetKeyWithHttpInfo(owner, repo, id); return resp.getData(); } /** - * Get a repository by id + * Get a repository's key by id * - * @param id id of the repo to get (required) - * @return ApiResponse<Repository> + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key to get (required) + * @return ApiResponse<DeployKey> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetByIDWithHttpInfo(Long id) throws ApiException { - com.squareup.okhttp.Call call = repoGetByIDValidateBeforeCall(id, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetKeyWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = repoGetKeyValidateBeforeCall(owner, repo, id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a repository by id (asynchronously) + * Get a repository's key by id (asynchronously) * - * @param id id of the repo to get (required) + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param id id of the key 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 repoGetByIDAsync(Long id, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetKeyAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3567,29 +6190,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetByIDValidateBeforeCall(id, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetKeyValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetCombinedStatusByRef + * Build call for repoGetPullRequest * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param ref name of branch/tag/commit (required) + * @param index index of the pull request 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 repoGetCombinedStatusByRefCall(String owner, String repo, String ref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetPullRequestCall(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}/commits/{ref}/statuses" + String localVarPath = "/repos/{owner}/{repo}/pulls/{index}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "ref" + "\\}", apiClient.escapeString(ref.toString())); + .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -3627,69 +6250,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetCombinedStatusByRefValidateBeforeCall(String owner, String repo, String ref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetPullRequestValidateBeforeCall(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 repoGetCombinedStatusByRef(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetPullRequest(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetCombinedStatusByRef(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetPullRequest(Async)"); } - // verify the required parameter 'ref' is set - if (ref == null) { - throw new ApiException("Missing the required parameter 'ref' when calling repoGetCombinedStatusByRef(Async)"); + // verify the required parameter 'index' is set + if (index == null) { + throw new ApiException("Missing the required parameter 'index' when calling repoGetPullRequest(Async)"); } - com.squareup.okhttp.Call call = repoGetCombinedStatusByRefCall(owner, repo, ref, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetPullRequestCall(owner, repo, index, progressListener, progressRequestListener); return call; } /** - * Get a commit's combined status, by branch/tag/commit reference + * Get a pull request * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param ref name of branch/tag/commit (required) - * @return Status + * @param index index of the pull request to get (required) + * @return PullRequest * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Status repoGetCombinedStatusByRef(String owner, String repo, String ref) throws ApiException { - ApiResponse resp = repoGetCombinedStatusByRefWithHttpInfo(owner, repo, ref); + public PullRequest repoGetPullRequest(String owner, String repo, Long index) throws ApiException { + ApiResponse resp = repoGetPullRequestWithHttpInfo(owner, repo, index); return resp.getData(); } /** - * Get a commit's combined status, by branch/tag/commit reference + * Get a pull request * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param ref name of branch/tag/commit (required) - * @return ApiResponse<Status> + * @param index index of the pull request to get (required) + * @return ApiResponse<PullRequest> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetCombinedStatusByRefWithHttpInfo(String owner, String repo, String ref) throws ApiException { - com.squareup.okhttp.Call call = repoGetCombinedStatusByRefValidateBeforeCall(owner, repo, ref, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetPullRequestWithHttpInfo(String owner, String repo, Long index) throws ApiException { + com.squareup.okhttp.Call call = repoGetPullRequestValidateBeforeCall(owner, repo, index, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a commit's combined status, by branch/tag/commit reference (asynchronously) + * Get a pull request (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param ref name of branch/tag/commit (required) + * @param index index of the pull request 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 repoGetCombinedStatusByRefAsync(String owner, String repo, String ref, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetPullRequestAsync(String owner, String repo, Long index, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3710,26 +6333,26 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetCombinedStatusByRefValidateBeforeCall(owner, repo, ref, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetPullRequestValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetEditorConfig + * Build call for repoGetRawFile * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of file to get (required) + * @param filepath filepath of the file 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 repoGetEditorConfigCall(String owner, String repo, String filepath, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetRawFileCall(String owner, String repo, String filepath, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/editorconfig/{filepath}" + String localVarPath = "/repos/{owner}/{repo}/raw/{filepath}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.toString())); @@ -3770,66 +6393,66 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetEditorConfigValidateBeforeCall(String owner, String repo, String filepath, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetRawFileValidateBeforeCall(String owner, String repo, String filepath, 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 repoGetEditorConfig(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetRawFile(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetEditorConfig(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetRawFile(Async)"); } // verify the required parameter 'filepath' is set if (filepath == null) { - throw new ApiException("Missing the required parameter 'filepath' when calling repoGetEditorConfig(Async)"); + throw new ApiException("Missing the required parameter 'filepath' when calling repoGetRawFile(Async)"); } - com.squareup.okhttp.Call call = repoGetEditorConfigCall(owner, repo, filepath, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetRawFileCall(owner, repo, filepath, progressListener, progressRequestListener); return call; } /** - * Get the EditorConfig definitions of a file in a repository + * Get a file from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of file to get (required) + * @param filepath filepath of the file to get (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoGetEditorConfig(String owner, String repo, String filepath) throws ApiException { - repoGetEditorConfigWithHttpInfo(owner, repo, filepath); + public void repoGetRawFile(String owner, String repo, String filepath) throws ApiException { + repoGetRawFileWithHttpInfo(owner, repo, filepath); } /** - * Get the EditorConfig definitions of a file in a repository + * Get a file from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of file to get (required) + * @param filepath filepath of the file to get (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetEditorConfigWithHttpInfo(String owner, String repo, String filepath) throws ApiException { - com.squareup.okhttp.Call call = repoGetEditorConfigValidateBeforeCall(owner, repo, filepath, null, null); + public ApiResponse repoGetRawFileWithHttpInfo(String owner, String repo, String filepath) throws ApiException { + com.squareup.okhttp.Call call = repoGetRawFileValidateBeforeCall(owner, repo, filepath, null, null); return apiClient.execute(call); } /** - * Get the EditorConfig definitions of a file in a repository (asynchronously) + * Get a file from a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of file to get (required) + * @param filepath filepath of the file 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 repoGetEditorConfigAsync(String owner, String repo, String filepath, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetRawFileAsync(String owner, String repo, String filepath, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3850,25 +6473,25 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetEditorConfigValidateBeforeCall(owner, repo, filepath, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetRawFileValidateBeforeCall(owner, repo, filepath, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } /** - * Build call for repoGetHook + * Build call for repoGetRelease * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to get (required) + * @param id id of the release 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 repoGetHookCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetReleaseCall(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}/hooks/{id}" + String localVarPath = "/repos/{owner}/{repo}/releases/{id}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); @@ -3909,69 +6532,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetHookValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetReleaseValidateBeforeCall(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 repoGetHook(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetRelease(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetHook(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetRelease(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoGetHook(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling repoGetRelease(Async)"); } - com.squareup.okhttp.Call call = repoGetHookCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetReleaseCall(owner, repo, id, progressListener, progressRequestListener); return call; } /** - * Get a hook + * Get a release * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to get (required) - * @return List<Branch> + * @param id id of the release to get (required) + * @return Release * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoGetHook(String owner, String repo, Long id) throws ApiException { - ApiResponse> resp = repoGetHookWithHttpInfo(owner, repo, id); + public Release repoGetRelease(String owner, String repo, Long id) throws ApiException { + ApiResponse resp = repoGetReleaseWithHttpInfo(owner, repo, id); return resp.getData(); } /** - * Get a hook + * Get a release * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to get (required) - * @return ApiResponse<List<Branch>> + * @param id id of the release to get (required) + * @return ApiResponse<Release> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoGetHookWithHttpInfo(String owner, String repo, Long id) throws ApiException { - com.squareup.okhttp.Call call = repoGetHookValidateBeforeCall(owner, repo, id, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse repoGetReleaseWithHttpInfo(String owner, String repo, Long id) throws ApiException { + com.squareup.okhttp.Call call = repoGetReleaseValidateBeforeCall(owner, repo, id, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a hook (asynchronously) + * Get a release (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the hook to get (required) + * @param id id of the release 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 repoGetHookAsync(String owner, String repo, Long id, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoGetReleaseAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -3992,29 +6615,31 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetHookValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = repoGetReleaseValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetKey + * Build call for repoGetReleaseAttachment * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to get (required) + * @param id id of the release (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 repoGetKeyCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetReleaseAttachmentCall(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}/keys/{id}" + String localVarPath = "/repos/{owner}/{repo}/releases/{id}/assets/{attachment_id}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())) + .replaceAll("\\{" + "attachment_id" + "\\}", apiClient.escapeString(attachmentId.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4052,69 +6677,77 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetKeyValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetReleaseAttachmentValidateBeforeCall(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 repoGetKey(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetReleaseAttachment(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetKey(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetReleaseAttachment(Async)"); } // verify the required parameter 'id' is set if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoGetKey(Async)"); + throw new ApiException("Missing the required parameter 'id' when calling repoGetReleaseAttachment(Async)"); + } + + // verify the required parameter 'attachmentId' is set + if (attachmentId == null) { + throw new ApiException("Missing the required parameter 'attachmentId' when calling repoGetReleaseAttachment(Async)"); } - com.squareup.okhttp.Call call = repoGetKeyCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetReleaseAttachmentCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); return call; } /** - * Get a repository's key by id + * Get a release attachment * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to get (required) - * @return DeployKey + * @param id id of the release (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 DeployKey repoGetKey(String owner, String repo, Long id) throws ApiException { - ApiResponse resp = repoGetKeyWithHttpInfo(owner, repo, id); + public Attachment repoGetReleaseAttachment(String owner, String repo, Long id, Long attachmentId) throws ApiException { + ApiResponse resp = repoGetReleaseAttachmentWithHttpInfo(owner, repo, id, attachmentId); return resp.getData(); } /** - * Get a repository's key by id + * Get a release attachment * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to get (required) - * @return ApiResponse<DeployKey> + * @param id id of the release (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 repoGetKeyWithHttpInfo(String owner, String repo, Long id) throws ApiException { - com.squareup.okhttp.Call call = repoGetKeyValidateBeforeCall(owner, repo, id, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId) throws ApiException { + com.squareup.okhttp.Call call = repoGetReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a repository's key by id (asynchronously) + * Get a release attachment (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the key to get (required) + * @param id id of the release (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 repoGetKeyAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetReleaseAttachmentAsync(String owner, String repo, Long id, Long attachmentId, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4135,29 +6768,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetKeyValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetPullRequest + * Build call for repoGetSingleCommit * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to get (required) + * @param sha the commit hash (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 repoGetPullRequestCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoGetSingleCommitCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/pulls/{index}" + String localVarPath = "/repos/{owner}/{repo}/git/commits/{sha}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString())); + .replaceAll("\\{" + "sha" + "\\}", apiClient.escapeString(sha.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4195,69 +6828,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetPullRequestValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoGetSingleCommitValidateBeforeCall(String owner, String repo, String sha, 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 repoGetPullRequest(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoGetSingleCommit(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetPullRequest(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoGetSingleCommit(Async)"); } - // verify the required parameter 'index' is set - if (index == null) { - throw new ApiException("Missing the required parameter 'index' when calling repoGetPullRequest(Async)"); + // verify the required parameter 'sha' is set + if (sha == null) { + throw new ApiException("Missing the required parameter 'sha' when calling repoGetSingleCommit(Async)"); } - com.squareup.okhttp.Call call = repoGetPullRequestCall(owner, repo, index, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoGetSingleCommitCall(owner, repo, sha, progressListener, progressRequestListener); return call; } /** - * Get a pull request + * Get a single commit from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to get (required) - * @return PullRequest + * @param sha the commit hash (required) + * @return Commit * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public PullRequest repoGetPullRequest(String owner, String repo, Long index) throws ApiException { - ApiResponse resp = repoGetPullRequestWithHttpInfo(owner, repo, index); + public Commit repoGetSingleCommit(String owner, String repo, String sha) throws ApiException { + ApiResponse resp = repoGetSingleCommitWithHttpInfo(owner, repo, sha); return resp.getData(); } /** - * Get a pull request + * Get a single commit from a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to get (required) - * @return ApiResponse<PullRequest> + * @param sha the commit hash (required) + * @return ApiResponse<Commit> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetPullRequestWithHttpInfo(String owner, String repo, Long index) throws ApiException { - com.squareup.okhttp.Call call = repoGetPullRequestValidateBeforeCall(owner, repo, index, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse repoGetSingleCommitWithHttpInfo(String owner, String repo, String sha) throws ApiException { + com.squareup.okhttp.Call call = repoGetSingleCommitValidateBeforeCall(owner, repo, sha, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a pull request (asynchronously) + * Get a single commit from a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param index index of the pull request to get (required) + * @param sha the commit hash (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 repoGetPullRequestAsync(String owner, String repo, Long index, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoGetSingleCommitAsync(String owner, String repo, String sha, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4278,29 +6911,27 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetPullRequestValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoGetSingleCommitValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetRawFile + * Build call for repoListAllGitRefs * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of the file 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 repoGetRawFileCall(String owner, String repo, String filepath, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListAllGitRefsCall(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}/raw/{filepath}" + String localVarPath = "/repos/{owner}/{repo}/git/refs" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4338,66 +6969,61 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetRawFileValidateBeforeCall(String owner, String repo, String filepath, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListAllGitRefsValidateBeforeCall(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 repoGetRawFile(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoListAllGitRefs(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetRawFile(Async)"); - } - - // verify the required parameter 'filepath' is set - if (filepath == null) { - throw new ApiException("Missing the required parameter 'filepath' when calling repoGetRawFile(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoListAllGitRefs(Async)"); } - com.squareup.okhttp.Call call = repoGetRawFileCall(owner, repo, filepath, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListAllGitRefsCall(owner, repo, progressListener, progressRequestListener); return call; } /** - * Get a file from a repository + * Get specified ref or filtered repository's refs * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of the file to get (required) + * @return List<Reference> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoGetRawFile(String owner, String repo, String filepath) throws ApiException { - repoGetRawFileWithHttpInfo(owner, repo, filepath); + public List repoListAllGitRefs(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListAllGitRefsWithHttpInfo(owner, repo); + return resp.getData(); } /** - * Get a file from a repository + * Get specified ref or filtered repository's refs * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of the file to get (required) - * @return ApiResponse<Void> + * @return ApiResponse<List<Reference>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetRawFileWithHttpInfo(String owner, String repo, String filepath) throws ApiException { - com.squareup.okhttp.Call call = repoGetRawFileValidateBeforeCall(owner, repo, filepath, null, null); - return apiClient.execute(call); + public ApiResponse> repoListAllGitRefsWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListAllGitRefsValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); } /** - * Get a file from a repository (asynchronously) + * Get specified ref or filtered repository's refs (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param filepath filepath of the file 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 repoGetRawFileAsync(String owner, String repo, String filepath, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoListAllGitRefsAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4418,28 +7044,27 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetRawFileValidateBeforeCall(owner, repo, filepath, progressListener, progressRequestListener); - apiClient.executeAsync(call, callback); + com.squareup.okhttp.Call call = repoListAllGitRefsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetRelease + * Build call for repoListBranches * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release 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 repoGetReleaseCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListBranchesCall(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}/releases/{id}" + String localVarPath = "/repos/{owner}/{repo}/branches" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) - .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4477,69 +7102,61 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetReleaseValidateBeforeCall(String owner, String repo, Long id, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListBranchesValidateBeforeCall(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 repoGetRelease(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoListBranches(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetRelease(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoGetRelease(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoListBranches(Async)"); } - com.squareup.okhttp.Call call = repoGetReleaseCall(owner, repo, id, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListBranchesCall(owner, repo, progressListener, progressRequestListener); return call; } /** - * Get a release + * List a repository's branches * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to get (required) - * @return Release + * @return List<Branch> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Release repoGetRelease(String owner, String repo, Long id) throws ApiException { - ApiResponse resp = repoGetReleaseWithHttpInfo(owner, repo, id); + public List repoListBranches(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListBranchesWithHttpInfo(owner, repo); return resp.getData(); } /** - * Get a release + * List a repository's branches * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release to get (required) - * @return ApiResponse<Release> + * @return ApiResponse<List<Branch>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetReleaseWithHttpInfo(String owner, String repo, Long id) throws ApiException { - com.squareup.okhttp.Call call = repoGetReleaseValidateBeforeCall(owner, repo, id, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> repoListBranchesWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListBranchesValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a release (asynchronously) + * List a repository's branches (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release 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 repoGetReleaseAsync(String owner, String repo, Long id, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoListBranchesAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4560,31 +7177,27 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetReleaseValidateBeforeCall(owner, repo, id, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoListBranchesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoGetReleaseAttachment + * Build call for repoListCollaborators * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (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 repoGetReleaseAttachmentCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListCollaboratorsCall(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}/releases/{id}/assets/{attachment_id}" + String localVarPath = "/repos/{owner}/{repo}/collaborators" .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())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4622,77 +7235,61 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoGetReleaseAttachmentValidateBeforeCall(String owner, String repo, Long id, Long attachmentId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListCollaboratorsValidateBeforeCall(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 repoGetReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoListCollaborators(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoGetReleaseAttachment(Async)"); - } - - // verify the required parameter 'id' is set - if (id == null) { - throw new ApiException("Missing the required parameter 'id' when calling repoGetReleaseAttachment(Async)"); - } - - // verify the required parameter 'attachmentId' is set - if (attachmentId == null) { - throw new ApiException("Missing the required parameter 'attachmentId' when calling repoGetReleaseAttachment(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoListCollaborators(Async)"); } - com.squareup.okhttp.Call call = repoGetReleaseAttachmentCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListCollaboratorsCall(owner, repo, progressListener, progressRequestListener); return call; } /** - * Get a release attachment + * List a repository's collaborators * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to get (required) - * @return Attachment + * @return List<User> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Attachment repoGetReleaseAttachment(String owner, String repo, Long id, Long attachmentId) throws ApiException { - ApiResponse resp = repoGetReleaseAttachmentWithHttpInfo(owner, repo, id, attachmentId); + public List repoListCollaborators(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListCollaboratorsWithHttpInfo(owner, repo); return resp.getData(); } /** - * Get a release attachment + * List a repository's collaborators * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (required) - * @param attachmentId id of the attachment to get (required) - * @return ApiResponse<Attachment> + * @return ApiResponse<List<User>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoGetReleaseAttachmentWithHttpInfo(String owner, String repo, Long id, Long attachmentId) throws ApiException { - com.squareup.okhttp.Call call = repoGetReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + public ApiResponse> repoListCollaboratorsWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListCollaboratorsValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * Get a release attachment (asynchronously) + * List a repository's collaborators (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @param id id of the release (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 repoGetReleaseAttachmentAsync(String owner, String repo, Long id, Long attachmentId, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoListCollaboratorsAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4713,13 +7310,13 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoGetReleaseAttachmentValidateBeforeCall(owner, repo, id, attachmentId, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + com.squareup.okhttp.Call call = repoListCollaboratorsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoListBranches + * Build call for repoListGitHooks * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param progressListener Progress listener @@ -4727,11 +7324,11 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call repoListBranchesCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListGitHooksCall(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}/branches" + String localVarPath = "/repos/{owner}/{repo}/hooks/git" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); @@ -4771,53 +7368,53 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoListBranchesValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListGitHooksValidateBeforeCall(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 repoListBranches(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoListGitHooks(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoListBranches(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoListGitHooks(Async)"); } - com.squareup.okhttp.Call call = repoListBranchesCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListGitHooksCall(owner, repo, progressListener, progressRequestListener); return call; } /** - * List a repository's branches + * List the Git hooks in a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return List<Branch> + * @return List<GitHook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoListBranches(String owner, String repo) throws ApiException { - ApiResponse> resp = repoListBranchesWithHttpInfo(owner, repo); + public List repoListGitHooks(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListGitHooksWithHttpInfo(owner, repo); return resp.getData(); } /** - * List a repository's branches + * List the Git hooks in a repository * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<List<GitHook>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoListBranchesWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = repoListBranchesValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> repoListGitHooksWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListGitHooksValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * List a repository's branches (asynchronously) + * List the Git hooks in a repository (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -4825,7 +7422,7 @@ public ApiResponse> repoListBranchesWithHttpInfo(String owner, Stri * @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 repoListBranchesAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoListGitHooksAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4846,27 +7443,29 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoListBranchesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = repoListGitHooksValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } /** - * Build call for repoListCollaborators + * Build call for repoListGitRefs * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param ref part or full name of the ref (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 repoListCollaboratorsCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListGitRefsCall(String owner, String repo, String ref, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables - String localVarPath = "/repos/{owner}/{repo}/collaborators" + String localVarPath = "/repos/{owner}/{repo}/git/refs/{ref}" .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) - .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())); + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "ref" + "\\}", apiClient.escapeString(ref.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); @@ -4904,61 +7503,69 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoListCollaboratorsValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListGitRefsValidateBeforeCall(String owner, String repo, String ref, 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 repoListCollaborators(Async)"); + throw new ApiException("Missing the required parameter 'owner' when calling repoListGitRefs(Async)"); } // verify the required parameter 'repo' is set if (repo == null) { - throw new ApiException("Missing the required parameter 'repo' when calling repoListCollaborators(Async)"); + throw new ApiException("Missing the required parameter 'repo' when calling repoListGitRefs(Async)"); + } + + // verify the required parameter 'ref' is set + if (ref == null) { + throw new ApiException("Missing the required parameter 'ref' when calling repoListGitRefs(Async)"); } - com.squareup.okhttp.Call call = repoListCollaboratorsCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListGitRefsCall(owner, repo, ref, progressListener, progressRequestListener); return call; } /** - * List a repository's collaborators + * Get specified ref or filtered repository's refs * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return List<User> + * @param ref part or full name of the ref (required) + * @return List<Reference> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoListCollaborators(String owner, String repo) throws ApiException { - ApiResponse> resp = repoListCollaboratorsWithHttpInfo(owner, repo); + public List repoListGitRefs(String owner, String repo, String ref) throws ApiException { + ApiResponse> resp = repoListGitRefsWithHttpInfo(owner, repo, ref); return resp.getData(); } /** - * List a repository's collaborators + * Get specified ref or filtered repository's refs * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return ApiResponse<List<User>> + * @param ref part or full name of the ref (required) + * @return ApiResponse<List<Reference>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoListCollaboratorsWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = repoListCollaboratorsValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse> repoListGitRefsWithHttpInfo(String owner, String repo, String ref) throws ApiException { + com.squareup.okhttp.Call call = repoListGitRefsValidateBeforeCall(owner, repo, ref, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * List a repository's collaborators (asynchronously) + * Get specified ref or filtered repository's refs (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param ref part or full name of the ref (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 repoListCollaboratorsAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoListGitRefsAsync(String owner, String repo, String ref, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4979,8 +7586,8 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoListCollaboratorsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = repoListGitRefsValidateBeforeCall(owner, repo, ref, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -5060,11 +7667,11 @@ private com.squareup.okhttp.Call repoListHooksValidateBeforeCall(String owner, S * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return List<Branch> + * @return List<Hook> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoListHooks(String owner, String repo) throws ApiException { - ApiResponse> resp = repoListHooksWithHttpInfo(owner, repo); + public List repoListHooks(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListHooksWithHttpInfo(owner, repo); return resp.getData(); } @@ -5073,12 +7680,12 @@ public List repoListHooks(String owner, String repo) throws ApiException * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return ApiResponse<List<Branch>> + * @return ApiResponse<List<Hook>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoListHooksWithHttpInfo(String owner, String repo) throws ApiException { + public ApiResponse> repoListHooksWithHttpInfo(String owner, String repo) throws ApiException { com.squareup.okhttp.Call call = repoListHooksValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -5091,7 +7698,7 @@ public ApiResponse> repoListHooksWithHttpInfo(String owner, String * @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 repoListHooksAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoListHooksAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -5113,7 +7720,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = repoListHooksValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -5572,12 +8179,14 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * Build call for repoListReleases * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param page page wants to load (optional) + * @param perPage items count every page wants to load (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 repoListReleasesCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListReleasesCall(String owner, String repo, Integer page, Integer perPage, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -5587,6 +8196,10 @@ public com.squareup.okhttp.Call repoListReleasesCall(String owner, String repo, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (perPage != null) + localVarQueryParams.addAll(apiClient.parameterToPair("per_page", perPage)); Map localVarHeaderParams = new HashMap(); @@ -5621,7 +8234,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoListReleasesValidateBeforeCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListReleasesValidateBeforeCall(String owner, String repo, Integer page, Integer perPage, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -5634,7 +8247,7 @@ private com.squareup.okhttp.Call repoListReleasesValidateBeforeCall(String owner } - com.squareup.okhttp.Call call = repoListReleasesCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListReleasesCall(owner, repo, page, perPage, progressListener, progressRequestListener); return call; } @@ -5644,11 +8257,13 @@ private com.squareup.okhttp.Call repoListReleasesValidateBeforeCall(String owner * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param page page wants to load (optional) + * @param perPage items count every page wants to load (optional) * @return List<Release> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoListReleases(String owner, String repo) throws ApiException { - ApiResponse> resp = repoListReleasesWithHttpInfo(owner, repo); + public List repoListReleases(String owner, String repo, Integer page, Integer perPage) throws ApiException { + ApiResponse> resp = repoListReleasesWithHttpInfo(owner, repo, page, perPage); return resp.getData(); } @@ -5657,11 +8272,13 @@ public List repoListReleases(String owner, String repo) throws ApiExcep * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param page page wants to load (optional) + * @param perPage items count every page wants to load (optional) * @return ApiResponse<List<Release>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoListReleasesWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = repoListReleasesValidateBeforeCall(owner, repo, null, null); + public ApiResponse> repoListReleasesWithHttpInfo(String owner, String repo, Integer page, Integer perPage) throws ApiException { + com.squareup.okhttp.Call call = repoListReleasesValidateBeforeCall(owner, repo, page, perPage, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -5671,11 +8288,13 @@ public ApiResponse> repoListReleasesWithHttpInfo(String owner, Str * * @param owner owner of the repo (required) * @param repo name of the repo (required) + * @param page page wants to load (optional) + * @param perPage items count every page wants to load (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 repoListReleasesAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoListReleasesAsync(String owner, String repo, Integer page, Integer perPage, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -5696,7 +8315,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoListReleasesValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListReleasesValidateBeforeCall(owner, repo, page, perPage, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -5839,12 +8458,15 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha sha of the commit (required) + * @param page page number of results (optional) + * @param sort type of sort (optional) + * @param state type of state (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 repoListStatusesCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoListStatusesCall(String owner, String repo, String sha, Integer page, String sort, String state, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -5855,6 +8477,12 @@ public com.squareup.okhttp.Call repoListStatusesCall(String owner, String repo, List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); + if (page != null) + localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); + if (sort != null) + localVarQueryParams.addAll(apiClient.parameterToPair("sort", sort)); + if (state != null) + localVarQueryParams.addAll(apiClient.parameterToPair("state", state)); Map localVarHeaderParams = new HashMap(); @@ -5889,7 +8517,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoListStatusesValidateBeforeCall(String owner, String repo, String sha, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoListStatusesValidateBeforeCall(String owner, String repo, String sha, Integer page, String sort, String state, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -5907,7 +8535,7 @@ private com.squareup.okhttp.Call repoListStatusesValidateBeforeCall(String owner } - com.squareup.okhttp.Call call = repoListStatusesCall(owner, repo, sha, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListStatusesCall(owner, repo, sha, page, sort, state, progressListener, progressRequestListener); return call; } @@ -5918,11 +8546,14 @@ private com.squareup.okhttp.Call repoListStatusesValidateBeforeCall(String owner * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha sha of the commit (required) + * @param page page number of results (optional) + * @param sort type of sort (optional) + * @param state type of state (optional) * @return List<Status> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public List repoListStatuses(String owner, String repo, String sha) throws ApiException { - ApiResponse> resp = repoListStatusesWithHttpInfo(owner, repo, sha); + public List repoListStatuses(String owner, String repo, String sha, Integer page, String sort, String state) throws ApiException { + ApiResponse> resp = repoListStatusesWithHttpInfo(owner, repo, sha, page, sort, state); return resp.getData(); } @@ -5932,11 +8563,14 @@ public List repoListStatuses(String owner, String repo, String sha) thro * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha sha of the commit (required) + * @param page page number of results (optional) + * @param sort type of sort (optional) + * @param state type of state (optional) * @return ApiResponse<List<Status>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoListStatusesWithHttpInfo(String owner, String repo, String sha) throws ApiException { - com.squareup.okhttp.Call call = repoListStatusesValidateBeforeCall(owner, repo, sha, null, null); + public ApiResponse> repoListStatusesWithHttpInfo(String owner, String repo, String sha, Integer page, String sort, String state) throws ApiException { + com.squareup.okhttp.Call call = repoListStatusesValidateBeforeCall(owner, repo, sha, page, sort, state, null, null); Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -5947,11 +8581,14 @@ public ApiResponse> repoListStatusesWithHttpInfo(String owner, Stri * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param sha sha of the commit (required) + * @param page page number of results (optional) + * @param sort type of sort (optional) + * @param state type of state (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 repoListStatusesAsync(String owner, String repo, String sha, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoListStatusesAsync(String owner, String repo, String sha, Integer page, String sort, String state, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -5972,7 +8609,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoListStatusesValidateBeforeCall(owner, repo, sha, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoListStatusesValidateBeforeCall(owner, repo, sha, page, sort, state, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -6062,21 +8699,287 @@ public List repoListSubscribers(String owner, String repo) throws ApiExcep } /** - * List a repo's watchers + * List a repo's watchers + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<List<User>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> repoListSubscribersWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListSubscribersValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a repo's watchers (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 repoListSubscribersAsync(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 = repoListSubscribersValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoListTags + * @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 repoListTagsCall(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}/tags" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoListTagsValidateBeforeCall(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 repoListTags(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoListTags(Async)"); + } + + + com.squareup.okhttp.Call call = repoListTagsCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * List a repository's tags + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return List<Tag> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List repoListTags(String owner, String repo) throws ApiException { + ApiResponse> resp = repoListTagsWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * List a repository's tags + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return ApiResponse<List<Tag>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> repoListTagsWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListTagsValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List a repository's tags (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 repoListTagsAsync(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 = repoListTagsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoListTopics + * @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 repoListTopicsCall(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}/topics" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoListTopicsValidateBeforeCall(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 repoListTopics(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoListTopics(Async)"); + } + + + com.squareup.okhttp.Call call = repoListTopicsCall(owner, repo, progressListener, progressRequestListener); + return call; + + } + + /** + * Get list of topics that a repository has + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @return TopicName + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public TopicName repoListTopics(String owner, String repo) throws ApiException { + ApiResponse resp = repoListTopicsWithHttpInfo(owner, repo); + return resp.getData(); + } + + /** + * Get list of topics that a repository has * * @param owner owner of the repo (required) * @param repo name of the repo (required) - * @return ApiResponse<List<User>> + * @return ApiResponse<TopicName> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse> repoListSubscribersWithHttpInfo(String owner, String repo) throws ApiException { - com.squareup.okhttp.Call call = repoListSubscribersValidateBeforeCall(owner, repo, null, null); - Type localVarReturnType = new TypeToken>(){}.getType(); + public ApiResponse repoListTopicsWithHttpInfo(String owner, String repo) throws ApiException { + com.squareup.okhttp.Call call = repoListTopicsValidateBeforeCall(owner, repo, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } /** - * List a repo's watchers (asynchronously) + * Get list of topics that a repository has (asynchronously) * * @param owner owner of the repo (required) * @param repo name of the repo (required) @@ -6084,7 +8987,7 @@ public ApiResponse> repoListSubscribersWithHttpInfo(String owner, Str * @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 repoListSubscribersAsync(String owner, String repo, final ApiCallback> callback) throws ApiException { + public com.squareup.okhttp.Call repoListTopicsAsync(String owner, String repo, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -6105,8 +9008,8 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoListSubscribersValidateBeforeCall(owner, repo, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken>(){}.getType(); + com.squareup.okhttp.Call call = repoListTopicsValidateBeforeCall(owner, repo, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } @@ -6115,13 +9018,14 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param index index of the pull request to merge (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 repoMergePullRequestCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = null; + public com.squareup.okhttp.Call repoMergePullRequestCall(String owner, String repo, Long index, MergePullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; // create path and map variables String localVarPath = "/repos/{owner}/{repo}/pulls/{index}/merge" @@ -6165,7 +9069,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoMergePullRequestValidateBeforeCall(String owner, String repo, Long index, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoMergePullRequestValidateBeforeCall(String owner, String repo, Long index, MergePullRequestOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'owner' is set if (owner == null) { @@ -6183,7 +9087,7 @@ private com.squareup.okhttp.Call repoMergePullRequestValidateBeforeCall(String o } - com.squareup.okhttp.Call call = repoMergePullRequestCall(owner, repo, index, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoMergePullRequestCall(owner, repo, index, body, progressListener, progressRequestListener); return call; } @@ -6194,10 +9098,11 @@ private com.squareup.okhttp.Call repoMergePullRequestValidateBeforeCall(String o * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param index index of the pull request to merge (required) + * @param body (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public void repoMergePullRequest(String owner, String repo, Long index) throws ApiException { - repoMergePullRequestWithHttpInfo(owner, repo, index); + public void repoMergePullRequest(String owner, String repo, Long index, MergePullRequestOption body) throws ApiException { + repoMergePullRequestWithHttpInfo(owner, repo, index, body); } /** @@ -6206,11 +9111,12 @@ public void repoMergePullRequest(String owner, String repo, Long index) throws A * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param index index of the pull request to merge (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 repoMergePullRequestWithHttpInfo(String owner, String repo, Long index) throws ApiException { - com.squareup.okhttp.Call call = repoMergePullRequestValidateBeforeCall(owner, repo, index, null, null); + public ApiResponse repoMergePullRequestWithHttpInfo(String owner, String repo, Long index, MergePullRequestOption body) throws ApiException { + com.squareup.okhttp.Call call = repoMergePullRequestValidateBeforeCall(owner, repo, index, body, null, null); return apiClient.execute(call); } @@ -6220,11 +9126,12 @@ public ApiResponse repoMergePullRequestWithHttpInfo(String owner, String r * @param owner owner of the repo (required) * @param repo name of the repo (required) * @param index index of the pull request to merge (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 repoMergePullRequestAsync(String owner, String repo, Long index, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoMergePullRequestAsync(String owner, String repo, Long index, MergePullRequestOption body, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -6245,7 +9152,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoMergePullRequestValidateBeforeCall(owner, repo, index, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoMergePullRequestValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener); apiClient.executeAsync(call, callback); return call; } @@ -6637,7 +9544,11 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don /** * Build call for repoSearch * @param q keyword (optional) + * @param topic Limit search to repositories with keyword as topic (optional) + * @param includeDesc include search of keyword within repository description (optional) * @param uid search only for repos that the user with the given id owns or contributes to (optional) + * @param starredBy search only for repos that the user with the given id has starred (optional) + * @param _private include private repositories this user has access to (defaults to true) (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results, maximum page size is 50 (optional) * @param mode type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" (optional) @@ -6649,7 +9560,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don * @return Call to execute * @throws ApiException If fail to serialize the request body object */ - public com.squareup.okhttp.Call repoSearchCall(String q, Long uid, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + public com.squareup.okhttp.Call repoSearchCall(String q, Boolean topic, Boolean includeDesc, Long uid, Long starredBy, Boolean _private, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; // create path and map variables @@ -6659,8 +9570,16 @@ public com.squareup.okhttp.Call repoSearchCall(String q, Long uid, Integer page, List localVarCollectionQueryParams = new ArrayList(); if (q != null) localVarQueryParams.addAll(apiClient.parameterToPair("q", q)); + if (topic != null) + localVarQueryParams.addAll(apiClient.parameterToPair("topic", topic)); + if (includeDesc != null) + localVarQueryParams.addAll(apiClient.parameterToPair("includeDesc", includeDesc)); if (uid != null) localVarQueryParams.addAll(apiClient.parameterToPair("uid", uid)); + if (starredBy != null) + localVarQueryParams.addAll(apiClient.parameterToPair("starredBy", starredBy)); + if (_private != null) + localVarQueryParams.addAll(apiClient.parameterToPair("private", _private)); if (page != null) localVarQueryParams.addAll(apiClient.parameterToPair("page", page)); if (limit != null) @@ -6707,10 +9626,10 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call repoSearchValidateBeforeCall(String q, Long uid, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call repoSearchValidateBeforeCall(String q, Boolean topic, Boolean includeDesc, Long uid, Long starredBy, Boolean _private, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - com.squareup.okhttp.Call call = repoSearchCall(q, uid, page, limit, mode, exclusive, sort, order, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoSearchCall(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order, progressListener, progressRequestListener); return call; } @@ -6719,7 +9638,11 @@ private com.squareup.okhttp.Call repoSearchValidateBeforeCall(String q, Long uid * Search for repositories * * @param q keyword (optional) + * @param topic Limit search to repositories with keyword as topic (optional) + * @param includeDesc include search of keyword within repository description (optional) * @param uid search only for repos that the user with the given id owns or contributes to (optional) + * @param starredBy search only for repos that the user with the given id has starred (optional) + * @param _private include private repositories this user has access to (defaults to true) (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results, maximum page size is 50 (optional) * @param mode type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" (optional) @@ -6729,8 +9652,8 @@ private com.squareup.okhttp.Call repoSearchValidateBeforeCall(String q, Long uid * @return SearchResults * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public SearchResults repoSearch(String q, Long uid, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order) throws ApiException { - ApiResponse resp = repoSearchWithHttpInfo(q, uid, page, limit, mode, exclusive, sort, order); + public SearchResults repoSearch(String q, Boolean topic, Boolean includeDesc, Long uid, Long starredBy, Boolean _private, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order) throws ApiException { + ApiResponse resp = repoSearchWithHttpInfo(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order); return resp.getData(); } @@ -6738,7 +9661,11 @@ public SearchResults repoSearch(String q, Long uid, Integer page, Integer limit, * Search for repositories * * @param q keyword (optional) + * @param topic Limit search to repositories with keyword as topic (optional) + * @param includeDesc include search of keyword within repository description (optional) * @param uid search only for repos that the user with the given id owns or contributes to (optional) + * @param starredBy search only for repos that the user with the given id has starred (optional) + * @param _private include private repositories this user has access to (defaults to true) (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results, maximum page size is 50 (optional) * @param mode type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" (optional) @@ -6748,8 +9675,8 @@ public SearchResults repoSearch(String q, Long uid, Integer page, Integer limit, * @return ApiResponse<SearchResults> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse repoSearchWithHttpInfo(String q, Long uid, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order) throws ApiException { - com.squareup.okhttp.Call call = repoSearchValidateBeforeCall(q, uid, page, limit, mode, exclusive, sort, order, null, null); + public ApiResponse repoSearchWithHttpInfo(String q, Boolean topic, Boolean includeDesc, Long uid, Long starredBy, Boolean _private, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order) throws ApiException { + com.squareup.okhttp.Call call = repoSearchValidateBeforeCall(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order, null, null); Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -6758,7 +9685,11 @@ public ApiResponse repoSearchWithHttpInfo(String q, Long uid, Int * Search for repositories (asynchronously) * * @param q keyword (optional) + * @param topic Limit search to repositories with keyword as topic (optional) + * @param includeDesc include search of keyword within repository description (optional) * @param uid search only for repos that the user with the given id owns or contributes to (optional) + * @param starredBy search only for repos that the user with the given id has starred (optional) + * @param _private include private repositories this user has access to (defaults to true) (optional) * @param page page number of results to return (1-based) (optional) * @param limit page size of results, maximum page size is 50 (optional) * @param mode type of repository to search for. Supported values are \"fork\", \"source\", \"mirror\" and \"collaborative\" (optional) @@ -6769,7 +9700,7 @@ public ApiResponse repoSearchWithHttpInfo(String q, Long uid, Int * @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 repoSearchAsync(String q, Long uid, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call repoSearchAsync(String q, Boolean topic, Boolean includeDesc, Long uid, Long starredBy, Boolean _private, Integer page, Integer limit, String mode, Boolean exclusive, String sort, String order, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -6790,7 +9721,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = repoSearchValidateBeforeCall(q, uid, page, limit, mode, exclusive, sort, order, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = repoSearchValidateBeforeCall(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order, progressListener, progressRequestListener); Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; @@ -7067,6 +9998,291 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for repoUpdateFile + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to update (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 repoUpdateFileCall(String owner, String repo, String filepath, UpdateFileOptions 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/{filepath}" + .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString())) + .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString())) + .replaceAll("\\{" + "filepath" + "\\}", apiClient.escapeString(filepath.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", "Token" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoUpdateFileValidateBeforeCall(String owner, String repo, String filepath, UpdateFileOptions 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 repoUpdateFile(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoUpdateFile(Async)"); + } + + // verify the required parameter 'filepath' is set + if (filepath == null) { + throw new ApiException("Missing the required parameter 'filepath' when calling repoUpdateFile(Async)"); + } + + // verify the required parameter 'body' is set + if (body == null) { + throw new ApiException("Missing the required parameter 'body' when calling repoUpdateFile(Async)"); + } + + + com.squareup.okhttp.Call call = repoUpdateFileCall(owner, repo, filepath, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Update a file in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to update (required) + * @param body (required) + * @return FileResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public FileResponse repoUpdateFile(String owner, String repo, String filepath, UpdateFileOptions body) throws ApiException { + ApiResponse resp = repoUpdateFileWithHttpInfo(owner, repo, filepath, body); + return resp.getData(); + } + + /** + * Update a file in a repository + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to update (required) + * @param body (required) + * @return ApiResponse<FileResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse repoUpdateFileWithHttpInfo(String owner, String repo, String filepath, UpdateFileOptions body) throws ApiException { + com.squareup.okhttp.Call call = repoUpdateFileValidateBeforeCall(owner, repo, filepath, body, null, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * Update a file in a repository (asynchronously) + * + * @param owner owner of the repo (required) + * @param repo name of the repo (required) + * @param filepath path of the file to update (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 repoUpdateFileAsync(String owner, String repo, String filepath, UpdateFileOptions 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 = repoUpdateFileValidateBeforeCall(owner, repo, filepath, body, progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } + /** + * Build call for repoUpdateTopics + * @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 repoUpdateTopicsCall(String owner, String repo, RepoTopicOptions body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = body; + + // create path and map variables + String localVarPath = "/repos/{owner}/{repo}/topics" + .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", "Token" }; + return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call repoUpdateTopicsValidateBeforeCall(String owner, String repo, RepoTopicOptions 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 repoUpdateTopics(Async)"); + } + + // verify the required parameter 'repo' is set + if (repo == null) { + throw new ApiException("Missing the required parameter 'repo' when calling repoUpdateTopics(Async)"); + } + + + com.squareup.okhttp.Call call = repoUpdateTopicsCall(owner, repo, body, progressListener, progressRequestListener); + return call; + + } + + /** + * Replace list of topics for a repository + * + * @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 repoUpdateTopics(String owner, String repo, RepoTopicOptions body) throws ApiException { + repoUpdateTopicsWithHttpInfo(owner, repo, body); + } + + /** + * Replace list of topics for a repository + * + * @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 repoUpdateTopicsWithHttpInfo(String owner, String repo, RepoTopicOptions body) throws ApiException { + com.squareup.okhttp.Call call = repoUpdateTopicsValidateBeforeCall(owner, repo, body, null, null); + return apiClient.execute(call); + } + + /** + * Replace list of topics for a repository (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 repoUpdateTopicsAsync(String owner, String repo, RepoTopicOptions 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 = repoUpdateTopicsValidateBeforeCall(owner, repo, body, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); + return call; + } /** * Build call for topicSearch * @param q keywords to search (required) @@ -7136,11 +10352,11 @@ private com.squareup.okhttp.Call topicSearchValidateBeforeCall(String q, final P * search topics via keyword * * @param q keywords to search (required) - * @return Repository + * @return List<TopicResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public Repository topicSearch(String q) throws ApiException { - ApiResponse resp = topicSearchWithHttpInfo(q); + public List topicSearch(String q) throws ApiException { + ApiResponse> resp = topicSearchWithHttpInfo(q); return resp.getData(); } @@ -7148,12 +10364,12 @@ public Repository topicSearch(String q) throws ApiException { * search topics via keyword * * @param q keywords to search (required) - * @return ApiResponse<Repository> + * @return ApiResponse<List<TopicResponse>> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse topicSearchWithHttpInfo(String q) throws ApiException { + public ApiResponse> topicSearchWithHttpInfo(String q) throws ApiException { com.squareup.okhttp.Call call = topicSearchValidateBeforeCall(q, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -7165,7 +10381,7 @@ public ApiResponse topicSearchWithHttpInfo(String q) throws ApiExcep * @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 topicSearchAsync(String q, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call topicSearchAsync(String q, final ApiCallback> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -7187,7 +10403,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = topicSearchValidateBeforeCall(q, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken>(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } diff --git a/src/main/java/io/gitea/api/UserApi.java b/src/main/java/io/gitea/api/UserApi.java index 4d449b4..c82b388 100644 --- a/src/main/java/io/gitea/api/UserApi.java +++ b/src/main/java/io/gitea/api/UserApi.java @@ -28,7 +28,6 @@ import io.gitea.model.AccessToken; -import io.gitea.model.AccessTokenName; import io.gitea.model.CreateEmailOption; import io.gitea.model.CreateGPGKeyOption; import io.gitea.model.CreateKeyOption; @@ -36,12 +35,13 @@ import io.gitea.model.DeleteEmailOption; import io.gitea.model.Email; import io.gitea.model.GPGKey; +import io.gitea.model.InlineResponse2001; import io.gitea.model.PublicKey; import io.gitea.model.Repository; +import io.gitea.model.Team; import io.gitea.model.TrackedTime; import io.gitea.model.User; import io.gitea.model.UserHeatmapData; -import io.gitea.model.UserSearchList; import java.lang.reflect.Type; import java.util.ArrayList; @@ -434,14 +434,14 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don /** * Build call for userCreateToken * @param username username of user (required) - * @param accessTokenName (optional) + * @param accessToken (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, AccessTokenName accessTokenName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { - Object localVarPostBody = accessTokenName; + public com.squareup.okhttp.Call userCreateTokenCall(String username, AccessToken accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = accessToken; // create path and map variables String localVarPath = "/users/{username}/tokens" @@ -483,7 +483,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch } @SuppressWarnings("rawtypes") - private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String username, AccessTokenName accessTokenName, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String username, AccessToken accessToken, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { // verify the required parameter 'username' is set if (username == null) { @@ -491,7 +491,7 @@ private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String userna } - com.squareup.okhttp.Call call = userCreateTokenCall(username, accessTokenName, progressListener, progressRequestListener); + com.squareup.okhttp.Call call = userCreateTokenCall(username, accessToken, progressListener, progressRequestListener); return call; } @@ -500,39 +500,36 @@ private com.squareup.okhttp.Call userCreateTokenValidateBeforeCall(String userna * Create an access token * * @param username username of user (required) - * @param accessTokenName (optional) - * @return AccessToken + * @param accessToken (optional) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public AccessToken userCreateToken(String username, AccessTokenName accessTokenName) throws ApiException { - ApiResponse resp = userCreateTokenWithHttpInfo(username, accessTokenName); - return resp.getData(); + public void userCreateToken(String username, AccessToken accessToken) throws ApiException { + userCreateTokenWithHttpInfo(username, accessToken); } /** * Create an access token * * @param username username of user (required) - * @param accessTokenName (optional) - * @return ApiResponse<AccessToken> + * @param accessToken (optional) + * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse userCreateTokenWithHttpInfo(String username, AccessTokenName accessTokenName) throws ApiException { - com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessTokenName, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); - return apiClient.execute(call, localVarReturnType); + public ApiResponse userCreateTokenWithHttpInfo(String username, AccessToken accessToken) throws ApiException { + com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessToken, null, null); + return apiClient.execute(call); } /** * Create an access token (asynchronously) * * @param username username of user (required) - * @param accessTokenName (optional) + * @param accessToken (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, AccessTokenName accessTokenName, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call userCreateTokenAsync(String username, AccessToken accessToken, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -553,9 +550,8 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don }; } - com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessTokenName, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); - apiClient.executeAsync(call, localVarReturnType, callback); + com.squareup.okhttp.Call call = userCreateTokenValidateBeforeCall(username, accessToken, progressListener, progressRequestListener); + apiClient.executeAsync(call, callback); return call; } /** @@ -4634,6 +4630,119 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don apiClient.executeAsync(call, localVarReturnType, callback); return call; } + /** + * Build call for userListTeams + * @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 userListTeamsCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + Object localVarPostBody = null; + + // create path and map variables + String localVarPath = "/user/teams"; + + 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", "Token" }; + return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener); + } + + @SuppressWarnings("rawtypes") + private com.squareup.okhttp.Call userListTeamsValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { + + + com.squareup.okhttp.Call call = userListTeamsCall(progressListener, progressRequestListener); + return call; + + } + + /** + * List all the teams a user belongs to + * + * @return List<Team> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public List userListTeams() throws ApiException { + ApiResponse> resp = userListTeamsWithHttpInfo(); + return resp.getData(); + } + + /** + * List all the teams a user belongs to + * + * @return ApiResponse<List<Team>> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + */ + public ApiResponse> userListTeamsWithHttpInfo() throws ApiException { + com.squareup.okhttp.Call call = userListTeamsValidateBeforeCall(null, null); + Type localVarReturnType = new TypeToken>(){}.getType(); + return apiClient.execute(call, localVarReturnType); + } + + /** + * List all the teams a user belongs to (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 userListTeamsAsync(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 = userListTeamsValidateBeforeCall(progressListener, progressRequestListener); + Type localVarReturnType = new TypeToken>(){}.getType(); + apiClient.executeAsync(call, localVarReturnType, callback); + return call; + } /** * Build call for userSearch * @param q keyword (optional) @@ -4706,11 +4815,11 @@ private com.squareup.okhttp.Call userSearchValidateBeforeCall(String q, Long uid * @param q keyword (optional) * @param uid ID of the user to search for (optional) * @param limit maximum number of users to return (optional) - * @return UserSearchList + * @return InlineResponse2001 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public UserSearchList userSearch(String q, Long uid, Integer limit) throws ApiException { - ApiResponse resp = userSearchWithHttpInfo(q, uid, limit); + public InlineResponse2001 userSearch(String q, Long uid, Integer limit) throws ApiException { + ApiResponse resp = userSearchWithHttpInfo(q, uid, limit); return resp.getData(); } @@ -4720,12 +4829,12 @@ public UserSearchList userSearch(String q, Long uid, Integer limit) throws ApiEx * @param q keyword (optional) * @param uid ID of the user to search for (optional) * @param limit maximum number of users to return (optional) - * @return ApiResponse<UserSearchList> + * @return ApiResponse<InlineResponse2001> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body */ - public ApiResponse userSearchWithHttpInfo(String q, Long uid, Integer limit) throws ApiException { + public ApiResponse userSearchWithHttpInfo(String q, Long uid, Integer limit) throws ApiException { com.squareup.okhttp.Call call = userSearchValidateBeforeCall(q, uid, limit, null, null); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); return apiClient.execute(call, localVarReturnType); } @@ -4739,7 +4848,7 @@ public ApiResponse userSearchWithHttpInfo(String q, Long uid, In * @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 userSearchAsync(String q, Long uid, Integer limit, final ApiCallback callback) throws ApiException { + public com.squareup.okhttp.Call userSearchAsync(String q, Long uid, Integer limit, final ApiCallback callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; @@ -4761,7 +4870,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don } com.squareup.okhttp.Call call = userSearchValidateBeforeCall(q, uid, limit, progressListener, progressRequestListener); - Type localVarReturnType = new TypeToken(){}.getType(); + Type localVarReturnType = new TypeToken(){}.getType(); apiClient.executeAsync(call, localVarReturnType, callback); return call; } diff --git a/src/main/java/io/gitea/auth/ApiKeyAuth.java b/src/main/java/io/gitea/auth/ApiKeyAuth.java index 946cb10..68647d4 100644 --- a/src/main/java/io/gitea/auth/ApiKeyAuth.java +++ b/src/main/java/io/gitea/auth/ApiKeyAuth.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class ApiKeyAuth implements Authentication { private final String location; private final String paramName; diff --git a/src/main/java/io/gitea/auth/OAuth.java b/src/main/java/io/gitea/auth/OAuth.java index 88766e4..95c3614 100644 --- a/src/main/java/io/gitea/auth/OAuth.java +++ b/src/main/java/io/gitea/auth/OAuth.java @@ -18,7 +18,7 @@ import java.util.Map; import java.util.List; -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class OAuth implements Authentication { private String accessToken; diff --git a/src/main/java/io/gitea/model/APIError.java b/src/main/java/io/gitea/model/APIError.java new file mode 100644 index 0000000..2ffc94d --- /dev/null +++ b/src/main/java/io/gitea/model/APIError.java @@ -0,0 +1,118 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * APIError is an api error with a message + */ +@ApiModel(description = "APIError is an api error with a message") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class APIError { + @SerializedName("message") + private String message = null; + + @SerializedName("url") + private String url = null; + + public APIError 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 APIError 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; + } + APIError apIError = (APIError) o; + return Objects.equals(this.message, apIError.message) && + Objects.equals(this.url, apIError.url); + } + + @Override + public int hashCode() { + return Objects.hash(message, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class APIError {\n"); + + sb.append(" message: ").append(toIndentedString(message)).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/AccessToken.java b/src/main/java/io/gitea/model/AccessToken.java index d5f85e7..e33046c 100644 --- a/src/main/java/io/gitea/model/AccessToken.java +++ b/src/main/java/io/gitea/model/AccessToken.java @@ -14,6 +14,7 @@ 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; @@ -24,38 +25,13 @@ import java.io.IOException; /** - * AccessToken represents a API access token. + * AccessToken */ -@ApiModel(description = "AccessToken represents a API access token.") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class AccessToken { - @SerializedName("id") - private Long id = null; - @SerializedName("name") private String name = null; - @SerializedName("sha1") - private String sha1 = null; - - public AccessToken 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 AccessToken name(String name) { this.name = name; return this; @@ -65,7 +41,7 @@ public AccessToken name(String name) { * Get name * @return name **/ - @ApiModelProperty(value = "") + @ApiModelProperty(required = true, value = "") public String getName() { return name; } @@ -74,24 +50,6 @@ public void setName(String name) { this.name = name; } - public AccessToken sha1(String sha1) { - this.sha1 = sha1; - return this; - } - - /** - * Get sha1 - * @return sha1 - **/ - @ApiModelProperty(value = "") - public String getSha1() { - return sha1; - } - - public void setSha1(String sha1) { - this.sha1 = sha1; - } - @Override public boolean equals(java.lang.Object o) { @@ -102,14 +60,12 @@ public boolean equals(java.lang.Object o) { return false; } AccessToken accessToken = (AccessToken) o; - return Objects.equals(this.id, accessToken.id) && - Objects.equals(this.name, accessToken.name) && - Objects.equals(this.sha1, accessToken.sha1); + return Objects.equals(this.name, accessToken.name); } @Override public int hashCode() { - return Objects.hash(id, name, sha1); + return Objects.hash(name); } @@ -118,9 +74,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class AccessToken {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); - sb.append(" sha1: ").append(toIndentedString(sha1)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/AddCollaboratorOption.java b/src/main/java/io/gitea/model/AddCollaboratorOption.java index 50f1a19..04a5e78 100644 --- a/src/main/java/io/gitea/model/AddCollaboratorOption.java +++ b/src/main/java/io/gitea/model/AddCollaboratorOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * AddCollaboratorOption options when adding a user as a collaborator of a repository */ @ApiModel(description = "AddCollaboratorOption options when adding a user as a collaborator of a repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class AddCollaboratorOption { @SerializedName("permission") private String permission = null; diff --git a/src/main/java/io/gitea/model/AddTimeOption.java b/src/main/java/io/gitea/model/AddTimeOption.java index 478c47f..87ca941 100644 --- a/src/main/java/io/gitea/model/AddTimeOption.java +++ b/src/main/java/io/gitea/model/AddTimeOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * AddTimeOption options for adding time to an issue */ @ApiModel(description = "AddTimeOption options for adding time to an issue") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class AddTimeOption { @SerializedName("time") private Long time = null; diff --git a/src/main/java/io/gitea/model/AnnotatedTag.java b/src/main/java/io/gitea/model/AnnotatedTag.java new file mode 100644 index 0000000..c430338 --- /dev/null +++ b/src/main/java/io/gitea/model/AnnotatedTag.java @@ -0,0 +1,236 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.AnnotatedTagObject; +import io.gitea.model.CommitUser; +import io.gitea.model.PayloadCommitVerification; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * AnnotatedTag represents an annotated tag + */ +@ApiModel(description = "AnnotatedTag represents an annotated tag") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class AnnotatedTag { + @SerializedName("message") + private String message = null; + + @SerializedName("object") + private AnnotatedTagObject object = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("tag") + private String tag = null; + + @SerializedName("tagger") + private CommitUser tagger = null; + + @SerializedName("url") + private String url = null; + + @SerializedName("verification") + private PayloadCommitVerification verification = null; + + public AnnotatedTag 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 AnnotatedTag object(AnnotatedTagObject object) { + this.object = object; + return this; + } + + /** + * Get object + * @return object + **/ + @ApiModelProperty(value = "") + public AnnotatedTagObject getObject() { + return object; + } + + public void setObject(AnnotatedTagObject object) { + this.object = object; + } + + public AnnotatedTag sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public AnnotatedTag tag(String tag) { + this.tag = tag; + return this; + } + + /** + * Get tag + * @return tag + **/ + @ApiModelProperty(value = "") + public String getTag() { + return tag; + } + + public void setTag(String tag) { + this.tag = tag; + } + + public AnnotatedTag tagger(CommitUser tagger) { + this.tagger = tagger; + return this; + } + + /** + * Get tagger + * @return tagger + **/ + @ApiModelProperty(value = "") + public CommitUser getTagger() { + return tagger; + } + + public void setTagger(CommitUser tagger) { + this.tagger = tagger; + } + + public AnnotatedTag 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 AnnotatedTag 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; + } + AnnotatedTag annotatedTag = (AnnotatedTag) o; + return Objects.equals(this.message, annotatedTag.message) && + Objects.equals(this.object, annotatedTag.object) && + Objects.equals(this.sha, annotatedTag.sha) && + Objects.equals(this.tag, annotatedTag.tag) && + Objects.equals(this.tagger, annotatedTag.tagger) && + Objects.equals(this.url, annotatedTag.url) && + Objects.equals(this.verification, annotatedTag.verification); + } + + @Override + public int hashCode() { + return Objects.hash(message, object, sha, tag, tagger, url, verification); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotatedTag {\n"); + + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" tag: ").append(toIndentedString(tag)).append("\n"); + sb.append(" tagger: ").append(toIndentedString(tagger)).append("\n"); + sb.append(" url: ").append(toIndentedString(url)).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/AnnotatedTagObject.java b/src/main/java/io/gitea/model/AnnotatedTagObject.java new file mode 100644 index 0000000..49c0bd8 --- /dev/null +++ b/src/main/java/io/gitea/model/AnnotatedTagObject.java @@ -0,0 +1,141 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * AnnotatedTagObject contains meta information of the tag object + */ +@ApiModel(description = "AnnotatedTagObject contains meta information of the tag object") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class AnnotatedTagObject { + @SerializedName("sha") + private String sha = null; + + @SerializedName("type") + private String type = null; + + @SerializedName("url") + private String url = null; + + public AnnotatedTagObject sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public AnnotatedTagObject type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(value = "") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public AnnotatedTagObject 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; + } + AnnotatedTagObject annotatedTagObject = (AnnotatedTagObject) o; + return Objects.equals(this.sha, annotatedTagObject.sha) && + Objects.equals(this.type, annotatedTagObject.type) && + Objects.equals(this.url, annotatedTagObject.url); + } + + @Override + public int hashCode() { + return Objects.hash(sha, type, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnnotatedTagObject {\n"); + + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/Attachment.java b/src/main/java/io/gitea/model/Attachment.java index 996043f..65dae4a 100644 --- a/src/main/java/io/gitea/model/Attachment.java +++ b/src/main/java/io/gitea/model/Attachment.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * Attachment a generic attachment */ @ApiModel(description = "Attachment a generic attachment") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Attachment { @SerializedName("browser_download_url") private String browserDownloadUrl = null; diff --git a/src/main/java/io/gitea/model/Branch.java b/src/main/java/io/gitea/model/Branch.java index 763377c..c286c74 100644 --- a/src/main/java/io/gitea/model/Branch.java +++ b/src/main/java/io/gitea/model/Branch.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * Branch represents a repository branch */ @ApiModel(description = "Branch represents a repository branch") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Branch { @SerializedName("commit") private PayloadCommit commit = null; diff --git a/src/main/java/io/gitea/model/Comment.java b/src/main/java/io/gitea/model/Comment.java index 16540ab..62fa47f 100644 --- a/src/main/java/io/gitea/model/Comment.java +++ b/src/main/java/io/gitea/model/Comment.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * Comment represents a comment on a commit or issue */ @ApiModel(description = "Comment represents a comment on a commit or issue") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Comment { @SerializedName("body") private String body = null; @@ -46,6 +47,12 @@ public class Comment { @SerializedName("issue_url") private String issueUrl = null; + @SerializedName("original_author") + private String originalAuthor = null; + + @SerializedName("original_author_id") + private Long originalAuthorId = null; + @SerializedName("pull_request_url") private String pullRequestUrl = null; @@ -145,6 +152,42 @@ public void setIssueUrl(String issueUrl) { this.issueUrl = issueUrl; } + public Comment originalAuthor(String originalAuthor) { + this.originalAuthor = originalAuthor; + return this; + } + + /** + * Get originalAuthor + * @return originalAuthor + **/ + @ApiModelProperty(value = "") + public String getOriginalAuthor() { + return originalAuthor; + } + + public void setOriginalAuthor(String originalAuthor) { + this.originalAuthor = originalAuthor; + } + + public Comment originalAuthorId(Long originalAuthorId) { + this.originalAuthorId = originalAuthorId; + return this; + } + + /** + * Get originalAuthorId + * @return originalAuthorId + **/ + @ApiModelProperty(value = "") + public Long getOriginalAuthorId() { + return originalAuthorId; + } + + public void setOriginalAuthorId(Long originalAuthorId) { + this.originalAuthorId = originalAuthorId; + } + public Comment pullRequestUrl(String pullRequestUrl) { this.pullRequestUrl = pullRequestUrl; return this; @@ -214,6 +257,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.htmlUrl, comment.htmlUrl) && Objects.equals(this.id, comment.id) && Objects.equals(this.issueUrl, comment.issueUrl) && + Objects.equals(this.originalAuthor, comment.originalAuthor) && + Objects.equals(this.originalAuthorId, comment.originalAuthorId) && Objects.equals(this.pullRequestUrl, comment.pullRequestUrl) && Objects.equals(this.updatedAt, comment.updatedAt) && Objects.equals(this.user, comment.user); @@ -221,7 +266,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(body, createdAt, htmlUrl, id, issueUrl, pullRequestUrl, updatedAt, user); + return Objects.hash(body, createdAt, htmlUrl, id, issueUrl, originalAuthor, originalAuthorId, pullRequestUrl, updatedAt, user); } @@ -235,6 +280,8 @@ public String toString() { sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" issueUrl: ").append(toIndentedString(issueUrl)).append("\n"); + sb.append(" originalAuthor: ").append(toIndentedString(originalAuthor)).append("\n"); + sb.append(" originalAuthorId: ").append(toIndentedString(originalAuthorId)).append("\n"); sb.append(" pullRequestUrl: ").append(toIndentedString(pullRequestUrl)).append("\n"); sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).append("\n"); sb.append(" user: ").append(toIndentedString(user)).append("\n"); diff --git a/src/main/java/io/gitea/model/Commit.java b/src/main/java/io/gitea/model/Commit.java new file mode 100644 index 0000000..491a79b --- /dev/null +++ b/src/main/java/io/gitea/model/Commit.java @@ -0,0 +1,245 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.CommitMeta; +import io.gitea.model.RepoCommit; +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; + +/** + * Commit + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class Commit { + @SerializedName("author") + private User author = null; + + @SerializedName("commit") + private RepoCommit commit = null; + + @SerializedName("committer") + private User committer = null; + + @SerializedName("html_url") + private String htmlUrl = null; + + @SerializedName("parents") + private List parents = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("url") + private String url = null; + + public Commit author(User author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + **/ + @ApiModelProperty(value = "") + public User getAuthor() { + return author; + } + + public void setAuthor(User author) { + this.author = author; + } + + public Commit commit(RepoCommit commit) { + this.commit = commit; + return this; + } + + /** + * Get commit + * @return commit + **/ + @ApiModelProperty(value = "") + public RepoCommit getCommit() { + return commit; + } + + public void setCommit(RepoCommit commit) { + this.commit = commit; + } + + public Commit committer(User committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + **/ + @ApiModelProperty(value = "") + public User getCommitter() { + return committer; + } + + public void setCommitter(User committer) { + this.committer = committer; + } + + public Commit 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 Commit parents(List parents) { + this.parents = parents; + return this; + } + + public Commit addParentsItem(CommitMeta parentsItem) { + if (this.parents == null) { + this.parents = new ArrayList(); + } + this.parents.add(parentsItem); + return this; + } + + /** + * Get parents + * @return parents + **/ + @ApiModelProperty(value = "") + public List getParents() { + return parents; + } + + public void setParents(List parents) { + this.parents = parents; + } + + public Commit sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public Commit 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; + } + Commit commit = (Commit) o; + return Objects.equals(this.author, commit.author) && + Objects.equals(this.commit, commit.commit) && + Objects.equals(this.committer, commit.committer) && + Objects.equals(this.htmlUrl, commit.htmlUrl) && + Objects.equals(this.parents, commit.parents) && + Objects.equals(this.sha, commit.sha) && + Objects.equals(this.url, commit.url); + } + + @Override + public int hashCode() { + return Objects.hash(author, commit, committer, htmlUrl, parents, sha, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Commit {\n"); + + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" commit: ").append(toIndentedString(commit)).append("\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" parents: ").append(toIndentedString(parents)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).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/CommitMeta.java b/src/main/java/io/gitea/model/CommitMeta.java new file mode 100644 index 0000000..38b0c00 --- /dev/null +++ b/src/main/java/io/gitea/model/CommitMeta.java @@ -0,0 +1,117 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * CommitMeta + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class CommitMeta { + @SerializedName("sha") + private String sha = null; + + @SerializedName("url") + private String url = null; + + public CommitMeta sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public CommitMeta 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; + } + CommitMeta commitMeta = (CommitMeta) o; + return Objects.equals(this.sha, commitMeta.sha) && + Objects.equals(this.url, commitMeta.url); + } + + @Override + public int hashCode() { + return Objects.hash(sha, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitMeta {\n"); + + sb.append(" sha: ").append(toIndentedString(sha)).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/CommitUser.java b/src/main/java/io/gitea/model/CommitUser.java new file mode 100644 index 0000000..e3d2642 --- /dev/null +++ b/src/main/java/io/gitea/model/CommitUser.java @@ -0,0 +1,140 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * CommitUser + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class CommitUser { + @SerializedName("date") + private String date = null; + + @SerializedName("email") + private String email = null; + + @SerializedName("name") + private String name = null; + + public CommitUser date(String date) { + this.date = date; + return this; + } + + /** + * Get date + * @return date + **/ + @ApiModelProperty(value = "") + public String getDate() { + return date; + } + + public void setDate(String date) { + this.date = date; + } + + public CommitUser 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 CommitUser 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; + } + CommitUser commitUser = (CommitUser) o; + return Objects.equals(this.date, commitUser.date) && + Objects.equals(this.email, commitUser.email) && + Objects.equals(this.name, commitUser.name); + } + + @Override + public int hashCode() { + return Objects.hash(date, email, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CommitUser {\n"); + + sb.append(" date: ").append(toIndentedString(date)).append("\n"); + sb.append(" email: ").append(toIndentedString(email)).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/ContentsResponse.java b/src/main/java/io/gitea/model/ContentsResponse.java new file mode 100644 index 0000000..8757d3c --- /dev/null +++ b/src/main/java/io/gitea/model/ContentsResponse.java @@ -0,0 +1,395 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.FileLinksResponse; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content + */ +@ApiModel(description = "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class ContentsResponse { + @SerializedName("_links") + private FileLinksResponse links = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("download_url") + private String downloadUrl = null; + + @SerializedName("encoding") + private String encoding = null; + + @SerializedName("git_url") + private String gitUrl = null; + + @SerializedName("html_url") + private String htmlUrl = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("path") + private String path = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("size") + private Long size = null; + + @SerializedName("submodule_git_url") + private String submoduleGitUrl = null; + + @SerializedName("target") + private String target = null; + + @SerializedName("type") + private String type = null; + + @SerializedName("url") + private String url = null; + + public ContentsResponse links(FileLinksResponse links) { + this.links = links; + return this; + } + + /** + * Get links + * @return links + **/ + @ApiModelProperty(value = "") + public FileLinksResponse getLinks() { + return links; + } + + public void setLinks(FileLinksResponse links) { + this.links = links; + } + + public ContentsResponse content(String content) { + this.content = content; + return this; + } + + /** + * `content` is populated when `type` is `file`, otherwise null + * @return content + **/ + @ApiModelProperty(value = "`content` is populated when `type` is `file`, otherwise null") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public ContentsResponse downloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + return this; + } + + /** + * Get downloadUrl + * @return downloadUrl + **/ + @ApiModelProperty(value = "") + public String getDownloadUrl() { + return downloadUrl; + } + + public void setDownloadUrl(String downloadUrl) { + this.downloadUrl = downloadUrl; + } + + public ContentsResponse encoding(String encoding) { + this.encoding = encoding; + return this; + } + + /** + * `encoding` is populated when `type` is `file`, otherwise null + * @return encoding + **/ + @ApiModelProperty(value = "`encoding` is populated when `type` is `file`, otherwise null") + public String getEncoding() { + return encoding; + } + + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + public ContentsResponse gitUrl(String gitUrl) { + this.gitUrl = gitUrl; + return this; + } + + /** + * Get gitUrl + * @return gitUrl + **/ + @ApiModelProperty(value = "") + public String getGitUrl() { + return gitUrl; + } + + public void setGitUrl(String gitUrl) { + this.gitUrl = gitUrl; + } + + public ContentsResponse 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 ContentsResponse 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 ContentsResponse path(String path) { + this.path = path; + return this; + } + + /** + * Get path + * @return path + **/ + @ApiModelProperty(value = "") + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public ContentsResponse sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public ContentsResponse size(Long size) { + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @ApiModelProperty(value = "") + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public ContentsResponse submoduleGitUrl(String submoduleGitUrl) { + this.submoduleGitUrl = submoduleGitUrl; + return this; + } + + /** + * `submodule_git_url` is populated when `type` is `submodule`, otherwise null + * @return submoduleGitUrl + **/ + @ApiModelProperty(value = "`submodule_git_url` is populated when `type` is `submodule`, otherwise null") + public String getSubmoduleGitUrl() { + return submoduleGitUrl; + } + + public void setSubmoduleGitUrl(String submoduleGitUrl) { + this.submoduleGitUrl = submoduleGitUrl; + } + + public ContentsResponse target(String target) { + this.target = target; + return this; + } + + /** + * `target` is populated when `type` is `symlink`, otherwise null + * @return target + **/ + @ApiModelProperty(value = "`target` is populated when `type` is `symlink`, otherwise null") + public String getTarget() { + return target; + } + + public void setTarget(String target) { + this.target = target; + } + + public ContentsResponse type(String type) { + this.type = type; + return this; + } + + /** + * `type` will be `file`, `dir`, `symlink`, or `submodule` + * @return type + **/ + @ApiModelProperty(value = "`type` will be `file`, `dir`, `symlink`, or `submodule`") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public ContentsResponse 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; + } + ContentsResponse contentsResponse = (ContentsResponse) o; + return Objects.equals(this.links, contentsResponse.links) && + Objects.equals(this.content, contentsResponse.content) && + Objects.equals(this.downloadUrl, contentsResponse.downloadUrl) && + Objects.equals(this.encoding, contentsResponse.encoding) && + Objects.equals(this.gitUrl, contentsResponse.gitUrl) && + Objects.equals(this.htmlUrl, contentsResponse.htmlUrl) && + Objects.equals(this.name, contentsResponse.name) && + Objects.equals(this.path, contentsResponse.path) && + Objects.equals(this.sha, contentsResponse.sha) && + Objects.equals(this.size, contentsResponse.size) && + Objects.equals(this.submoduleGitUrl, contentsResponse.submoduleGitUrl) && + Objects.equals(this.target, contentsResponse.target) && + Objects.equals(this.type, contentsResponse.type) && + Objects.equals(this.url, contentsResponse.url); + } + + @Override + public int hashCode() { + return Objects.hash(links, content, downloadUrl, encoding, gitUrl, htmlUrl, name, path, sha, size, submoduleGitUrl, target, type, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ContentsResponse {\n"); + + sb.append(" links: ").append(toIndentedString(links)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" downloadUrl: ").append(toIndentedString(downloadUrl)).append("\n"); + sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n"); + sb.append(" gitUrl: ").append(toIndentedString(gitUrl)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" submoduleGitUrl: ").append(toIndentedString(submoduleGitUrl)).append("\n"); + sb.append(" target: ").append(toIndentedString(target)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/CreateEmailOption.java b/src/main/java/io/gitea/model/CreateEmailOption.java index d55f0ab..59f7271 100644 --- a/src/main/java/io/gitea/model/CreateEmailOption.java +++ b/src/main/java/io/gitea/model/CreateEmailOption.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * CreateEmailOption options when creating email addresses */ @ApiModel(description = "CreateEmailOption options when creating email addresses") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateEmailOption { @SerializedName("emails") private List emails = null; diff --git a/src/main/java/io/gitea/model/CreateFileOptions.java b/src/main/java/io/gitea/model/CreateFileOptions.java new file mode 100644 index 0000000..28de5db --- /dev/null +++ b/src/main/java/io/gitea/model/CreateFileOptions.java @@ -0,0 +1,211 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.Identity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) + */ +@ApiModel(description = "CreateFileOptions options for creating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class CreateFileOptions { + @SerializedName("author") + private Identity author = null; + + @SerializedName("branch") + private String branch = null; + + @SerializedName("committer") + private Identity committer = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("new_branch") + private String newBranch = null; + + public CreateFileOptions 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 CreateFileOptions 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 CreateFileOptions 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 CreateFileOptions content(String content) { + this.content = content; + return this; + } + + /** + * content must be base64 encoded + * @return content + **/ + @ApiModelProperty(required = true, value = "content must be base64 encoded") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public CreateFileOptions 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 CreateFileOptions 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; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateFileOptions createFileOptions = (CreateFileOptions) o; + return Objects.equals(this.author, createFileOptions.author) && + Objects.equals(this.branch, createFileOptions.branch) && + Objects.equals(this.committer, createFileOptions.committer) && + Objects.equals(this.content, createFileOptions.content) && + Objects.equals(this.message, createFileOptions.message) && + Objects.equals(this.newBranch, createFileOptions.newBranch); + } + + @Override + public int hashCode() { + return Objects.hash(author, branch, committer, content, message, newBranch); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class CreateFileOptions {\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(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" newBranch: ").append(toIndentedString(newBranch)).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/CreateForkOption.java b/src/main/java/io/gitea/model/CreateForkOption.java index c8f1aa2..eef31dd 100644 --- a/src/main/java/io/gitea/model/CreateForkOption.java +++ b/src/main/java/io/gitea/model/CreateForkOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateForkOption options for creating a fork */ @ApiModel(description = "CreateForkOption options for creating a fork") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateForkOption { @SerializedName("organization") private String organization = null; diff --git a/src/main/java/io/gitea/model/CreateGPGKeyOption.java b/src/main/java/io/gitea/model/CreateGPGKeyOption.java index 3d01319..ce6c729 100644 --- a/src/main/java/io/gitea/model/CreateGPGKeyOption.java +++ b/src/main/java/io/gitea/model/CreateGPGKeyOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateGPGKeyOption options create user GPG key */ @ApiModel(description = "CreateGPGKeyOption options create user GPG key") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateGPGKeyOption { @SerializedName("armored_public_key") private String armoredPublicKey = null; diff --git a/src/main/java/io/gitea/model/CreateHookOption.java b/src/main/java/io/gitea/model/CreateHookOption.java index 5eee18d..2dd8471 100644 --- a/src/main/java/io/gitea/model/CreateHookOption.java +++ b/src/main/java/io/gitea/model/CreateHookOption.java @@ -14,6 +14,7 @@ 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; @@ -31,11 +32,14 @@ * CreateHookOption options when create a hook */ @ApiModel(description = "CreateHookOption options when create a hook") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateHookOption { @SerializedName("active") private Boolean active = false; + @SerializedName("branch_filter") + private String branchFilter = null; + @SerializedName("config") private Map config = new HashMap(); @@ -114,6 +118,24 @@ public void setActive(Boolean active) { this.active = active; } + public CreateHookOption 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 CreateHookOption config(Map config) { this.config = config; return this; @@ -192,6 +214,7 @@ public boolean equals(java.lang.Object o) { } CreateHookOption createHookOption = (CreateHookOption) o; return Objects.equals(this.active, createHookOption.active) && + Objects.equals(this.branchFilter, createHookOption.branchFilter) && Objects.equals(this.config, createHookOption.config) && Objects.equals(this.events, createHookOption.events) && Objects.equals(this.type, createHookOption.type); @@ -199,7 +222,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(active, config, events, type); + return Objects.hash(active, branchFilter, config, events, type); } @@ -209,6 +232,7 @@ public String toString() { sb.append("class CreateHookOption {\n"); sb.append(" active: ").append(toIndentedString(active)).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"); sb.append(" type: ").append(toIndentedString(type)).append("\n"); diff --git a/src/main/java/io/gitea/model/CreateIssueCommentOption.java b/src/main/java/io/gitea/model/CreateIssueCommentOption.java index b6383c9..6cd01c9 100644 --- a/src/main/java/io/gitea/model/CreateIssueCommentOption.java +++ b/src/main/java/io/gitea/model/CreateIssueCommentOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateIssueCommentOption options for creating a comment on an issue */ @ApiModel(description = "CreateIssueCommentOption options for creating a comment on an issue") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateIssueCommentOption { @SerializedName("body") private String body = null; diff --git a/src/main/java/io/gitea/model/CreateIssueOption.java b/src/main/java/io/gitea/model/CreateIssueOption.java index 5053100..1fcec43 100644 --- a/src/main/java/io/gitea/model/CreateIssueOption.java +++ b/src/main/java/io/gitea/model/CreateIssueOption.java @@ -14,6 +14,7 @@ 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; @@ -30,7 +31,7 @@ * CreateIssueOption options to create one issue */ @ApiModel(description = "CreateIssueOption options to create one issue") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateIssueOption { @SerializedName("assignee") private String assignee = null; diff --git a/src/main/java/io/gitea/model/CreateKeyOption.java b/src/main/java/io/gitea/model/CreateKeyOption.java index 6fa824f..9d83a64 100644 --- a/src/main/java/io/gitea/model/CreateKeyOption.java +++ b/src/main/java/io/gitea/model/CreateKeyOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateKeyOption options when creating a key */ @ApiModel(description = "CreateKeyOption options when creating a key") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateKeyOption { @SerializedName("key") private String key = null; diff --git a/src/main/java/io/gitea/model/CreateLabelOption.java b/src/main/java/io/gitea/model/CreateLabelOption.java index 34c9d4d..b7ed95a 100644 --- a/src/main/java/io/gitea/model/CreateLabelOption.java +++ b/src/main/java/io/gitea/model/CreateLabelOption.java @@ -14,6 +14,7 @@ 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; @@ -27,11 +28,14 @@ * CreateLabelOption options for creating a label */ @ApiModel(description = "CreateLabelOption options for creating a label") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateLabelOption { @SerializedName("color") private String color = null; + @SerializedName("description") + private String description = null; + @SerializedName("name") private String name = null; @@ -53,6 +57,24 @@ public void setColor(String color) { this.color = color; } + public CreateLabelOption 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 CreateLabelOption name(String name) { this.name = name; return this; @@ -82,12 +104,13 @@ public boolean equals(java.lang.Object o) { } CreateLabelOption createLabelOption = (CreateLabelOption) o; return Objects.equals(this.color, createLabelOption.color) && + Objects.equals(this.description, createLabelOption.description) && Objects.equals(this.name, createLabelOption.name); } @Override public int hashCode() { - return Objects.hash(color, name); + return Objects.hash(color, description, name); } @@ -97,6 +120,7 @@ public String toString() { sb.append("class CreateLabelOption {\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 3eb849b..e9af681 100644 --- a/src/main/java/io/gitea/model/CreateMilestoneOption.java +++ b/src/main/java/io/gitea/model/CreateMilestoneOption.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * CreateMilestoneOption options for creating a milestone */ @ApiModel(description = "CreateMilestoneOption options for creating a milestone") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateMilestoneOption { @SerializedName("description") private String description = null; diff --git a/src/main/java/io/gitea/model/CreateOrgOption.java b/src/main/java/io/gitea/model/CreateOrgOption.java index a580a47..c5e5139 100644 --- a/src/main/java/io/gitea/model/CreateOrgOption.java +++ b/src/main/java/io/gitea/model/CreateOrgOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateOrgOption options for creating an organization */ @ApiModel(description = "CreateOrgOption options for creating an organization") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateOrgOption { @SerializedName("description") private String description = null; @@ -38,9 +39,64 @@ public class CreateOrgOption { @SerializedName("location") private String location = null; + @SerializedName("repo_admin_change_team_access") + private Boolean repoAdminChangeTeamAccess = null; + @SerializedName("username") private String username = null; + /** + * possible values are `public` (default), `limited` or `private` + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + PUBLIC("public"), + + LIMITED("limited"), + + PRIVATE("private"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String text) { + for (VisibilityEnum b : VisibilityEnum.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 VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("visibility") + private VisibilityEnum visibility = null; + @SerializedName("website") private String website = null; @@ -98,6 +154,24 @@ public void setLocation(String location) { this.location = location; } + public CreateOrgOption repoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) { + this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess; + return this; + } + + /** + * Get repoAdminChangeTeamAccess + * @return repoAdminChangeTeamAccess + **/ + @ApiModelProperty(value = "") + public Boolean isRepoAdminChangeTeamAccess() { + return repoAdminChangeTeamAccess; + } + + public void setRepoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) { + this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess; + } + public CreateOrgOption username(String username) { this.username = username; return this; @@ -116,6 +190,24 @@ public void setUsername(String username) { this.username = username; } + public CreateOrgOption visibility(VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * possible values are `public` (default), `limited` or `private` + * @return visibility + **/ + @ApiModelProperty(value = "possible values are `public` (default), `limited` or `private`") + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(VisibilityEnum visibility) { + this.visibility = visibility; + } + public CreateOrgOption website(String website) { this.website = website; return this; @@ -147,13 +239,15 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.description, createOrgOption.description) && Objects.equals(this.fullName, createOrgOption.fullName) && Objects.equals(this.location, createOrgOption.location) && + Objects.equals(this.repoAdminChangeTeamAccess, createOrgOption.repoAdminChangeTeamAccess) && Objects.equals(this.username, createOrgOption.username) && + Objects.equals(this.visibility, createOrgOption.visibility) && Objects.equals(this.website, createOrgOption.website); } @Override public int hashCode() { - return Objects.hash(description, fullName, location, username, website); + return Objects.hash(description, fullName, location, repoAdminChangeTeamAccess, username, visibility, website); } @@ -165,7 +259,9 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).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"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/CreatePullRequestOption.java b/src/main/java/io/gitea/model/CreatePullRequestOption.java index 960631d..87d1bc9 100644 --- a/src/main/java/io/gitea/model/CreatePullRequestOption.java +++ b/src/main/java/io/gitea/model/CreatePullRequestOption.java @@ -14,6 +14,7 @@ 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; @@ -30,7 +31,7 @@ * CreatePullRequestOption options when creating a pull request */ @ApiModel(description = "CreatePullRequestOption options when creating a pull request") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreatePullRequestOption { @SerializedName("assignee") private String assignee = null; diff --git a/src/main/java/io/gitea/model/CreateReleaseOption.java b/src/main/java/io/gitea/model/CreateReleaseOption.java index 3924f47..3b6833e 100644 --- a/src/main/java/io/gitea/model/CreateReleaseOption.java +++ b/src/main/java/io/gitea/model/CreateReleaseOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateReleaseOption options when creating a release */ @ApiModel(description = "CreateReleaseOption options when creating a release") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateReleaseOption { @SerializedName("body") private String body = null; diff --git a/src/main/java/io/gitea/model/CreateRepoOption.java b/src/main/java/io/gitea/model/CreateRepoOption.java index 8453f4e..55ca838 100644 --- a/src/main/java/io/gitea/model/CreateRepoOption.java +++ b/src/main/java/io/gitea/model/CreateRepoOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateRepoOption options when creating repository */ @ApiModel(description = "CreateRepoOption options when creating repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateRepoOption { @SerializedName("auto_init") private Boolean autoInit = null; @@ -38,6 +39,9 @@ public class CreateRepoOption { @SerializedName("gitignores") private String gitignores = null; + @SerializedName("issue_labels") + private String issueLabels = null; + @SerializedName("license") private String license = null; @@ -104,6 +108,24 @@ public void setGitignores(String gitignores) { this.gitignores = gitignores; } + public CreateRepoOption issueLabels(String issueLabels) { + this.issueLabels = issueLabels; + return this; + } + + /** + * Issue Label set to use + * @return issueLabels + **/ + @ApiModelProperty(value = "Issue Label set to use") + public String getIssueLabels() { + return issueLabels; + } + + public void setIssueLabels(String issueLabels) { + this.issueLabels = issueLabels; + } + public CreateRepoOption license(String license) { this.license = license; return this; @@ -189,6 +211,7 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.autoInit, createRepoOption.autoInit) && Objects.equals(this.description, createRepoOption.description) && Objects.equals(this.gitignores, createRepoOption.gitignores) && + Objects.equals(this.issueLabels, createRepoOption.issueLabels) && Objects.equals(this.license, createRepoOption.license) && Objects.equals(this.name, createRepoOption.name) && Objects.equals(this._private, createRepoOption._private) && @@ -197,7 +220,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(autoInit, description, gitignores, license, name, _private, readme); + return Objects.hash(autoInit, description, gitignores, issueLabels, license, name, _private, readme); } @@ -209,6 +232,7 @@ public String toString() { sb.append(" autoInit: ").append(toIndentedString(autoInit)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" gitignores: ").append(toIndentedString(gitignores)).append("\n"); + sb.append(" issueLabels: ").append(toIndentedString(issueLabels)).append("\n"); sb.append(" license: ").append(toIndentedString(license)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); diff --git a/src/main/java/io/gitea/model/CreateStatusOption.java b/src/main/java/io/gitea/model/CreateStatusOption.java index 64b9bb4..7932641 100644 --- a/src/main/java/io/gitea/model/CreateStatusOption.java +++ b/src/main/java/io/gitea/model/CreateStatusOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateStatusOption holds the information needed to create a new Status for a Commit */ @ApiModel(description = "CreateStatusOption holds the information needed to create a new Status for a Commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateStatusOption { @SerializedName("context") private String context = null; diff --git a/src/main/java/io/gitea/model/CreateTeamOption.java b/src/main/java/io/gitea/model/CreateTeamOption.java index cd68d0f..7788ee2 100644 --- a/src/main/java/io/gitea/model/CreateTeamOption.java +++ b/src/main/java/io/gitea/model/CreateTeamOption.java @@ -14,6 +14,7 @@ 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; @@ -22,12 +23,14 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; /** * CreateTeamOption options for creating a team */ @ApiModel(description = "CreateTeamOption options for creating a team") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateTeamOption { @SerializedName("description") private String description = null; @@ -87,6 +90,9 @@ public PermissionEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("permission") private PermissionEnum permission = null; + @SerializedName("units") + private List units = null; + public CreateTeamOption description(String description) { this.description = description; return this; @@ -141,6 +147,32 @@ public void setPermission(PermissionEnum permission) { this.permission = permission; } + public CreateTeamOption units(List units) { + this.units = units; + return this; + } + + public CreateTeamOption addUnitsItem(String unitsItem) { + if (this.units == null) { + this.units = new ArrayList(); + } + this.units.add(unitsItem); + return this; + } + + /** + * Get units + * @return units + **/ + @ApiModelProperty(example = "[\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.pulls\",\"repo.releases\",\"repo.ext_wiki\"]", value = "") + public List getUnits() { + return units; + } + + public void setUnits(List units) { + this.units = units; + } + @Override public boolean equals(java.lang.Object o) { @@ -153,12 +185,13 @@ public boolean equals(java.lang.Object o) { CreateTeamOption createTeamOption = (CreateTeamOption) o; return Objects.equals(this.description, createTeamOption.description) && Objects.equals(this.name, createTeamOption.name) && - Objects.equals(this.permission, createTeamOption.permission); + Objects.equals(this.permission, createTeamOption.permission) && + Objects.equals(this.units, createTeamOption.units); } @Override public int hashCode() { - return Objects.hash(description, name, permission); + return Objects.hash(description, name, permission, units); } @@ -170,6 +203,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" units: ").append(toIndentedString(units)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/CreateUserOption.java b/src/main/java/io/gitea/model/CreateUserOption.java index 73ec476..b15956e 100644 --- a/src/main/java/io/gitea/model/CreateUserOption.java +++ b/src/main/java/io/gitea/model/CreateUserOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * CreateUserOption create user options */ @ApiModel(description = "CreateUserOption create user options") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class CreateUserOption { @SerializedName("email") private String email = null; @@ -38,6 +39,9 @@ public class CreateUserOption { @SerializedName("login_name") private String loginName = null; + @SerializedName("must_change_password") + private Boolean mustChangePassword = null; + @SerializedName("password") private String password = null; @@ -104,6 +108,24 @@ public void setLoginName(String loginName) { this.loginName = loginName; } + public CreateUserOption mustChangePassword(Boolean mustChangePassword) { + this.mustChangePassword = mustChangePassword; + return this; + } + + /** + * Get mustChangePassword + * @return mustChangePassword + **/ + @ApiModelProperty(value = "") + public Boolean isMustChangePassword() { + return mustChangePassword; + } + + public void setMustChangePassword(Boolean mustChangePassword) { + this.mustChangePassword = mustChangePassword; + } + public CreateUserOption password(String password) { this.password = password; return this; @@ -189,6 +211,7 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.email, createUserOption.email) && Objects.equals(this.fullName, createUserOption.fullName) && Objects.equals(this.loginName, createUserOption.loginName) && + Objects.equals(this.mustChangePassword, createUserOption.mustChangePassword) && Objects.equals(this.password, createUserOption.password) && Objects.equals(this.sendNotify, createUserOption.sendNotify) && Objects.equals(this.sourceId, createUserOption.sourceId) && @@ -197,7 +220,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(email, fullName, loginName, password, sendNotify, sourceId, username); + return Objects.hash(email, fullName, loginName, mustChangePassword, password, sendNotify, sourceId, username); } @@ -209,6 +232,7 @@ public String toString() { sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n"); + sb.append(" mustChangePassword: ").append(toIndentedString(mustChangePassword)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" sendNotify: ").append(toIndentedString(sendNotify)).append("\n"); sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); diff --git a/src/main/java/io/gitea/model/DeleteEmailOption.java b/src/main/java/io/gitea/model/DeleteEmailOption.java index d6e2c42..88ba68a 100644 --- a/src/main/java/io/gitea/model/DeleteEmailOption.java +++ b/src/main/java/io/gitea/model/DeleteEmailOption.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * DeleteEmailOption options when deleting email addresses */ @ApiModel(description = "DeleteEmailOption options when deleting email addresses") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class DeleteEmailOption { @SerializedName("emails") private List emails = null; diff --git a/src/main/java/io/gitea/model/DeleteFileOptions.java b/src/main/java/io/gitea/model/DeleteFileOptions.java new file mode 100644 index 0000000..d87a923 --- /dev/null +++ b/src/main/java/io/gitea/model/DeleteFileOptions.java @@ -0,0 +1,211 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.Identity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) + */ +@ApiModel(description = "DeleteFileOptions options for deleting files (used for other File structs below) Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class DeleteFileOptions { + @SerializedName("author") + private Identity author = null; + + @SerializedName("branch") + private String branch = null; + + @SerializedName("committer") + private Identity committer = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("new_branch") + private String newBranch = null; + + @SerializedName("sha") + private String sha = null; + + public DeleteFileOptions 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 DeleteFileOptions 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 DeleteFileOptions 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 DeleteFileOptions 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 DeleteFileOptions 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 DeleteFileOptions sha(String sha) { + this.sha = sha; + return this; + } + + /** + * sha is the SHA for the file that already exists + * @return sha + **/ + @ApiModelProperty(required = true, value = "sha is the SHA for the file that already exists") + 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; + } + DeleteFileOptions deleteFileOptions = (DeleteFileOptions) o; + return Objects.equals(this.author, deleteFileOptions.author) && + Objects.equals(this.branch, deleteFileOptions.branch) && + Objects.equals(this.committer, deleteFileOptions.committer) && + Objects.equals(this.message, deleteFileOptions.message) && + Objects.equals(this.newBranch, deleteFileOptions.newBranch) && + Objects.equals(this.sha, deleteFileOptions.sha); + } + + @Override + public int hashCode() { + return Objects.hash(author, branch, committer, message, newBranch, sha); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class DeleteFileOptions {\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(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" newBranch: ").append(toIndentedString(newBranch)).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/DeployKey.java b/src/main/java/io/gitea/model/DeployKey.java index 0693266..431ba5c 100644 --- a/src/main/java/io/gitea/model/DeployKey.java +++ b/src/main/java/io/gitea/model/DeployKey.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * DeployKey a deploy key */ @ApiModel(description = "DeployKey a deploy key") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class DeployKey { @SerializedName("created_at") private OffsetDateTime createdAt = null; diff --git a/src/main/java/io/gitea/model/EditAttachmentOptions.java b/src/main/java/io/gitea/model/EditAttachmentOptions.java index 65f6f83..932278d 100644 --- a/src/main/java/io/gitea/model/EditAttachmentOptions.java +++ b/src/main/java/io/gitea/model/EditAttachmentOptions.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * EditAttachmentOptions options for editing attachments */ @ApiModel(description = "EditAttachmentOptions options for editing attachments") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditAttachmentOptions { @SerializedName("name") private String name = null; diff --git a/src/main/java/io/gitea/model/EditDeadlineOption.java b/src/main/java/io/gitea/model/EditDeadlineOption.java index ae2d8a4..98650e1 100644 --- a/src/main/java/io/gitea/model/EditDeadlineOption.java +++ b/src/main/java/io/gitea/model/EditDeadlineOption.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * EditDeadlineOption options for creating a deadline */ @ApiModel(description = "EditDeadlineOption options for creating a deadline") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditDeadlineOption { @SerializedName("due_date") private OffsetDateTime dueDate = null; diff --git a/src/main/java/io/gitea/model/EditGitHookOption.java b/src/main/java/io/gitea/model/EditGitHookOption.java new file mode 100644 index 0000000..2c061e6 --- /dev/null +++ b/src/main/java/io/gitea/model/EditGitHookOption.java @@ -0,0 +1,95 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * EditGitHookOption options when modifying one Git hook + */ +@ApiModel(description = "EditGitHookOption options when modifying one Git hook") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class EditGitHookOption { + @SerializedName("content") + private String content = null; + + public EditGitHookOption 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; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditGitHookOption editGitHookOption = (EditGitHookOption) o; + return Objects.equals(this.content, editGitHookOption.content); + } + + @Override + public int hashCode() { + return Objects.hash(content); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EditGitHookOption {\n"); + + sb.append(" content: ").append(toIndentedString(content)).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/EditHookOption.java b/src/main/java/io/gitea/model/EditHookOption.java index 937e558..941b305 100644 --- a/src/main/java/io/gitea/model/EditHookOption.java +++ b/src/main/java/io/gitea/model/EditHookOption.java @@ -14,6 +14,7 @@ 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; @@ -31,11 +32,14 @@ * EditHookOption options when modify one hook */ @ApiModel(description = "EditHookOption options when modify one hook") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditHookOption { @SerializedName("active") private Boolean active = null; + @SerializedName("branch_filter") + private String branchFilter = null; + @SerializedName("config") private Map config = null; @@ -60,6 +64,24 @@ public void setActive(Boolean active) { this.active = active; } + public EditHookOption 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 EditHookOption config(Map config) { this.config = config; return this; @@ -123,13 +145,14 @@ public boolean equals(java.lang.Object o) { } EditHookOption editHookOption = (EditHookOption) o; return Objects.equals(this.active, editHookOption.active) && + Objects.equals(this.branchFilter, editHookOption.branchFilter) && Objects.equals(this.config, editHookOption.config) && Objects.equals(this.events, editHookOption.events); } @Override public int hashCode() { - return Objects.hash(active, config, events); + return Objects.hash(active, branchFilter, config, events); } @@ -139,6 +162,7 @@ public String toString() { sb.append("class EditHookOption {\n"); sb.append(" active: ").append(toIndentedString(active)).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"); sb.append("}"); diff --git a/src/main/java/io/gitea/model/EditIssueCommentOption.java b/src/main/java/io/gitea/model/EditIssueCommentOption.java index 2c9fd5e..78881aa 100644 --- a/src/main/java/io/gitea/model/EditIssueCommentOption.java +++ b/src/main/java/io/gitea/model/EditIssueCommentOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * EditIssueCommentOption options for editing a comment */ @ApiModel(description = "EditIssueCommentOption options for editing a comment") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditIssueCommentOption { @SerializedName("body") private String body = null; diff --git a/src/main/java/io/gitea/model/EditIssueOption.java b/src/main/java/io/gitea/model/EditIssueOption.java index 64fff2d..77c79f5 100644 --- a/src/main/java/io/gitea/model/EditIssueOption.java +++ b/src/main/java/io/gitea/model/EditIssueOption.java @@ -14,6 +14,7 @@ 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; @@ -30,7 +31,7 @@ * EditIssueOption options for editing an issue */ @ApiModel(description = "EditIssueOption options for editing an issue") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditIssueOption { @SerializedName("assignee") private String assignee = null; diff --git a/src/main/java/io/gitea/model/EditLabelOption.java b/src/main/java/io/gitea/model/EditLabelOption.java index 97c6a53..bb81c8d 100644 --- a/src/main/java/io/gitea/model/EditLabelOption.java +++ b/src/main/java/io/gitea/model/EditLabelOption.java @@ -14,6 +14,7 @@ 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; @@ -27,11 +28,14 @@ * EditLabelOption options for editing a label */ @ApiModel(description = "EditLabelOption options for editing a label") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditLabelOption { @SerializedName("color") private String color = null; + @SerializedName("description") + private String description = null; + @SerializedName("name") private String name = null; @@ -53,6 +57,24 @@ public void setColor(String color) { this.color = color; } + public EditLabelOption 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 EditLabelOption name(String name) { this.name = name; return this; @@ -82,12 +104,13 @@ public boolean equals(java.lang.Object o) { } EditLabelOption editLabelOption = (EditLabelOption) o; return Objects.equals(this.color, editLabelOption.color) && + Objects.equals(this.description, editLabelOption.description) && Objects.equals(this.name, editLabelOption.name); } @Override public int hashCode() { - return Objects.hash(color, name); + return Objects.hash(color, description, name); } @@ -97,6 +120,7 @@ public String toString() { sb.append("class EditLabelOption {\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).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 701e25a..047fbc8 100644 --- a/src/main/java/io/gitea/model/EditMilestoneOption.java +++ b/src/main/java/io/gitea/model/EditMilestoneOption.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * EditMilestoneOption options for editing a milestone */ @ApiModel(description = "EditMilestoneOption options for editing a milestone") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditMilestoneOption { @SerializedName("description") private String description = null; diff --git a/src/main/java/io/gitea/model/EditOrgOption.java b/src/main/java/io/gitea/model/EditOrgOption.java index b3caf28..b41d849 100644 --- a/src/main/java/io/gitea/model/EditOrgOption.java +++ b/src/main/java/io/gitea/model/EditOrgOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * EditOrgOption options for editing an organization */ @ApiModel(description = "EditOrgOption options for editing an organization") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditOrgOption { @SerializedName("description") private String description = null; @@ -38,6 +39,61 @@ public class EditOrgOption { @SerializedName("location") private String location = null; + @SerializedName("repo_admin_change_team_access") + private Boolean repoAdminChangeTeamAccess = null; + + /** + * possible values are `public`, `limited` or `private` + */ + @JsonAdapter(VisibilityEnum.Adapter.class) + public enum VisibilityEnum { + PUBLIC("public"), + + LIMITED("limited"), + + PRIVATE("private"); + + private String value; + + VisibilityEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static VisibilityEnum fromValue(String text) { + for (VisibilityEnum b : VisibilityEnum.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 VisibilityEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public VisibilityEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return VisibilityEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("visibility") + private VisibilityEnum visibility = null; + @SerializedName("website") private String website = null; @@ -95,6 +151,42 @@ public void setLocation(String location) { this.location = location; } + public EditOrgOption repoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) { + this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess; + return this; + } + + /** + * Get repoAdminChangeTeamAccess + * @return repoAdminChangeTeamAccess + **/ + @ApiModelProperty(value = "") + public Boolean isRepoAdminChangeTeamAccess() { + return repoAdminChangeTeamAccess; + } + + public void setRepoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) { + this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess; + } + + public EditOrgOption visibility(VisibilityEnum visibility) { + this.visibility = visibility; + return this; + } + + /** + * possible values are `public`, `limited` or `private` + * @return visibility + **/ + @ApiModelProperty(value = "possible values are `public`, `limited` or `private`") + public VisibilityEnum getVisibility() { + return visibility; + } + + public void setVisibility(VisibilityEnum visibility) { + this.visibility = visibility; + } + public EditOrgOption website(String website) { this.website = website; return this; @@ -126,12 +218,14 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.description, editOrgOption.description) && Objects.equals(this.fullName, editOrgOption.fullName) && Objects.equals(this.location, editOrgOption.location) && + Objects.equals(this.repoAdminChangeTeamAccess, editOrgOption.repoAdminChangeTeamAccess) && + Objects.equals(this.visibility, editOrgOption.visibility) && Objects.equals(this.website, editOrgOption.website); } @Override public int hashCode() { - return Objects.hash(description, fullName, location, website); + return Objects.hash(description, fullName, location, repoAdminChangeTeamAccess, visibility, website); } @@ -143,6 +237,8 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).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"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/EditPullRequestOption.java b/src/main/java/io/gitea/model/EditPullRequestOption.java index ade8e03..00ca0f1 100644 --- a/src/main/java/io/gitea/model/EditPullRequestOption.java +++ b/src/main/java/io/gitea/model/EditPullRequestOption.java @@ -14,6 +14,7 @@ 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; @@ -30,7 +31,7 @@ * EditPullRequestOption options when modify pull request */ @ApiModel(description = "EditPullRequestOption options when modify pull request") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditPullRequestOption { @SerializedName("assignee") private String assignee = null; diff --git a/src/main/java/io/gitea/model/EditReleaseOption.java b/src/main/java/io/gitea/model/EditReleaseOption.java index 26c2eba..d81e66d 100644 --- a/src/main/java/io/gitea/model/EditReleaseOption.java +++ b/src/main/java/io/gitea/model/EditReleaseOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * EditReleaseOption options when editing a release */ @ApiModel(description = "EditReleaseOption options when editing a release") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditReleaseOption { @SerializedName("body") private String body = null; diff --git a/src/main/java/io/gitea/model/EditRepoOption.java b/src/main/java/io/gitea/model/EditRepoOption.java new file mode 100644 index 0000000..71bad16 --- /dev/null +++ b/src/main/java/io/gitea/model/EditRepoOption.java @@ -0,0 +1,466 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.ExternalTracker; +import io.gitea.model.ExternalWiki; +import io.gitea.model.InternalTracker; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * EditRepoOption options when editing a repository's properties + */ +@ApiModel(description = "EditRepoOption options when editing a repository's properties") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class EditRepoOption { + @SerializedName("allow_merge_commits") + private Boolean allowMergeCommits = null; + + @SerializedName("allow_rebase") + private Boolean allowRebase = null; + + @SerializedName("allow_rebase_explicit") + private Boolean allowRebaseExplicit = null; + + @SerializedName("allow_squash_merge") + private Boolean allowSquashMerge = null; + + @SerializedName("archived") + private Boolean archived = null; + + @SerializedName("default_branch") + private String defaultBranch = null; + + @SerializedName("description") + private String description = null; + + @SerializedName("external_tracker") + private ExternalTracker externalTracker = null; + + @SerializedName("external_wiki") + private ExternalWiki externalWiki = null; + + @SerializedName("has_issues") + private Boolean hasIssues = null; + + @SerializedName("has_pull_requests") + private Boolean hasPullRequests = null; + + @SerializedName("has_wiki") + private Boolean hasWiki = null; + + @SerializedName("ignore_whitespace_conflicts") + private Boolean ignoreWhitespaceConflicts = null; + + @SerializedName("internal_tracker") + private InternalTracker internalTracker = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("private") + private Boolean _private = null; + + @SerializedName("website") + private String website = null; + + public EditRepoOption allowMergeCommits(Boolean allowMergeCommits) { + this.allowMergeCommits = allowMergeCommits; + return this; + } + + /** + * either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`. + * @return allowMergeCommits + **/ + @ApiModelProperty(value = "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.") + public Boolean isAllowMergeCommits() { + return allowMergeCommits; + } + + public void setAllowMergeCommits(Boolean allowMergeCommits) { + this.allowMergeCommits = allowMergeCommits; + } + + public EditRepoOption allowRebase(Boolean allowRebase) { + this.allowRebase = allowRebase; + return this; + } + + /** + * either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`. + * @return allowRebase + **/ + @ApiModelProperty(value = "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.") + public Boolean isAllowRebase() { + return allowRebase; + } + + public void setAllowRebase(Boolean allowRebase) { + this.allowRebase = allowRebase; + } + + public EditRepoOption allowRebaseExplicit(Boolean allowRebaseExplicit) { + this.allowRebaseExplicit = allowRebaseExplicit; + return this; + } + + /** + * either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`. + * @return allowRebaseExplicit + **/ + @ApiModelProperty(value = "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.") + public Boolean isAllowRebaseExplicit() { + return allowRebaseExplicit; + } + + public void setAllowRebaseExplicit(Boolean allowRebaseExplicit) { + this.allowRebaseExplicit = allowRebaseExplicit; + } + + public EditRepoOption allowSquashMerge(Boolean allowSquashMerge) { + this.allowSquashMerge = allowSquashMerge; + return this; + } + + /** + * either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`. + * @return allowSquashMerge + **/ + @ApiModelProperty(value = "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.") + public Boolean isAllowSquashMerge() { + return allowSquashMerge; + } + + public void setAllowSquashMerge(Boolean allowSquashMerge) { + this.allowSquashMerge = allowSquashMerge; + } + + public EditRepoOption archived(Boolean archived) { + this.archived = archived; + return this; + } + + /** + * set to `true` to archive this repository. + * @return archived + **/ + @ApiModelProperty(value = "set to `true` to archive this repository.") + public Boolean isArchived() { + return archived; + } + + public void setArchived(Boolean archived) { + this.archived = archived; + } + + public EditRepoOption defaultBranch(String defaultBranch) { + this.defaultBranch = defaultBranch; + return this; + } + + /** + * sets the default branch for this repository. + * @return defaultBranch + **/ + @ApiModelProperty(value = "sets the default branch for this repository.") + public String getDefaultBranch() { + return defaultBranch; + } + + public void setDefaultBranch(String defaultBranch) { + this.defaultBranch = defaultBranch; + } + + public EditRepoOption description(String description) { + this.description = description; + return this; + } + + /** + * a short description of the repository. + * @return description + **/ + @ApiModelProperty(value = "a short description of the repository.") + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public EditRepoOption externalTracker(ExternalTracker externalTracker) { + this.externalTracker = externalTracker; + return this; + } + + /** + * Get externalTracker + * @return externalTracker + **/ + @ApiModelProperty(value = "") + public ExternalTracker getExternalTracker() { + return externalTracker; + } + + public void setExternalTracker(ExternalTracker externalTracker) { + this.externalTracker = externalTracker; + } + + public EditRepoOption externalWiki(ExternalWiki externalWiki) { + this.externalWiki = externalWiki; + return this; + } + + /** + * Get externalWiki + * @return externalWiki + **/ + @ApiModelProperty(value = "") + public ExternalWiki getExternalWiki() { + return externalWiki; + } + + public void setExternalWiki(ExternalWiki externalWiki) { + this.externalWiki = externalWiki; + } + + public EditRepoOption hasIssues(Boolean hasIssues) { + this.hasIssues = hasIssues; + return this; + } + + /** + * either `true` to enable issues for this repository or `false` to disable them. + * @return hasIssues + **/ + @ApiModelProperty(value = "either `true` to enable issues for this repository or `false` to disable them.") + public Boolean isHasIssues() { + return hasIssues; + } + + public void setHasIssues(Boolean hasIssues) { + this.hasIssues = hasIssues; + } + + public EditRepoOption hasPullRequests(Boolean hasPullRequests) { + this.hasPullRequests = hasPullRequests; + return this; + } + + /** + * either `true` to allow pull requests, or `false` to prevent pull request. + * @return hasPullRequests + **/ + @ApiModelProperty(value = "either `true` to allow pull requests, or `false` to prevent pull request.") + public Boolean isHasPullRequests() { + return hasPullRequests; + } + + public void setHasPullRequests(Boolean hasPullRequests) { + this.hasPullRequests = hasPullRequests; + } + + public EditRepoOption hasWiki(Boolean hasWiki) { + this.hasWiki = hasWiki; + return this; + } + + /** + * either `true` to enable the wiki for this repository or `false` to disable it. + * @return hasWiki + **/ + @ApiModelProperty(value = "either `true` to enable the wiki for this repository or `false` to disable it.") + public Boolean isHasWiki() { + return hasWiki; + } + + public void setHasWiki(Boolean hasWiki) { + this.hasWiki = hasWiki; + } + + public EditRepoOption ignoreWhitespaceConflicts(Boolean ignoreWhitespaceConflicts) { + this.ignoreWhitespaceConflicts = ignoreWhitespaceConflicts; + return this; + } + + /** + * either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`. + * @return ignoreWhitespaceConflicts + **/ + @ApiModelProperty(value = "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.") + public Boolean isIgnoreWhitespaceConflicts() { + return ignoreWhitespaceConflicts; + } + + public void setIgnoreWhitespaceConflicts(Boolean ignoreWhitespaceConflicts) { + this.ignoreWhitespaceConflicts = ignoreWhitespaceConflicts; + } + + public EditRepoOption internalTracker(InternalTracker internalTracker) { + this.internalTracker = internalTracker; + return this; + } + + /** + * Get internalTracker + * @return internalTracker + **/ + @ApiModelProperty(value = "") + public InternalTracker getInternalTracker() { + return internalTracker; + } + + public void setInternalTracker(InternalTracker internalTracker) { + this.internalTracker = internalTracker; + } + + public EditRepoOption name(String name) { + this.name = name; + return this; + } + + /** + * name of the repository + * @return name + **/ + @ApiModelProperty(value = "name of the repository") + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EditRepoOption _private(Boolean _private) { + this._private = _private; + return this; + } + + /** + * either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private. + * @return _private + **/ + @ApiModelProperty(value = "either `true` to make the repository private or `false` to make it public. Note: you will get a 422 error if the organization restricts changing repository visibility to organization owners and a non-owner tries to change the value of private.") + public Boolean isPrivate() { + return _private; + } + + public void setPrivate(Boolean _private) { + this._private = _private; + } + + public EditRepoOption website(String website) { + this.website = website; + return this; + } + + /** + * a URL with more information about the repository. + * @return website + **/ + @ApiModelProperty(value = "a URL with more information about the repository.") + public String getWebsite() { + return website; + } + + public void setWebsite(String website) { + this.website = website; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EditRepoOption editRepoOption = (EditRepoOption) o; + return Objects.equals(this.allowMergeCommits, editRepoOption.allowMergeCommits) && + Objects.equals(this.allowRebase, editRepoOption.allowRebase) && + Objects.equals(this.allowRebaseExplicit, editRepoOption.allowRebaseExplicit) && + Objects.equals(this.allowSquashMerge, editRepoOption.allowSquashMerge) && + Objects.equals(this.archived, editRepoOption.archived) && + Objects.equals(this.defaultBranch, editRepoOption.defaultBranch) && + Objects.equals(this.description, editRepoOption.description) && + Objects.equals(this.externalTracker, editRepoOption.externalTracker) && + Objects.equals(this.externalWiki, editRepoOption.externalWiki) && + Objects.equals(this.hasIssues, editRepoOption.hasIssues) && + Objects.equals(this.hasPullRequests, editRepoOption.hasPullRequests) && + Objects.equals(this.hasWiki, editRepoOption.hasWiki) && + Objects.equals(this.ignoreWhitespaceConflicts, editRepoOption.ignoreWhitespaceConflicts) && + Objects.equals(this.internalTracker, editRepoOption.internalTracker) && + Objects.equals(this.name, editRepoOption.name) && + Objects.equals(this._private, editRepoOption._private) && + Objects.equals(this.website, editRepoOption.website); + } + + @Override + public int hashCode() { + return Objects.hash(allowMergeCommits, allowRebase, allowRebaseExplicit, allowSquashMerge, archived, defaultBranch, description, externalTracker, externalWiki, hasIssues, hasPullRequests, hasWiki, ignoreWhitespaceConflicts, internalTracker, name, _private, website); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EditRepoOption {\n"); + + sb.append(" allowMergeCommits: ").append(toIndentedString(allowMergeCommits)).append("\n"); + sb.append(" allowRebase: ").append(toIndentedString(allowRebase)).append("\n"); + sb.append(" allowRebaseExplicit: ").append(toIndentedString(allowRebaseExplicit)).append("\n"); + sb.append(" allowSquashMerge: ").append(toIndentedString(allowSquashMerge)).append("\n"); + sb.append(" archived: ").append(toIndentedString(archived)).append("\n"); + sb.append(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" externalTracker: ").append(toIndentedString(externalTracker)).append("\n"); + sb.append(" externalWiki: ").append(toIndentedString(externalWiki)).append("\n"); + sb.append(" hasIssues: ").append(toIndentedString(hasIssues)).append("\n"); + sb.append(" hasPullRequests: ").append(toIndentedString(hasPullRequests)).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"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); + sb.append(" website: ").append(toIndentedString(website)).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/EditTeamOption.java b/src/main/java/io/gitea/model/EditTeamOption.java index 152975d..6c9f338 100644 --- a/src/main/java/io/gitea/model/EditTeamOption.java +++ b/src/main/java/io/gitea/model/EditTeamOption.java @@ -14,6 +14,7 @@ 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; @@ -22,12 +23,14 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; /** * EditTeamOption options for editing a team */ @ApiModel(description = "EditTeamOption options for editing a team") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditTeamOption { @SerializedName("description") private String description = null; @@ -87,6 +90,9 @@ public PermissionEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("permission") private PermissionEnum permission = null; + @SerializedName("units") + private List units = null; + public EditTeamOption description(String description) { this.description = description; return this; @@ -141,6 +147,32 @@ public void setPermission(PermissionEnum permission) { this.permission = permission; } + public EditTeamOption units(List units) { + this.units = units; + return this; + } + + public EditTeamOption addUnitsItem(String unitsItem) { + if (this.units == null) { + this.units = new ArrayList(); + } + this.units.add(unitsItem); + return this; + } + + /** + * Get units + * @return units + **/ + @ApiModelProperty(example = "[\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.pulls\",\"repo.releases\",\"repo.ext_wiki\"]", value = "") + public List getUnits() { + return units; + } + + public void setUnits(List units) { + this.units = units; + } + @Override public boolean equals(java.lang.Object o) { @@ -153,12 +185,13 @@ public boolean equals(java.lang.Object o) { EditTeamOption editTeamOption = (EditTeamOption) o; return Objects.equals(this.description, editTeamOption.description) && Objects.equals(this.name, editTeamOption.name) && - Objects.equals(this.permission, editTeamOption.permission); + Objects.equals(this.permission, editTeamOption.permission) && + Objects.equals(this.units, editTeamOption.units); } @Override public int hashCode() { - return Objects.hash(description, name, permission); + return Objects.hash(description, name, permission, units); } @@ -170,6 +203,7 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" units: ").append(toIndentedString(units)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/EditUserOption.java b/src/main/java/io/gitea/model/EditUserOption.java index 3d29c17..78e55b7 100644 --- a/src/main/java/io/gitea/model/EditUserOption.java +++ b/src/main/java/io/gitea/model/EditUserOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * EditUserOption edit user options */ @ApiModel(description = "EditUserOption edit user options") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class EditUserOption { @SerializedName("active") private Boolean active = null; @@ -59,6 +60,9 @@ public class EditUserOption { @SerializedName("max_repo_creation") private Long maxRepoCreation = null; + @SerializedName("must_change_password") + private Boolean mustChangePassword = null; + @SerializedName("password") private String password = null; @@ -251,6 +255,24 @@ public void setMaxRepoCreation(Long maxRepoCreation) { this.maxRepoCreation = maxRepoCreation; } + public EditUserOption mustChangePassword(Boolean mustChangePassword) { + this.mustChangePassword = mustChangePassword; + return this; + } + + /** + * Get mustChangePassword + * @return mustChangePassword + **/ + @ApiModelProperty(value = "") + public Boolean isMustChangePassword() { + return mustChangePassword; + } + + public void setMustChangePassword(Boolean mustChangePassword) { + this.mustChangePassword = mustChangePassword; + } + public EditUserOption password(String password) { this.password = password; return this; @@ -343,6 +365,7 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.location, editUserOption.location) && Objects.equals(this.loginName, editUserOption.loginName) && Objects.equals(this.maxRepoCreation, editUserOption.maxRepoCreation) && + Objects.equals(this.mustChangePassword, editUserOption.mustChangePassword) && Objects.equals(this.password, editUserOption.password) && Objects.equals(this.prohibitLogin, editUserOption.prohibitLogin) && Objects.equals(this.sourceId, editUserOption.sourceId) && @@ -351,7 +374,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(active, admin, allowCreateOrganization, allowGitHook, allowImportLocal, email, fullName, location, loginName, maxRepoCreation, password, prohibitLogin, sourceId, website); + return Objects.hash(active, admin, allowCreateOrganization, allowGitHook, allowImportLocal, email, fullName, location, loginName, maxRepoCreation, mustChangePassword, password, prohibitLogin, sourceId, website); } @@ -370,6 +393,7 @@ public String toString() { sb.append(" location: ").append(toIndentedString(location)).append("\n"); sb.append(" loginName: ").append(toIndentedString(loginName)).append("\n"); sb.append(" maxRepoCreation: ").append(toIndentedString(maxRepoCreation)).append("\n"); + sb.append(" mustChangePassword: ").append(toIndentedString(mustChangePassword)).append("\n"); sb.append(" password: ").append(toIndentedString(password)).append("\n"); sb.append(" prohibitLogin: ").append(toIndentedString(prohibitLogin)).append("\n"); sb.append(" sourceId: ").append(toIndentedString(sourceId)).append("\n"); diff --git a/src/main/java/io/gitea/model/Email.java b/src/main/java/io/gitea/model/Email.java index 3f08349..bd8c69b 100644 --- a/src/main/java/io/gitea/model/Email.java +++ b/src/main/java/io/gitea/model/Email.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * Email an email address belonging to a user */ @ApiModel(description = "Email an email address belonging to a user") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Email { @SerializedName("email") private String email = null; diff --git a/src/main/java/io/gitea/model/ExternalTracker.java b/src/main/java/io/gitea/model/ExternalTracker.java new file mode 100644 index 0000000..5feaf40 --- /dev/null +++ b/src/main/java/io/gitea/model/ExternalTracker.java @@ -0,0 +1,141 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * ExternalTracker represents settings for external tracker + */ +@ApiModel(description = "ExternalTracker represents settings for external tracker") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class ExternalTracker { + @SerializedName("external_tracker_format") + private String externalTrackerFormat = null; + + @SerializedName("external_tracker_style") + private String externalTrackerStyle = null; + + @SerializedName("external_tracker_url") + private String externalTrackerUrl = null; + + public ExternalTracker externalTrackerFormat(String externalTrackerFormat) { + this.externalTrackerFormat = externalTrackerFormat; + return this; + } + + /** + * External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index. + * @return externalTrackerFormat + **/ + @ApiModelProperty(value = "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.") + public String getExternalTrackerFormat() { + return externalTrackerFormat; + } + + public void setExternalTrackerFormat(String externalTrackerFormat) { + this.externalTrackerFormat = externalTrackerFormat; + } + + public ExternalTracker externalTrackerStyle(String externalTrackerStyle) { + this.externalTrackerStyle = externalTrackerStyle; + return this; + } + + /** + * External Issue Tracker Number Format, either `numeric` or `alphanumeric` + * @return externalTrackerStyle + **/ + @ApiModelProperty(value = "External Issue Tracker Number Format, either `numeric` or `alphanumeric`") + public String getExternalTrackerStyle() { + return externalTrackerStyle; + } + + public void setExternalTrackerStyle(String externalTrackerStyle) { + this.externalTrackerStyle = externalTrackerStyle; + } + + public ExternalTracker externalTrackerUrl(String externalTrackerUrl) { + this.externalTrackerUrl = externalTrackerUrl; + return this; + } + + /** + * URL of external issue tracker. + * @return externalTrackerUrl + **/ + @ApiModelProperty(value = "URL of external issue tracker.") + public String getExternalTrackerUrl() { + return externalTrackerUrl; + } + + public void setExternalTrackerUrl(String externalTrackerUrl) { + this.externalTrackerUrl = externalTrackerUrl; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalTracker externalTracker = (ExternalTracker) o; + return Objects.equals(this.externalTrackerFormat, externalTracker.externalTrackerFormat) && + Objects.equals(this.externalTrackerStyle, externalTracker.externalTrackerStyle) && + Objects.equals(this.externalTrackerUrl, externalTracker.externalTrackerUrl); + } + + @Override + public int hashCode() { + return Objects.hash(externalTrackerFormat, externalTrackerStyle, externalTrackerUrl); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalTracker {\n"); + + sb.append(" externalTrackerFormat: ").append(toIndentedString(externalTrackerFormat)).append("\n"); + sb.append(" externalTrackerStyle: ").append(toIndentedString(externalTrackerStyle)).append("\n"); + sb.append(" externalTrackerUrl: ").append(toIndentedString(externalTrackerUrl)).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/ExternalWiki.java b/src/main/java/io/gitea/model/ExternalWiki.java new file mode 100644 index 0000000..a4296c0 --- /dev/null +++ b/src/main/java/io/gitea/model/ExternalWiki.java @@ -0,0 +1,95 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * ExternalWiki represents setting for external wiki + */ +@ApiModel(description = "ExternalWiki represents setting for external wiki") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class ExternalWiki { + @SerializedName("external_wiki_url") + private String externalWikiUrl = null; + + public ExternalWiki externalWikiUrl(String externalWikiUrl) { + this.externalWikiUrl = externalWikiUrl; + return this; + } + + /** + * URL of external wiki. + * @return externalWikiUrl + **/ + @ApiModelProperty(value = "URL of external wiki.") + public String getExternalWikiUrl() { + return externalWikiUrl; + } + + public void setExternalWikiUrl(String externalWikiUrl) { + this.externalWikiUrl = externalWikiUrl; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ExternalWiki externalWiki = (ExternalWiki) o; + return Objects.equals(this.externalWikiUrl, externalWiki.externalWikiUrl); + } + + @Override + public int hashCode() { + return Objects.hash(externalWikiUrl); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class ExternalWiki {\n"); + + sb.append(" externalWikiUrl: ").append(toIndentedString(externalWikiUrl)).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/FileCommitResponse.java b/src/main/java/io/gitea/model/FileCommitResponse.java new file mode 100644 index 0000000..05db1f8 --- /dev/null +++ b/src/main/java/io/gitea/model/FileCommitResponse.java @@ -0,0 +1,267 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.CommitMeta; +import io.gitea.model.CommitUser; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * FileCommitResponse + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class FileCommitResponse { + @SerializedName("author") + private CommitUser author = null; + + @SerializedName("committer") + private CommitUser committer = null; + + @SerializedName("html_url") + private String htmlUrl = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("parents") + private List parents = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("tree") + private CommitMeta tree = null; + + @SerializedName("url") + private String url = null; + + public FileCommitResponse author(CommitUser author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + **/ + @ApiModelProperty(value = "") + public CommitUser getAuthor() { + return author; + } + + public void setAuthor(CommitUser author) { + this.author = author; + } + + public FileCommitResponse committer(CommitUser committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + **/ + @ApiModelProperty(value = "") + public CommitUser getCommitter() { + return committer; + } + + public void setCommitter(CommitUser committer) { + this.committer = committer; + } + + public FileCommitResponse 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 FileCommitResponse 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 FileCommitResponse parents(List parents) { + this.parents = parents; + return this; + } + + public FileCommitResponse addParentsItem(CommitMeta parentsItem) { + if (this.parents == null) { + this.parents = new ArrayList(); + } + this.parents.add(parentsItem); + return this; + } + + /** + * Get parents + * @return parents + **/ + @ApiModelProperty(value = "") + public List getParents() { + return parents; + } + + public void setParents(List parents) { + this.parents = parents; + } + + public FileCommitResponse sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public FileCommitResponse tree(CommitMeta tree) { + this.tree = tree; + return this; + } + + /** + * Get tree + * @return tree + **/ + @ApiModelProperty(value = "") + public CommitMeta getTree() { + return tree; + } + + public void setTree(CommitMeta tree) { + this.tree = tree; + } + + public FileCommitResponse 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; + } + FileCommitResponse fileCommitResponse = (FileCommitResponse) o; + return Objects.equals(this.author, fileCommitResponse.author) && + Objects.equals(this.committer, fileCommitResponse.committer) && + Objects.equals(this.htmlUrl, fileCommitResponse.htmlUrl) && + Objects.equals(this.message, fileCommitResponse.message) && + Objects.equals(this.parents, fileCommitResponse.parents) && + Objects.equals(this.sha, fileCommitResponse.sha) && + Objects.equals(this.tree, fileCommitResponse.tree) && + Objects.equals(this.url, fileCommitResponse.url); + } + + @Override + public int hashCode() { + return Objects.hash(author, committer, htmlUrl, message, parents, sha, tree, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileCommitResponse {\n"); + + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" htmlUrl: ").append(toIndentedString(htmlUrl)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" parents: ").append(toIndentedString(parents)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" tree: ").append(toIndentedString(tree)).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/FileDeleteResponse.java b/src/main/java/io/gitea/model/FileDeleteResponse.java new file mode 100644 index 0000000..5d0e54a --- /dev/null +++ b/src/main/java/io/gitea/model/FileDeleteResponse.java @@ -0,0 +1,143 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.FileCommitResponse; +import io.gitea.model.PayloadCommitVerification; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * FileDeleteResponse contains information about a repo's file that was deleted + */ +@ApiModel(description = "FileDeleteResponse contains information about a repo's file that was deleted") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class FileDeleteResponse { + @SerializedName("commit") + private FileCommitResponse commit = null; + + @SerializedName("content") + private Object content = null; + + @SerializedName("verification") + private PayloadCommitVerification verification = null; + + public FileDeleteResponse 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 FileDeleteResponse content(Object content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + public Object getContent() { + return content; + } + + public void setContent(Object content) { + this.content = content; + } + + public FileDeleteResponse 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; + } + FileDeleteResponse fileDeleteResponse = (FileDeleteResponse) o; + return Objects.equals(this.commit, fileDeleteResponse.commit) && + Objects.equals(this.content, fileDeleteResponse.content) && + Objects.equals(this.verification, fileDeleteResponse.verification); + } + + @Override + public int hashCode() { + return Objects.hash(commit, content, verification); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileDeleteResponse {\n"); + + sb.append(" commit: ").append(toIndentedString(commit)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).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/FileLinksResponse.java b/src/main/java/io/gitea/model/FileLinksResponse.java new file mode 100644 index 0000000..dc4305b --- /dev/null +++ b/src/main/java/io/gitea/model/FileLinksResponse.java @@ -0,0 +1,141 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * FileLinksResponse contains the links for a repo's file + */ +@ApiModel(description = "FileLinksResponse contains the links for a repo's file") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class FileLinksResponse { + @SerializedName("git") + private String git = null; + + @SerializedName("html") + private String html = null; + + @SerializedName("self") + private String self = null; + + public FileLinksResponse git(String git) { + this.git = git; + return this; + } + + /** + * Get git + * @return git + **/ + @ApiModelProperty(value = "") + public String getGit() { + return git; + } + + public void setGit(String git) { + this.git = git; + } + + public FileLinksResponse html(String html) { + this.html = html; + return this; + } + + /** + * Get html + * @return html + **/ + @ApiModelProperty(value = "") + public String getHtml() { + return html; + } + + public void setHtml(String html) { + this.html = html; + } + + public FileLinksResponse self(String self) { + this.self = self; + return this; + } + + /** + * Get self + * @return self + **/ + @ApiModelProperty(value = "") + public String getSelf() { + return self; + } + + public void setSelf(String self) { + this.self = self; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FileLinksResponse fileLinksResponse = (FileLinksResponse) o; + return Objects.equals(this.git, fileLinksResponse.git) && + Objects.equals(this.html, fileLinksResponse.html) && + Objects.equals(this.self, fileLinksResponse.self); + } + + @Override + public int hashCode() { + return Objects.hash(git, html, self); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileLinksResponse {\n"); + + sb.append(" git: ").append(toIndentedString(git)).append("\n"); + sb.append(" html: ").append(toIndentedString(html)).append("\n"); + sb.append(" self: ").append(toIndentedString(self)).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/FileResponse.java b/src/main/java/io/gitea/model/FileResponse.java new file mode 100644 index 0000000..850625d --- /dev/null +++ b/src/main/java/io/gitea/model/FileResponse.java @@ -0,0 +1,144 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * FileResponse contains information about a repo's file + */ +@ApiModel(description = "FileResponse contains information about a repo's file") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class FileResponse { + @SerializedName("commit") + private FileCommitResponse commit = null; + + @SerializedName("content") + private ContentsResponse content = null; + + @SerializedName("verification") + private PayloadCommitVerification verification = null; + + public FileResponse 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 FileResponse content(ContentsResponse content) { + this.content = content; + return this; + } + + /** + * Get content + * @return content + **/ + @ApiModelProperty(value = "") + public ContentsResponse getContent() { + return content; + } + + public void setContent(ContentsResponse content) { + this.content = content; + } + + public FileResponse 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; + } + FileResponse fileResponse = (FileResponse) o; + return Objects.equals(this.commit, fileResponse.commit) && + Objects.equals(this.content, fileResponse.content) && + Objects.equals(this.verification, fileResponse.verification); + } + + @Override + public int hashCode() { + return Objects.hash(commit, content, verification); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class FileResponse {\n"); + + sb.append(" commit: ").append(toIndentedString(commit)).append("\n"); + sb.append(" content: ").append(toIndentedString(content)).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 c2cc306..68b1e14 100644 --- a/src/main/java/io/gitea/model/GPGKey.java +++ b/src/main/java/io/gitea/model/GPGKey.java @@ -14,6 +14,7 @@ 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; @@ -32,7 +33,7 @@ * GPGKey a user GPG key to sign commit and tag in repository */ @ApiModel(description = "GPGKey a user GPG key to sign commit and tag in repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class GPGKey { @SerializedName("can_certify") private Boolean canCertify = null; diff --git a/src/main/java/io/gitea/model/GPGKeyEmail.java b/src/main/java/io/gitea/model/GPGKeyEmail.java index b889c78..4ca86ef 100644 --- a/src/main/java/io/gitea/model/GPGKeyEmail.java +++ b/src/main/java/io/gitea/model/GPGKeyEmail.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * GPGKeyEmail an email attached to a GPGKey */ @ApiModel(description = "GPGKeyEmail an email attached to a GPGKey") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class GPGKeyEmail { @SerializedName("email") private String email = null; diff --git a/src/main/java/io/gitea/model/GitBlobResponse.java b/src/main/java/io/gitea/model/GitBlobResponse.java new file mode 100644 index 0000000..3bb434a --- /dev/null +++ b/src/main/java/io/gitea/model/GitBlobResponse.java @@ -0,0 +1,187 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * GitBlobResponse represents a git blob + */ +@ApiModel(description = "GitBlobResponse represents a git blob") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class GitBlobResponse { + @SerializedName("content") + private String content = null; + + @SerializedName("encoding") + private String encoding = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("size") + private Long size = null; + + @SerializedName("url") + private String url = null; + + public GitBlobResponse 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 GitBlobResponse encoding(String encoding) { + this.encoding = encoding; + return this; + } + + /** + * Get encoding + * @return encoding + **/ + @ApiModelProperty(value = "") + public String getEncoding() { + return encoding; + } + + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + public GitBlobResponse sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public GitBlobResponse size(Long size) { + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @ApiModelProperty(value = "") + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public GitBlobResponse 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; + } + GitBlobResponse gitBlobResponse = (GitBlobResponse) o; + return Objects.equals(this.content, gitBlobResponse.content) && + Objects.equals(this.encoding, gitBlobResponse.encoding) && + Objects.equals(this.sha, gitBlobResponse.sha) && + Objects.equals(this.size, gitBlobResponse.size) && + Objects.equals(this.url, gitBlobResponse.url); + } + + @Override + public int hashCode() { + return Objects.hash(content, encoding, sha, size, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GitBlobResponse {\n"); + + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" encoding: ").append(toIndentedString(encoding)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).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/GitEntry.java b/src/main/java/io/gitea/model/GitEntry.java new file mode 100644 index 0000000..b4e7a68 --- /dev/null +++ b/src/main/java/io/gitea/model/GitEntry.java @@ -0,0 +1,210 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * GitEntry represents a git tree + */ +@ApiModel(description = "GitEntry represents a git tree") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class GitEntry { + @SerializedName("mode") + private String mode = null; + + @SerializedName("path") + private String path = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("size") + private Long size = null; + + @SerializedName("type") + private String type = null; + + @SerializedName("url") + private String url = null; + + public GitEntry mode(String mode) { + this.mode = mode; + return this; + } + + /** + * Get mode + * @return mode + **/ + @ApiModelProperty(value = "") + public String getMode() { + return mode; + } + + public void setMode(String mode) { + this.mode = mode; + } + + public GitEntry path(String path) { + this.path = path; + return this; + } + + /** + * Get path + * @return path + **/ + @ApiModelProperty(value = "") + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public GitEntry sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public GitEntry size(Long size) { + this.size = size; + return this; + } + + /** + * Get size + * @return size + **/ + @ApiModelProperty(value = "") + public Long getSize() { + return size; + } + + public void setSize(Long size) { + this.size = size; + } + + public GitEntry type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(value = "") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public GitEntry 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; + } + GitEntry gitEntry = (GitEntry) o; + return Objects.equals(this.mode, gitEntry.mode) && + Objects.equals(this.path, gitEntry.path) && + Objects.equals(this.sha, gitEntry.sha) && + Objects.equals(this.size, gitEntry.size) && + Objects.equals(this.type, gitEntry.type) && + Objects.equals(this.url, gitEntry.url); + } + + @Override + public int hashCode() { + return Objects.hash(mode, path, sha, size, type, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GitEntry {\n"); + + sb.append(" mode: ").append(toIndentedString(mode)).append("\n"); + sb.append(" path: ").append(toIndentedString(path)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" size: ").append(toIndentedString(size)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/GitHook.java b/src/main/java/io/gitea/model/GitHook.java new file mode 100644 index 0000000..8d2a3f0 --- /dev/null +++ b/src/main/java/io/gitea/model/GitHook.java @@ -0,0 +1,141 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * GitHook represents a Git repository hook + */ +@ApiModel(description = "GitHook represents a Git repository hook") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class GitHook { + @SerializedName("content") + private String content = null; + + @SerializedName("is_active") + private Boolean isActive = null; + + @SerializedName("name") + private String name = null; + + public GitHook 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 GitHook isActive(Boolean isActive) { + this.isActive = isActive; + return this; + } + + /** + * Get isActive + * @return isActive + **/ + @ApiModelProperty(value = "") + public Boolean isIsActive() { + return isActive; + } + + public void setIsActive(Boolean isActive) { + this.isActive = isActive; + } + + public GitHook 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; + } + GitHook gitHook = (GitHook) o; + return Objects.equals(this.content, gitHook.content) && + Objects.equals(this.isActive, gitHook.isActive) && + Objects.equals(this.name, gitHook.name); + } + + @Override + public int hashCode() { + return Objects.hash(content, isActive, name); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GitHook {\n"); + + sb.append(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" isActive: ").append(toIndentedString(isActive)).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/GitObject.java b/src/main/java/io/gitea/model/GitObject.java new file mode 100644 index 0000000..f7290bb --- /dev/null +++ b/src/main/java/io/gitea/model/GitObject.java @@ -0,0 +1,140 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * GitObject + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class GitObject { + @SerializedName("sha") + private String sha = null; + + @SerializedName("type") + private String type = null; + + @SerializedName("url") + private String url = null; + + public GitObject sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public GitObject type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(value = "") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public GitObject 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; + } + GitObject gitObject = (GitObject) o; + return Objects.equals(this.sha, gitObject.sha) && + Objects.equals(this.type, gitObject.type) && + Objects.equals(this.url, gitObject.url); + } + + @Override + public int hashCode() { + return Objects.hash(sha, type, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GitObject {\n"); + + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).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/GitTreeResponse.java b/src/main/java/io/gitea/model/GitTreeResponse.java new file mode 100644 index 0000000..d6c3978 --- /dev/null +++ b/src/main/java/io/gitea/model/GitTreeResponse.java @@ -0,0 +1,221 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.GitEntry; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * GitTreeResponse returns a git tree + */ +@ApiModel(description = "GitTreeResponse returns a git tree") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class GitTreeResponse { + @SerializedName("page") + private Long page = null; + + @SerializedName("sha") + private String sha = null; + + @SerializedName("total_count") + private Long totalCount = null; + + @SerializedName("tree") + private List tree = null; + + @SerializedName("truncated") + private Boolean truncated = null; + + @SerializedName("url") + private String url = null; + + public GitTreeResponse page(Long page) { + this.page = page; + return this; + } + + /** + * Get page + * @return page + **/ + @ApiModelProperty(value = "") + public Long getPage() { + return page; + } + + public void setPage(Long page) { + this.page = page; + } + + public GitTreeResponse sha(String sha) { + this.sha = sha; + return this; + } + + /** + * Get sha + * @return sha + **/ + @ApiModelProperty(value = "") + public String getSha() { + return sha; + } + + public void setSha(String sha) { + this.sha = sha; + } + + public GitTreeResponse totalCount(Long totalCount) { + this.totalCount = totalCount; + return this; + } + + /** + * Get totalCount + * @return totalCount + **/ + @ApiModelProperty(value = "") + public Long getTotalCount() { + return totalCount; + } + + public void setTotalCount(Long totalCount) { + this.totalCount = totalCount; + } + + public GitTreeResponse tree(List tree) { + this.tree = tree; + return this; + } + + public GitTreeResponse addTreeItem(GitEntry treeItem) { + if (this.tree == null) { + this.tree = new ArrayList(); + } + this.tree.add(treeItem); + return this; + } + + /** + * Get tree + * @return tree + **/ + @ApiModelProperty(value = "") + public List getTree() { + return tree; + } + + public void setTree(List tree) { + this.tree = tree; + } + + public GitTreeResponse truncated(Boolean truncated) { + this.truncated = truncated; + return this; + } + + /** + * Get truncated + * @return truncated + **/ + @ApiModelProperty(value = "") + public Boolean isTruncated() { + return truncated; + } + + public void setTruncated(Boolean truncated) { + this.truncated = truncated; + } + + public GitTreeResponse 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; + } + GitTreeResponse gitTreeResponse = (GitTreeResponse) o; + return Objects.equals(this.page, gitTreeResponse.page) && + Objects.equals(this.sha, gitTreeResponse.sha) && + Objects.equals(this.totalCount, gitTreeResponse.totalCount) && + Objects.equals(this.tree, gitTreeResponse.tree) && + Objects.equals(this.truncated, gitTreeResponse.truncated) && + Objects.equals(this.url, gitTreeResponse.url); + } + + @Override + public int hashCode() { + return Objects.hash(page, sha, totalCount, tree, truncated, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class GitTreeResponse {\n"); + + sb.append(" page: ").append(toIndentedString(page)).append("\n"); + sb.append(" sha: ").append(toIndentedString(sha)).append("\n"); + sb.append(" totalCount: ").append(toIndentedString(totalCount)).append("\n"); + sb.append(" tree: ").append(toIndentedString(tree)).append("\n"); + sb.append(" truncated: ").append(toIndentedString(truncated)).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/Hook.java b/src/main/java/io/gitea/model/Hook.java new file mode 100644 index 0000000..2b318ee --- /dev/null +++ b/src/main/java/io/gitea/model/Hook.java @@ -0,0 +1,254 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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 java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.threeten.bp.OffsetDateTime; + +/** + * Hook a hook is a web hook when one repository changed + */ +@ApiModel(description = "Hook a hook is a web hook when one repository changed") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class Hook { + @SerializedName("active") + private Boolean active = null; + + @SerializedName("config") + private Map config = null; + + @SerializedName("created_at") + private OffsetDateTime createdAt = null; + + @SerializedName("events") + private List events = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("type") + private String type = null; + + @SerializedName("updated_at") + private OffsetDateTime updatedAt = null; + + public Hook active(Boolean active) { + this.active = active; + return this; + } + + /** + * Get active + * @return active + **/ + @ApiModelProperty(value = "") + public Boolean isActive() { + return active; + } + + public void setActive(Boolean active) { + this.active = active; + } + + public Hook config(Map config) { + this.config = config; + return this; + } + + public Hook putConfigItem(String key, String configItem) { + if (this.config == null) { + this.config = new HashMap(); + } + this.config.put(key, configItem); + return this; + } + + /** + * Get config + * @return config + **/ + @ApiModelProperty(value = "") + public Map getConfig() { + return config; + } + + public void setConfig(Map config) { + this.config = config; + } + + public Hook 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 Hook events(List events) { + this.events = events; + return this; + } + + public Hook addEventsItem(String eventsItem) { + if (this.events == null) { + this.events = new ArrayList(); + } + this.events.add(eventsItem); + return this; + } + + /** + * Get events + * @return events + **/ + @ApiModelProperty(value = "") + public List getEvents() { + return events; + } + + public void setEvents(List events) { + this.events = events; + } + + public Hook 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 Hook type(String type) { + this.type = type; + return this; + } + + /** + * Get type + * @return type + **/ + @ApiModelProperty(value = "") + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + public Hook 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; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Hook hook = (Hook) o; + return Objects.equals(this.active, hook.active) && + Objects.equals(this.config, hook.config) && + Objects.equals(this.createdAt, hook.createdAt) && + Objects.equals(this.events, hook.events) && + Objects.equals(this.id, hook.id) && + Objects.equals(this.type, hook.type) && + Objects.equals(this.updatedAt, hook.updatedAt); + } + + @Override + public int hashCode() { + return Objects.hash(active, config, createdAt, events, id, type, updatedAt); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Hook {\n"); + + sb.append(" active: ").append(toIndentedString(active)).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"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" updatedAt: ").append(toIndentedString(updatedAt)).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/AccessTokenName.java b/src/main/java/io/gitea/model/Identity.java similarity index 63% rename from src/main/java/io/gitea/model/AccessTokenName.java rename to src/main/java/io/gitea/model/Identity.java index 457d836..1f6f93a 100644 --- a/src/main/java/io/gitea/model/AccessTokenName.java +++ b/src/main/java/io/gitea/model/Identity.java @@ -14,6 +14,7 @@ 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; @@ -24,14 +25,36 @@ import java.io.IOException; /** - * AccessTokenName + * Identity for a person's identity like an author or committer */ -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") -public class AccessTokenName { +@ApiModel(description = "Identity for a person's identity like an author or committer") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class Identity { + @SerializedName("email") + private String email = null; + @SerializedName("name") private String name = null; - public AccessTokenName name(String name) { + public Identity 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 Identity name(String name) { this.name = name; return this; } @@ -40,7 +63,7 @@ public AccessTokenName name(String name) { * Get name * @return name **/ - @ApiModelProperty(required = true, value = "") + @ApiModelProperty(value = "") public String getName() { return name; } @@ -58,21 +81,23 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - AccessTokenName accessTokenName = (AccessTokenName) o; - return Objects.equals(this.name, accessTokenName.name); + Identity identity = (Identity) o; + return Objects.equals(this.email, identity.email) && + Objects.equals(this.name, identity.name); } @Override public int hashCode() { - return Objects.hash(name); + return Objects.hash(email, name); } @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class AccessTokenName {\n"); + sb.append("class Identity {\n"); + sb.append(" email: ").append(toIndentedString(email)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/InlineResponse200.java b/src/main/java/io/gitea/model/InlineResponse200.java new file mode 100644 index 0000000..7b34b4a --- /dev/null +++ b/src/main/java/io/gitea/model/InlineResponse200.java @@ -0,0 +1,128 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.Team; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * InlineResponse200 + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class InlineResponse200 { + @SerializedName("data") + private List data = null; + + @SerializedName("ok") + private Boolean ok = null; + + public InlineResponse200 data(List data) { + this.data = data; + return this; + } + + public InlineResponse200 addDataItem(Team dataItem) { + if (this.data == null) { + this.data = new ArrayList(); + } + this.data.add(dataItem); + return this; + } + + /** + * Get data + * @return data + **/ + @ApiModelProperty(value = "") + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + public InlineResponse200 ok(Boolean ok) { + this.ok = ok; + return this; + } + + /** + * Get ok + * @return ok + **/ + @ApiModelProperty(value = "") + public Boolean isOk() { + return ok; + } + + public void setOk(Boolean ok) { + this.ok = ok; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InlineResponse200 inlineResponse200 = (InlineResponse200) o; + return Objects.equals(this.data, inlineResponse200.data) && + Objects.equals(this.ok, inlineResponse200.ok); + } + + @Override + public int hashCode() { + return Objects.hash(data, ok); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InlineResponse200 {\n"); + + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" ok: ").append(toIndentedString(ok)).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/UserSearchList.java b/src/main/java/io/gitea/model/InlineResponse2001.java similarity index 81% rename from src/main/java/io/gitea/model/UserSearchList.java rename to src/main/java/io/gitea/model/InlineResponse2001.java index 40de361..38580d7 100644 --- a/src/main/java/io/gitea/model/UserSearchList.java +++ b/src/main/java/io/gitea/model/InlineResponse2001.java @@ -14,6 +14,7 @@ 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; @@ -27,23 +28,22 @@ import java.util.List; /** - * UserSearchList + * InlineResponse2001 */ -@ApiModel(description = "UserSearchList") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") -public class UserSearchList { +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class InlineResponse2001 { @SerializedName("data") private List data = null; @SerializedName("ok") private Boolean ok = null; - public UserSearchList data(List data) { + public InlineResponse2001 data(List data) { this.data = data; return this; } - public UserSearchList addDataItem(User dataItem) { + public InlineResponse2001 addDataItem(User dataItem) { if (this.data == null) { this.data = new ArrayList(); } @@ -64,7 +64,7 @@ public void setData(List data) { this.data = data; } - public UserSearchList ok(Boolean ok) { + public InlineResponse2001 ok(Boolean ok) { this.ok = ok; return this; } @@ -91,9 +91,9 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - UserSearchList userSearchList = (UserSearchList) o; - return Objects.equals(this.data, userSearchList.data) && - Objects.equals(this.ok, userSearchList.ok); + InlineResponse2001 inlineResponse2001 = (InlineResponse2001) o; + return Objects.equals(this.data, inlineResponse2001.data) && + Objects.equals(this.ok, inlineResponse2001.ok); } @Override @@ -105,7 +105,7 @@ public int hashCode() { @Override public String toString() { StringBuilder sb = new StringBuilder(); - sb.append("class UserSearchList {\n"); + sb.append("class InlineResponse2001 {\n"); sb.append(" data: ").append(toIndentedString(data)).append("\n"); sb.append(" ok: ").append(toIndentedString(ok)).append("\n"); diff --git a/src/main/java/io/gitea/model/InternalTracker.java b/src/main/java/io/gitea/model/InternalTracker.java new file mode 100644 index 0000000..ea56c99 --- /dev/null +++ b/src/main/java/io/gitea/model/InternalTracker.java @@ -0,0 +1,141 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * InternalTracker represents settings for internal tracker + */ +@ApiModel(description = "InternalTracker represents settings for internal tracker") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class InternalTracker { + @SerializedName("allow_only_contributors_to_track_time") + private Boolean allowOnlyContributorsToTrackTime = null; + + @SerializedName("enable_issue_dependencies") + private Boolean enableIssueDependencies = null; + + @SerializedName("enable_time_tracker") + private Boolean enableTimeTracker = null; + + public InternalTracker allowOnlyContributorsToTrackTime(Boolean allowOnlyContributorsToTrackTime) { + this.allowOnlyContributorsToTrackTime = allowOnlyContributorsToTrackTime; + return this; + } + + /** + * Let only contributors track time (Built-in issue tracker) + * @return allowOnlyContributorsToTrackTime + **/ + @ApiModelProperty(value = "Let only contributors track time (Built-in issue tracker)") + public Boolean isAllowOnlyContributorsToTrackTime() { + return allowOnlyContributorsToTrackTime; + } + + public void setAllowOnlyContributorsToTrackTime(Boolean allowOnlyContributorsToTrackTime) { + this.allowOnlyContributorsToTrackTime = allowOnlyContributorsToTrackTime; + } + + public InternalTracker enableIssueDependencies(Boolean enableIssueDependencies) { + this.enableIssueDependencies = enableIssueDependencies; + return this; + } + + /** + * Enable dependencies for issues and pull requests (Built-in issue tracker) + * @return enableIssueDependencies + **/ + @ApiModelProperty(value = "Enable dependencies for issues and pull requests (Built-in issue tracker)") + public Boolean isEnableIssueDependencies() { + return enableIssueDependencies; + } + + public void setEnableIssueDependencies(Boolean enableIssueDependencies) { + this.enableIssueDependencies = enableIssueDependencies; + } + + public InternalTracker enableTimeTracker(Boolean enableTimeTracker) { + this.enableTimeTracker = enableTimeTracker; + return this; + } + + /** + * Enable time tracking (Built-in issue tracker) + * @return enableTimeTracker + **/ + @ApiModelProperty(value = "Enable time tracking (Built-in issue tracker)") + public Boolean isEnableTimeTracker() { + return enableTimeTracker; + } + + public void setEnableTimeTracker(Boolean enableTimeTracker) { + this.enableTimeTracker = enableTimeTracker; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InternalTracker internalTracker = (InternalTracker) o; + return Objects.equals(this.allowOnlyContributorsToTrackTime, internalTracker.allowOnlyContributorsToTrackTime) && + Objects.equals(this.enableIssueDependencies, internalTracker.enableIssueDependencies) && + Objects.equals(this.enableTimeTracker, internalTracker.enableTimeTracker); + } + + @Override + public int hashCode() { + return Objects.hash(allowOnlyContributorsToTrackTime, enableIssueDependencies, enableTimeTracker); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class InternalTracker {\n"); + + sb.append(" allowOnlyContributorsToTrackTime: ").append(toIndentedString(allowOnlyContributorsToTrackTime)).append("\n"); + sb.append(" enableIssueDependencies: ").append(toIndentedString(enableIssueDependencies)).append("\n"); + sb.append(" enableTimeTracker: ").append(toIndentedString(enableTimeTracker)).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/Issue.java b/src/main/java/io/gitea/model/Issue.java index d21e41a..b2bae0c 100644 --- a/src/main/java/io/gitea/model/Issue.java +++ b/src/main/java/io/gitea/model/Issue.java @@ -14,6 +14,7 @@ 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; @@ -34,7 +35,7 @@ * Issue represents an issue in a repository */ @ApiModel(description = "Issue represents an issue in a repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Issue { @SerializedName("assignee") private User assignee = null; @@ -69,6 +70,12 @@ public class Issue { @SerializedName("number") private Long number = null; + @SerializedName("original_author") + private String originalAuthor = null; + + @SerializedName("original_author_id") + private Long originalAuthorId = null; + @SerializedName("pull_request") private PullRequestMeta pullRequest = null; @@ -301,6 +308,42 @@ public void setNumber(Long number) { this.number = number; } + public Issue originalAuthor(String originalAuthor) { + this.originalAuthor = originalAuthor; + return this; + } + + /** + * Get originalAuthor + * @return originalAuthor + **/ + @ApiModelProperty(value = "") + public String getOriginalAuthor() { + return originalAuthor; + } + + public void setOriginalAuthor(String originalAuthor) { + this.originalAuthor = originalAuthor; + } + + public Issue originalAuthorId(Long originalAuthorId) { + this.originalAuthorId = originalAuthorId; + return this; + } + + /** + * Get originalAuthorId + * @return originalAuthorId + **/ + @ApiModelProperty(value = "") + public Long getOriginalAuthorId() { + return originalAuthorId; + } + + public void setOriginalAuthorId(Long originalAuthorId) { + this.originalAuthorId = originalAuthorId; + } + public Issue pullRequest(PullRequestMeta pullRequest) { this.pullRequest = pullRequest; return this; @@ -430,6 +473,8 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.labels, issue.labels) && Objects.equals(this.milestone, issue.milestone) && Objects.equals(this.number, issue.number) && + Objects.equals(this.originalAuthor, issue.originalAuthor) && + Objects.equals(this.originalAuthorId, issue.originalAuthorId) && Objects.equals(this.pullRequest, issue.pullRequest) && Objects.equals(this.state, issue.state) && Objects.equals(this.title, issue.title) && @@ -440,7 +485,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(assignee, assignees, body, closedAt, comments, createdAt, dueDate, id, labels, milestone, number, pullRequest, state, title, updatedAt, url, user); + return Objects.hash(assignee, assignees, body, closedAt, comments, createdAt, dueDate, id, labels, milestone, number, originalAuthor, originalAuthorId, pullRequest, state, title, updatedAt, url, user); } @@ -460,6 +505,8 @@ public String toString() { sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); sb.append(" milestone: ").append(toIndentedString(milestone)).append("\n"); 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(" pullRequest: ").append(toIndentedString(pullRequest)).append("\n"); sb.append(" state: ").append(toIndentedString(state)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); diff --git a/src/main/java/io/gitea/model/IssueDeadline.java b/src/main/java/io/gitea/model/IssueDeadline.java index 273f2b6..905b25d 100644 --- a/src/main/java/io/gitea/model/IssueDeadline.java +++ b/src/main/java/io/gitea/model/IssueDeadline.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * IssueDeadline represents an issue deadline */ @ApiModel(description = "IssueDeadline represents an issue deadline") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class IssueDeadline { @SerializedName("due_date") private OffsetDateTime dueDate = null; diff --git a/src/main/java/io/gitea/model/IssueLabelsOption.java b/src/main/java/io/gitea/model/IssueLabelsOption.java index 1424851..58a7a66 100644 --- a/src/main/java/io/gitea/model/IssueLabelsOption.java +++ b/src/main/java/io/gitea/model/IssueLabelsOption.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * IssueLabelsOption a collection of labels */ @ApiModel(description = "IssueLabelsOption a collection of labels") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class IssueLabelsOption { @SerializedName("labels") private List labels = null; diff --git a/src/main/java/io/gitea/model/Label.java b/src/main/java/io/gitea/model/Label.java index 287e398..af0b18a 100644 --- a/src/main/java/io/gitea/model/Label.java +++ b/src/main/java/io/gitea/model/Label.java @@ -14,6 +14,7 @@ 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; @@ -27,11 +28,14 @@ * Label a label to an issue or a pr */ @ApiModel(description = "Label a label to an issue or a pr") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Label { @SerializedName("color") private String color = null; + @SerializedName("description") + private String description = null; + @SerializedName("id") private Long id = null; @@ -59,6 +63,24 @@ public void setColor(String color) { this.color = color; } + public Label 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 Label id(Long id) { this.id = id; return this; @@ -124,6 +146,7 @@ public boolean equals(java.lang.Object o) { } Label label = (Label) o; return Objects.equals(this.color, label.color) && + Objects.equals(this.description, label.description) && Objects.equals(this.id, label.id) && Objects.equals(this.name, label.name) && Objects.equals(this.url, label.url); @@ -131,7 +154,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(color, id, name, url); + return Objects.hash(color, description, id, name, url); } @@ -141,6 +164,7 @@ public String toString() { sb.append("class Label {\n"); sb.append(" color: ").append(toIndentedString(color)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); diff --git a/src/main/java/io/gitea/model/MarkdownOption.java b/src/main/java/io/gitea/model/MarkdownOption.java index 1756d7a..16b78e9 100644 --- a/src/main/java/io/gitea/model/MarkdownOption.java +++ b/src/main/java/io/gitea/model/MarkdownOption.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * MarkdownOption markdown options */ @ApiModel(description = "MarkdownOption markdown options") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class MarkdownOption { @SerializedName("Context") private String context = null; diff --git a/src/main/java/io/gitea/model/MergePullRequestOption.java b/src/main/java/io/gitea/model/MergePullRequestOption.java new file mode 100644 index 0000000..82dd24d --- /dev/null +++ b/src/main/java/io/gitea/model/MergePullRequestOption.java @@ -0,0 +1,192 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * MergePullRequestForm form for merging Pull Request + */ +@ApiModel(description = "MergePullRequestForm form for merging Pull Request") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class MergePullRequestOption { + /** + * Gets or Sets _do + */ + @JsonAdapter(DoEnum.Adapter.class) + public enum DoEnum { + MERGE("merge"), + + REBASE("rebase"), + + REBASE_MERGE("rebase-merge"), + + SQUASH("squash"); + + private String value; + + DoEnum(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static DoEnum fromValue(String text) { + for (DoEnum b : DoEnum.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 DoEnum enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public DoEnum read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return DoEnum.fromValue(String.valueOf(value)); + } + } + } + + @SerializedName("Do") + private DoEnum _do = null; + + @SerializedName("MergeMessageField") + private String mergeMessageField = null; + + @SerializedName("MergeTitleField") + private String mergeTitleField = null; + + public MergePullRequestOption _do(DoEnum _do) { + this._do = _do; + return this; + } + + /** + * Get _do + * @return _do + **/ + @ApiModelProperty(required = true, value = "") + public DoEnum getDo() { + return _do; + } + + public void setDo(DoEnum _do) { + this._do = _do; + } + + public MergePullRequestOption mergeMessageField(String mergeMessageField) { + this.mergeMessageField = mergeMessageField; + return this; + } + + /** + * Get mergeMessageField + * @return mergeMessageField + **/ + @ApiModelProperty(value = "") + public String getMergeMessageField() { + return mergeMessageField; + } + + public void setMergeMessageField(String mergeMessageField) { + this.mergeMessageField = mergeMessageField; + } + + public MergePullRequestOption mergeTitleField(String mergeTitleField) { + this.mergeTitleField = mergeTitleField; + return this; + } + + /** + * Get mergeTitleField + * @return mergeTitleField + **/ + @ApiModelProperty(value = "") + public String getMergeTitleField() { + return mergeTitleField; + } + + public void setMergeTitleField(String mergeTitleField) { + this.mergeTitleField = mergeTitleField; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MergePullRequestOption mergePullRequestOption = (MergePullRequestOption) o; + return Objects.equals(this._do, mergePullRequestOption._do) && + Objects.equals(this.mergeMessageField, mergePullRequestOption.mergeMessageField) && + Objects.equals(this.mergeTitleField, mergePullRequestOption.mergeTitleField); + } + + @Override + public int hashCode() { + return Objects.hash(_do, mergeMessageField, mergeTitleField); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class MergePullRequestOption {\n"); + + sb.append(" _do: ").append(toIndentedString(_do)).append("\n"); + sb.append(" mergeMessageField: ").append(toIndentedString(mergeMessageField)).append("\n"); + sb.append(" mergeTitleField: ").append(toIndentedString(mergeTitleField)).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/MigrateRepoForm.java b/src/main/java/io/gitea/model/MigrateRepoForm.java index 8445d4c..6c537b9 100644 --- a/src/main/java/io/gitea/model/MigrateRepoForm.java +++ b/src/main/java/io/gitea/model/MigrateRepoForm.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * MigrateRepoForm form for migrating repository */ @ApiModel(description = "MigrateRepoForm form for migrating repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class MigrateRepoForm { @SerializedName("auth_password") private String authPassword = null; @@ -41,18 +42,36 @@ public class MigrateRepoForm { @SerializedName("description") private String description = null; + @SerializedName("issues") + private Boolean issues = null; + + @SerializedName("labels") + private Boolean labels = null; + + @SerializedName("milestones") + private Boolean milestones = null; + @SerializedName("mirror") private Boolean mirror = null; @SerializedName("private") private Boolean _private = null; + @SerializedName("pull_requests") + private Boolean pullRequests = null; + + @SerializedName("releases") + private Boolean releases = null; + @SerializedName("repo_name") private String repoName = null; @SerializedName("uid") private Long uid = null; + @SerializedName("wiki") + private Boolean wiki = null; + public MigrateRepoForm authPassword(String authPassword) { this.authPassword = authPassword; return this; @@ -125,6 +144,60 @@ public void setDescription(String description) { this.description = description; } + public MigrateRepoForm 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 MigrateRepoForm labels(Boolean labels) { + this.labels = labels; + return this; + } + + /** + * Get labels + * @return labels + **/ + @ApiModelProperty(value = "") + public Boolean isLabels() { + return labels; + } + + public void setLabels(Boolean labels) { + this.labels = labels; + } + + public MigrateRepoForm milestones(Boolean milestones) { + this.milestones = milestones; + return this; + } + + /** + * Get milestones + * @return milestones + **/ + @ApiModelProperty(value = "") + public Boolean isMilestones() { + return milestones; + } + + public void setMilestones(Boolean milestones) { + this.milestones = milestones; + } + public MigrateRepoForm mirror(Boolean mirror) { this.mirror = mirror; return this; @@ -161,6 +234,42 @@ public void setPrivate(Boolean _private) { this._private = _private; } + public MigrateRepoForm 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; + } + + public MigrateRepoForm releases(Boolean releases) { + this.releases = releases; + return this; + } + + /** + * Get releases + * @return releases + **/ + @ApiModelProperty(value = "") + public Boolean isReleases() { + return releases; + } + + public void setReleases(Boolean releases) { + this.releases = releases; + } + public MigrateRepoForm repoName(String repoName) { this.repoName = repoName; return this; @@ -197,6 +306,24 @@ public void setUid(Long uid) { this.uid = uid; } + public MigrateRepoForm wiki(Boolean wiki) { + this.wiki = wiki; + return this; + } + + /** + * Get wiki + * @return wiki + **/ + @ApiModelProperty(value = "") + public Boolean isWiki() { + return wiki; + } + + public void setWiki(Boolean wiki) { + this.wiki = wiki; + } + @Override public boolean equals(java.lang.Object o) { @@ -211,15 +338,21 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.authUsername, migrateRepoForm.authUsername) && Objects.equals(this.cloneAddr, migrateRepoForm.cloneAddr) && Objects.equals(this.description, migrateRepoForm.description) && + Objects.equals(this.issues, migrateRepoForm.issues) && + Objects.equals(this.labels, migrateRepoForm.labels) && + Objects.equals(this.milestones, migrateRepoForm.milestones) && Objects.equals(this.mirror, migrateRepoForm.mirror) && Objects.equals(this._private, migrateRepoForm._private) && + Objects.equals(this.pullRequests, migrateRepoForm.pullRequests) && + Objects.equals(this.releases, migrateRepoForm.releases) && Objects.equals(this.repoName, migrateRepoForm.repoName) && - Objects.equals(this.uid, migrateRepoForm.uid); + Objects.equals(this.uid, migrateRepoForm.uid) && + Objects.equals(this.wiki, migrateRepoForm.wiki); } @Override public int hashCode() { - return Objects.hash(authPassword, authUsername, cloneAddr, description, mirror, _private, repoName, uid); + return Objects.hash(authPassword, authUsername, cloneAddr, description, issues, labels, milestones, mirror, _private, pullRequests, releases, repoName, uid, wiki); } @@ -232,10 +365,16 @@ public String toString() { sb.append(" authUsername: ").append(toIndentedString(authUsername)).append("\n"); sb.append(" cloneAddr: ").append(toIndentedString(cloneAddr)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" issues: ").append(toIndentedString(issues)).append("\n"); + sb.append(" labels: ").append(toIndentedString(labels)).append("\n"); + sb.append(" milestones: ").append(toIndentedString(milestones)).append("\n"); sb.append(" mirror: ").append(toIndentedString(mirror)).append("\n"); sb.append(" _private: ").append(toIndentedString(_private)).append("\n"); + sb.append(" pullRequests: ").append(toIndentedString(pullRequests)).append("\n"); + sb.append(" releases: ").append(toIndentedString(releases)).append("\n"); sb.append(" repoName: ").append(toIndentedString(repoName)).append("\n"); sb.append(" uid: ").append(toIndentedString(uid)).append("\n"); + sb.append(" wiki: ").append(toIndentedString(wiki)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/Milestone.java b/src/main/java/io/gitea/model/Milestone.java index 50baba8..f89e454 100644 --- a/src/main/java/io/gitea/model/Milestone.java +++ b/src/main/java/io/gitea/model/Milestone.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * Milestone milestone is a collection of issues on one repository */ @ApiModel(description = "Milestone milestone is a collection of issues on one repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Milestone { @SerializedName("closed_at") private OffsetDateTime closedAt = null; diff --git a/src/main/java/io/gitea/model/Organization.java b/src/main/java/io/gitea/model/Organization.java index 5bfab4d..567da97 100644 --- a/src/main/java/io/gitea/model/Organization.java +++ b/src/main/java/io/gitea/model/Organization.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * Organization represents an organization */ @ApiModel(description = "Organization represents an organization") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Organization { @SerializedName("avatar_url") private String avatarUrl = null; @@ -44,9 +45,15 @@ public class Organization { @SerializedName("location") private String location = null; + @SerializedName("repo_admin_change_team_access") + private Boolean repoAdminChangeTeamAccess = null; + @SerializedName("username") private String username = null; + @SerializedName("visibility") + private String visibility = null; + @SerializedName("website") private String website = null; @@ -140,6 +147,24 @@ public void setLocation(String location) { this.location = location; } + public Organization repoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) { + this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess; + return this; + } + + /** + * Get repoAdminChangeTeamAccess + * @return repoAdminChangeTeamAccess + **/ + @ApiModelProperty(value = "") + public Boolean isRepoAdminChangeTeamAccess() { + return repoAdminChangeTeamAccess; + } + + public void setRepoAdminChangeTeamAccess(Boolean repoAdminChangeTeamAccess) { + this.repoAdminChangeTeamAccess = repoAdminChangeTeamAccess; + } + public Organization username(String username) { this.username = username; return this; @@ -158,6 +183,24 @@ public void setUsername(String username) { this.username = username; } + public Organization visibility(String visibility) { + this.visibility = visibility; + return this; + } + + /** + * Get visibility + * @return visibility + **/ + @ApiModelProperty(value = "") + public String getVisibility() { + return visibility; + } + + public void setVisibility(String visibility) { + this.visibility = visibility; + } + public Organization website(String website) { this.website = website; return this; @@ -191,13 +234,15 @@ public boolean equals(java.lang.Object o) { Objects.equals(this.fullName, organization.fullName) && Objects.equals(this.id, organization.id) && Objects.equals(this.location, organization.location) && + Objects.equals(this.repoAdminChangeTeamAccess, organization.repoAdminChangeTeamAccess) && Objects.equals(this.username, organization.username) && + Objects.equals(this.visibility, organization.visibility) && Objects.equals(this.website, organization.website); } @Override public int hashCode() { - return Objects.hash(avatarUrl, description, fullName, id, location, username, website); + return Objects.hash(avatarUrl, description, fullName, id, location, repoAdminChangeTeamAccess, username, visibility, website); } @@ -211,7 +256,9 @@ public String toString() { sb.append(" fullName: ").append(toIndentedString(fullName)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" location: ").append(toIndentedString(location)).append("\n"); + sb.append(" repoAdminChangeTeamAccess: ").append(toIndentedString(repoAdminChangeTeamAccess)).append("\n"); sb.append(" username: ").append(toIndentedString(username)).append("\n"); + sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/PRBranchInfo.java b/src/main/java/io/gitea/model/PRBranchInfo.java index 7442833..16f6f3b 100644 --- a/src/main/java/io/gitea/model/PRBranchInfo.java +++ b/src/main/java/io/gitea/model/PRBranchInfo.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * PRBranchInfo information about a branch */ @ApiModel(description = "PRBranchInfo information about a branch") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PRBranchInfo { @SerializedName("label") private String label = null; diff --git a/src/main/java/io/gitea/model/PayloadCommit.java b/src/main/java/io/gitea/model/PayloadCommit.java index a6f339e..445facc 100644 --- a/src/main/java/io/gitea/model/PayloadCommit.java +++ b/src/main/java/io/gitea/model/PayloadCommit.java @@ -14,6 +14,7 @@ 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; @@ -24,14 +25,19 @@ 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; /** * PayloadCommit represents a commit */ @ApiModel(description = "PayloadCommit represents a commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PayloadCommit { + @SerializedName("added") + private List added = null; + @SerializedName("author") private PayloadUser author = null; @@ -44,6 +50,12 @@ public class PayloadCommit { @SerializedName("message") private String message = null; + @SerializedName("modified") + private List modified = null; + + @SerializedName("removed") + private List removed = null; + @SerializedName("timestamp") private OffsetDateTime timestamp = null; @@ -53,6 +65,32 @@ public class PayloadCommit { @SerializedName("verification") private PayloadCommitVerification verification = null; + public PayloadCommit added(List added) { + this.added = added; + return this; + } + + public PayloadCommit addAddedItem(String addedItem) { + if (this.added == null) { + this.added = new ArrayList(); + } + this.added.add(addedItem); + return this; + } + + /** + * Get added + * @return added + **/ + @ApiModelProperty(value = "") + public List getAdded() { + return added; + } + + public void setAdded(List added) { + this.added = added; + } + public PayloadCommit author(PayloadUser author) { this.author = author; return this; @@ -125,6 +163,58 @@ public void setMessage(String message) { this.message = message; } + public PayloadCommit modified(List modified) { + this.modified = modified; + return this; + } + + public PayloadCommit addModifiedItem(String modifiedItem) { + if (this.modified == null) { + this.modified = new ArrayList(); + } + this.modified.add(modifiedItem); + return this; + } + + /** + * Get modified + * @return modified + **/ + @ApiModelProperty(value = "") + public List getModified() { + return modified; + } + + public void setModified(List modified) { + this.modified = modified; + } + + public PayloadCommit removed(List removed) { + this.removed = removed; + return this; + } + + public PayloadCommit addRemovedItem(String removedItem) { + if (this.removed == null) { + this.removed = new ArrayList(); + } + this.removed.add(removedItem); + return this; + } + + /** + * Get removed + * @return removed + **/ + @ApiModelProperty(value = "") + public List getRemoved() { + return removed; + } + + public void setRemoved(List removed) { + this.removed = removed; + } + public PayloadCommit timestamp(OffsetDateTime timestamp) { this.timestamp = timestamp; return this; @@ -189,10 +279,13 @@ public boolean equals(java.lang.Object o) { return false; } PayloadCommit payloadCommit = (PayloadCommit) o; - return Objects.equals(this.author, payloadCommit.author) && + return Objects.equals(this.added, payloadCommit.added) && + Objects.equals(this.author, payloadCommit.author) && Objects.equals(this.committer, payloadCommit.committer) && Objects.equals(this.id, payloadCommit.id) && Objects.equals(this.message, payloadCommit.message) && + Objects.equals(this.modified, payloadCommit.modified) && + Objects.equals(this.removed, payloadCommit.removed) && Objects.equals(this.timestamp, payloadCommit.timestamp) && Objects.equals(this.url, payloadCommit.url) && Objects.equals(this.verification, payloadCommit.verification); @@ -200,7 +293,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(author, committer, id, message, timestamp, url, verification); + return Objects.hash(added, author, committer, id, message, modified, removed, timestamp, url, verification); } @@ -209,10 +302,13 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class PayloadCommit {\n"); + sb.append(" added: ").append(toIndentedString(added)).append("\n"); sb.append(" author: ").append(toIndentedString(author)).append("\n"); sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" modified: ").append(toIndentedString(modified)).append("\n"); + sb.append(" removed: ").append(toIndentedString(removed)).append("\n"); sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n"); sb.append(" url: ").append(toIndentedString(url)).append("\n"); sb.append(" verification: ").append(toIndentedString(verification)).append("\n"); diff --git a/src/main/java/io/gitea/model/PayloadCommitVerification.java b/src/main/java/io/gitea/model/PayloadCommitVerification.java index 18967e5..2e33466 100644 --- a/src/main/java/io/gitea/model/PayloadCommitVerification.java +++ b/src/main/java/io/gitea/model/PayloadCommitVerification.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * PayloadCommitVerification represents the GPG verification of a commit */ @ApiModel(description = "PayloadCommitVerification represents the GPG verification of a commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PayloadCommitVerification { @SerializedName("payload") private String payload = null; diff --git a/src/main/java/io/gitea/model/PayloadUser.java b/src/main/java/io/gitea/model/PayloadUser.java index 5e59249..4e08c6a 100644 --- a/src/main/java/io/gitea/model/PayloadUser.java +++ b/src/main/java/io/gitea/model/PayloadUser.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * PayloadUser represents the author or committer of a commit */ @ApiModel(description = "PayloadUser represents the author or committer of a commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PayloadUser { @SerializedName("email") private String email = null; diff --git a/src/main/java/io/gitea/model/Permission.java b/src/main/java/io/gitea/model/Permission.java index 09d5c7a..b546069 100644 --- a/src/main/java/io/gitea/model/Permission.java +++ b/src/main/java/io/gitea/model/Permission.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * Permission represents a set of permissions */ @ApiModel(description = "Permission represents a set of permissions") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Permission { @SerializedName("admin") private Boolean admin = null; diff --git a/src/main/java/io/gitea/model/PublicKey.java b/src/main/java/io/gitea/model/PublicKey.java index a3870c7..4ad926a 100644 --- a/src/main/java/io/gitea/model/PublicKey.java +++ b/src/main/java/io/gitea/model/PublicKey.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * PublicKey publickey is a user key to push code to repository */ @ApiModel(description = "PublicKey publickey is a user key to push code to repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PublicKey { @SerializedName("created_at") private OffsetDateTime createdAt = null; diff --git a/src/main/java/io/gitea/model/PullRequest.java b/src/main/java/io/gitea/model/PullRequest.java index 2f92777..4cb4b3e 100644 --- a/src/main/java/io/gitea/model/PullRequest.java +++ b/src/main/java/io/gitea/model/PullRequest.java @@ -14,6 +14,7 @@ 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; @@ -34,7 +35,7 @@ * PullRequest represents a pull request */ @ApiModel(description = "PullRequest represents a pull request") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PullRequest { @SerializedName("assignee") private User assignee = null; diff --git a/src/main/java/io/gitea/model/PullRequestMeta.java b/src/main/java/io/gitea/model/PullRequestMeta.java index 34548ac..8e28861 100644 --- a/src/main/java/io/gitea/model/PullRequestMeta.java +++ b/src/main/java/io/gitea/model/PullRequestMeta.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * PullRequestMeta PR info if an issue is a PR */ @ApiModel(description = "PullRequestMeta PR info if an issue is a PR") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class PullRequestMeta { @SerializedName("merged") private Boolean merged = null; diff --git a/src/main/java/io/gitea/model/Reference.java b/src/main/java/io/gitea/model/Reference.java new file mode 100644 index 0000000..4dbbaf6 --- /dev/null +++ b/src/main/java/io/gitea/model/Reference.java @@ -0,0 +1,141 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.GitObject; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Reference + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class Reference { + @SerializedName("object") + private GitObject object = null; + + @SerializedName("ref") + private String ref = null; + + @SerializedName("url") + private String url = null; + + public Reference object(GitObject object) { + this.object = object; + return this; + } + + /** + * Get object + * @return object + **/ + @ApiModelProperty(value = "") + public GitObject getObject() { + return object; + } + + public void setObject(GitObject object) { + this.object = object; + } + + public Reference ref(String ref) { + this.ref = ref; + return this; + } + + /** + * Get ref + * @return ref + **/ + @ApiModelProperty(value = "") + public String getRef() { + return ref; + } + + public void setRef(String ref) { + this.ref = ref; + } + + public Reference 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; + } + Reference reference = (Reference) o; + return Objects.equals(this.object, reference.object) && + Objects.equals(this.ref, reference.ref) && + Objects.equals(this.url, reference.url); + } + + @Override + public int hashCode() { + return Objects.hash(object, ref, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Reference {\n"); + + sb.append(" object: ").append(toIndentedString(object)).append("\n"); + sb.append(" ref: ").append(toIndentedString(ref)).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/Release.java b/src/main/java/io/gitea/model/Release.java index e4d3c65..93ce04f 100644 --- a/src/main/java/io/gitea/model/Release.java +++ b/src/main/java/io/gitea/model/Release.java @@ -14,6 +14,7 @@ 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; @@ -32,7 +33,7 @@ * Release represents a repository release */ @ApiModel(description = "Release represents a repository release") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Release { @SerializedName("assets") private List assets = null; diff --git a/src/main/java/io/gitea/model/RepoCommit.java b/src/main/java/io/gitea/model/RepoCommit.java new file mode 100644 index 0000000..c7b3181 --- /dev/null +++ b/src/main/java/io/gitea/model/RepoCommit.java @@ -0,0 +1,188 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.CommitMeta; +import io.gitea.model.CommitUser; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * RepoCommit + */ +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class RepoCommit { + @SerializedName("author") + private CommitUser author = null; + + @SerializedName("committer") + private CommitUser committer = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("tree") + private CommitMeta tree = null; + + @SerializedName("url") + private String url = null; + + public RepoCommit author(CommitUser author) { + this.author = author; + return this; + } + + /** + * Get author + * @return author + **/ + @ApiModelProperty(value = "") + public CommitUser getAuthor() { + return author; + } + + public void setAuthor(CommitUser author) { + this.author = author; + } + + public RepoCommit committer(CommitUser committer) { + this.committer = committer; + return this; + } + + /** + * Get committer + * @return committer + **/ + @ApiModelProperty(value = "") + public CommitUser getCommitter() { + return committer; + } + + public void setCommitter(CommitUser committer) { + this.committer = committer; + } + + public RepoCommit 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 RepoCommit tree(CommitMeta tree) { + this.tree = tree; + return this; + } + + /** + * Get tree + * @return tree + **/ + @ApiModelProperty(value = "") + public CommitMeta getTree() { + return tree; + } + + public void setTree(CommitMeta tree) { + this.tree = tree; + } + + public RepoCommit 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; + } + RepoCommit repoCommit = (RepoCommit) o; + return Objects.equals(this.author, repoCommit.author) && + Objects.equals(this.committer, repoCommit.committer) && + Objects.equals(this.message, repoCommit.message) && + Objects.equals(this.tree, repoCommit.tree) && + Objects.equals(this.url, repoCommit.url); + } + + @Override + public int hashCode() { + return Objects.hash(author, committer, message, tree, url); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepoCommit {\n"); + + sb.append(" author: ").append(toIndentedString(author)).append("\n"); + sb.append(" committer: ").append(toIndentedString(committer)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" tree: ").append(toIndentedString(tree)).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/RepoTopicOptions.java b/src/main/java/io/gitea/model/RepoTopicOptions.java new file mode 100644 index 0000000..8805c8b --- /dev/null +++ b/src/main/java/io/gitea/model/RepoTopicOptions.java @@ -0,0 +1,105 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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 java.util.ArrayList; +import java.util.List; + +/** + * RepoTopicOptions a collection of repo topic names + */ +@ApiModel(description = "RepoTopicOptions a collection of repo topic names") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class RepoTopicOptions { + @SerializedName("topics") + private List topics = null; + + public RepoTopicOptions topics(List topics) { + this.topics = topics; + return this; + } + + public RepoTopicOptions addTopicsItem(String topicsItem) { + if (this.topics == null) { + this.topics = new ArrayList(); + } + this.topics.add(topicsItem); + return this; + } + + /** + * list of topic names + * @return topics + **/ + @ApiModelProperty(value = "list of topic names") + public List getTopics() { + return topics; + } + + public void setTopics(List topics) { + this.topics = topics; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + RepoTopicOptions repoTopicOptions = (RepoTopicOptions) o; + return Objects.equals(this.topics, repoTopicOptions.topics); + } + + @Override + public int hashCode() { + return Objects.hash(topics); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class RepoTopicOptions {\n"); + + sb.append(" topics: ").append(toIndentedString(topics)).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/Repository.java b/src/main/java/io/gitea/model/Repository.java index a303efc..6652a05 100644 --- a/src/main/java/io/gitea/model/Repository.java +++ b/src/main/java/io/gitea/model/Repository.java @@ -14,11 +14,15 @@ 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.ExternalTracker; +import io.gitea.model.ExternalWiki; +import io.gitea.model.InternalTracker; import io.gitea.model.Permission; import io.gitea.model.Repository; import io.gitea.model.User; @@ -31,11 +35,26 @@ * Repository represents a repository */ @ApiModel(description = "Repository represents a repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Repository { + @SerializedName("allow_merge_commits") + private Boolean allowMergeCommits = null; + + @SerializedName("allow_rebase") + private Boolean allowRebase = null; + + @SerializedName("allow_rebase_explicit") + private Boolean allowRebaseExplicit = null; + + @SerializedName("allow_squash_merge") + private Boolean allowSquashMerge = null; + @SerializedName("archived") private Boolean archived = null; + @SerializedName("avatar_url") + private String avatarUrl = null; + @SerializedName("clone_url") private String cloneUrl = null; @@ -51,6 +70,12 @@ public class Repository { @SerializedName("empty") private Boolean empty = null; + @SerializedName("external_tracker") + private ExternalTracker externalTracker = null; + + @SerializedName("external_wiki") + private ExternalWiki externalWiki = null; + @SerializedName("fork") private Boolean fork = null; @@ -60,12 +85,27 @@ public class Repository { @SerializedName("full_name") private String fullName = null; + @SerializedName("has_issues") + private Boolean hasIssues = null; + + @SerializedName("has_pull_requests") + private Boolean hasPullRequests = null; + + @SerializedName("has_wiki") + private Boolean hasWiki = null; + @SerializedName("html_url") private String htmlUrl = null; @SerializedName("id") private Long id = null; + @SerializedName("ignore_whitespace_conflicts") + private Boolean ignoreWhitespaceConflicts = null; + + @SerializedName("internal_tracker") + private InternalTracker internalTracker = null; + @SerializedName("mirror") private Boolean mirror = null; @@ -75,6 +115,9 @@ public class Repository { @SerializedName("open_issues_count") private Long openIssuesCount = null; + @SerializedName("original_url") + private String originalUrl = null; + @SerializedName("owner") private User owner = null; @@ -105,6 +148,78 @@ public class Repository { @SerializedName("website") private String website = null; + public Repository allowMergeCommits(Boolean allowMergeCommits) { + this.allowMergeCommits = allowMergeCommits; + return this; + } + + /** + * Get allowMergeCommits + * @return allowMergeCommits + **/ + @ApiModelProperty(value = "") + public Boolean isAllowMergeCommits() { + return allowMergeCommits; + } + + public void setAllowMergeCommits(Boolean allowMergeCommits) { + this.allowMergeCommits = allowMergeCommits; + } + + public Repository allowRebase(Boolean allowRebase) { + this.allowRebase = allowRebase; + return this; + } + + /** + * Get allowRebase + * @return allowRebase + **/ + @ApiModelProperty(value = "") + public Boolean isAllowRebase() { + return allowRebase; + } + + public void setAllowRebase(Boolean allowRebase) { + this.allowRebase = allowRebase; + } + + public Repository allowRebaseExplicit(Boolean allowRebaseExplicit) { + this.allowRebaseExplicit = allowRebaseExplicit; + return this; + } + + /** + * Get allowRebaseExplicit + * @return allowRebaseExplicit + **/ + @ApiModelProperty(value = "") + public Boolean isAllowRebaseExplicit() { + return allowRebaseExplicit; + } + + public void setAllowRebaseExplicit(Boolean allowRebaseExplicit) { + this.allowRebaseExplicit = allowRebaseExplicit; + } + + public Repository allowSquashMerge(Boolean allowSquashMerge) { + this.allowSquashMerge = allowSquashMerge; + return this; + } + + /** + * Get allowSquashMerge + * @return allowSquashMerge + **/ + @ApiModelProperty(value = "") + public Boolean isAllowSquashMerge() { + return allowSquashMerge; + } + + public void setAllowSquashMerge(Boolean allowSquashMerge) { + this.allowSquashMerge = allowSquashMerge; + } + public Repository archived(Boolean archived) { this.archived = archived; return this; @@ -123,6 +238,24 @@ public void setArchived(Boolean archived) { this.archived = archived; } + public Repository avatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + return this; + } + + /** + * Get avatarUrl + * @return avatarUrl + **/ + @ApiModelProperty(value = "") + public String getAvatarUrl() { + return avatarUrl; + } + + public void setAvatarUrl(String avatarUrl) { + this.avatarUrl = avatarUrl; + } + public Repository cloneUrl(String cloneUrl) { this.cloneUrl = cloneUrl; return this; @@ -213,6 +346,42 @@ public void setEmpty(Boolean empty) { this.empty = empty; } + public Repository externalTracker(ExternalTracker externalTracker) { + this.externalTracker = externalTracker; + return this; + } + + /** + * Get externalTracker + * @return externalTracker + **/ + @ApiModelProperty(value = "") + public ExternalTracker getExternalTracker() { + return externalTracker; + } + + public void setExternalTracker(ExternalTracker externalTracker) { + this.externalTracker = externalTracker; + } + + public Repository externalWiki(ExternalWiki externalWiki) { + this.externalWiki = externalWiki; + return this; + } + + /** + * Get externalWiki + * @return externalWiki + **/ + @ApiModelProperty(value = "") + public ExternalWiki getExternalWiki() { + return externalWiki; + } + + public void setExternalWiki(ExternalWiki externalWiki) { + this.externalWiki = externalWiki; + } + public Repository fork(Boolean fork) { this.fork = fork; return this; @@ -267,6 +436,60 @@ public void setFullName(String fullName) { this.fullName = fullName; } + public Repository hasIssues(Boolean hasIssues) { + this.hasIssues = hasIssues; + return this; + } + + /** + * Get hasIssues + * @return hasIssues + **/ + @ApiModelProperty(value = "") + public Boolean isHasIssues() { + return hasIssues; + } + + public void setHasIssues(Boolean hasIssues) { + this.hasIssues = hasIssues; + } + + public Repository hasPullRequests(Boolean hasPullRequests) { + this.hasPullRequests = hasPullRequests; + return this; + } + + /** + * Get hasPullRequests + * @return hasPullRequests + **/ + @ApiModelProperty(value = "") + public Boolean isHasPullRequests() { + return hasPullRequests; + } + + public void setHasPullRequests(Boolean hasPullRequests) { + this.hasPullRequests = hasPullRequests; + } + + public Repository hasWiki(Boolean hasWiki) { + this.hasWiki = hasWiki; + return this; + } + + /** + * Get hasWiki + * @return hasWiki + **/ + @ApiModelProperty(value = "") + public Boolean isHasWiki() { + return hasWiki; + } + + public void setHasWiki(Boolean hasWiki) { + this.hasWiki = hasWiki; + } + public Repository htmlUrl(String htmlUrl) { this.htmlUrl = htmlUrl; return this; @@ -303,6 +526,42 @@ public void setId(Long id) { this.id = id; } + public Repository ignoreWhitespaceConflicts(Boolean ignoreWhitespaceConflicts) { + this.ignoreWhitespaceConflicts = ignoreWhitespaceConflicts; + return this; + } + + /** + * Get ignoreWhitespaceConflicts + * @return ignoreWhitespaceConflicts + **/ + @ApiModelProperty(value = "") + public Boolean isIgnoreWhitespaceConflicts() { + return ignoreWhitespaceConflicts; + } + + public void setIgnoreWhitespaceConflicts(Boolean ignoreWhitespaceConflicts) { + this.ignoreWhitespaceConflicts = ignoreWhitespaceConflicts; + } + + public Repository internalTracker(InternalTracker internalTracker) { + this.internalTracker = internalTracker; + return this; + } + + /** + * Get internalTracker + * @return internalTracker + **/ + @ApiModelProperty(value = "") + public InternalTracker getInternalTracker() { + return internalTracker; + } + + public void setInternalTracker(InternalTracker internalTracker) { + this.internalTracker = internalTracker; + } + public Repository mirror(Boolean mirror) { this.mirror = mirror; return this; @@ -357,6 +616,24 @@ public void setOpenIssuesCount(Long openIssuesCount) { this.openIssuesCount = openIssuesCount; } + public Repository originalUrl(String originalUrl) { + this.originalUrl = originalUrl; + return this; + } + + /** + * Get originalUrl + * @return originalUrl + **/ + @ApiModelProperty(value = "") + public String getOriginalUrl() { + return originalUrl; + } + + public void setOriginalUrl(String originalUrl) { + this.originalUrl = originalUrl; + } + public Repository owner(User owner) { this.owner = owner; return this; @@ -547,20 +824,33 @@ public boolean equals(java.lang.Object o) { return false; } Repository repository = (Repository) o; - return Objects.equals(this.archived, repository.archived) && + return Objects.equals(this.allowMergeCommits, repository.allowMergeCommits) && + Objects.equals(this.allowRebase, repository.allowRebase) && + Objects.equals(this.allowRebaseExplicit, repository.allowRebaseExplicit) && + Objects.equals(this.allowSquashMerge, repository.allowSquashMerge) && + Objects.equals(this.archived, repository.archived) && + Objects.equals(this.avatarUrl, repository.avatarUrl) && Objects.equals(this.cloneUrl, repository.cloneUrl) && Objects.equals(this.createdAt, repository.createdAt) && Objects.equals(this.defaultBranch, repository.defaultBranch) && Objects.equals(this.description, repository.description) && Objects.equals(this.empty, repository.empty) && + Objects.equals(this.externalTracker, repository.externalTracker) && + Objects.equals(this.externalWiki, repository.externalWiki) && Objects.equals(this.fork, repository.fork) && Objects.equals(this.forksCount, repository.forksCount) && Objects.equals(this.fullName, repository.fullName) && + Objects.equals(this.hasIssues, repository.hasIssues) && + Objects.equals(this.hasPullRequests, repository.hasPullRequests) && + Objects.equals(this.hasWiki, repository.hasWiki) && Objects.equals(this.htmlUrl, repository.htmlUrl) && Objects.equals(this.id, repository.id) && + Objects.equals(this.ignoreWhitespaceConflicts, repository.ignoreWhitespaceConflicts) && + Objects.equals(this.internalTracker, repository.internalTracker) && Objects.equals(this.mirror, repository.mirror) && Objects.equals(this.name, repository.name) && Objects.equals(this.openIssuesCount, repository.openIssuesCount) && + Objects.equals(this.originalUrl, repository.originalUrl) && Objects.equals(this.owner, repository.owner) && Objects.equals(this.parent, repository.parent) && Objects.equals(this.permissions, repository.permissions) && @@ -575,7 +865,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(archived, cloneUrl, createdAt, defaultBranch, description, empty, fork, forksCount, fullName, htmlUrl, id, mirror, name, openIssuesCount, owner, parent, permissions, _private, size, sshUrl, starsCount, updatedAt, watchersCount, website); + return Objects.hash(allowMergeCommits, allowRebase, allowRebaseExplicit, allowSquashMerge, archived, avatarUrl, cloneUrl, createdAt, defaultBranch, description, empty, externalTracker, externalWiki, fork, forksCount, fullName, hasIssues, hasPullRequests, hasWiki, htmlUrl, id, ignoreWhitespaceConflicts, internalTracker, mirror, name, openIssuesCount, originalUrl, owner, parent, permissions, _private, size, sshUrl, starsCount, updatedAt, watchersCount, website); } @@ -584,20 +874,33 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Repository {\n"); + sb.append(" allowMergeCommits: ").append(toIndentedString(allowMergeCommits)).append("\n"); + sb.append(" allowRebase: ").append(toIndentedString(allowRebase)).append("\n"); + sb.append(" allowRebaseExplicit: ").append(toIndentedString(allowRebaseExplicit)).append("\n"); + sb.append(" allowSquashMerge: ").append(toIndentedString(allowSquashMerge)).append("\n"); sb.append(" archived: ").append(toIndentedString(archived)).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(" defaultBranch: ").append(toIndentedString(defaultBranch)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" empty: ").append(toIndentedString(empty)).append("\n"); + sb.append(" externalTracker: ").append(toIndentedString(externalTracker)).append("\n"); + sb.append(" externalWiki: ").append(toIndentedString(externalWiki)).append("\n"); 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(" hasIssues: ").append(toIndentedString(hasIssues)).append("\n"); + sb.append(" hasPullRequests: ").append(toIndentedString(hasPullRequests)).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"); + sb.append(" ignoreWhitespaceConflicts: ").append(toIndentedString(ignoreWhitespaceConflicts)).append("\n"); + sb.append(" internalTracker: ").append(toIndentedString(internalTracker)).append("\n"); sb.append(" mirror: ").append(toIndentedString(mirror)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" openIssuesCount: ").append(toIndentedString(openIssuesCount)).append("\n"); + sb.append(" originalUrl: ").append(toIndentedString(originalUrl)).append("\n"); sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); sb.append(" parent: ").append(toIndentedString(parent)).append("\n"); sb.append(" permissions: ").append(toIndentedString(permissions)).append("\n"); diff --git a/src/main/java/io/gitea/model/SearchResults.java b/src/main/java/io/gitea/model/SearchResults.java index 1ae598b..ef29f43 100644 --- a/src/main/java/io/gitea/model/SearchResults.java +++ b/src/main/java/io/gitea/model/SearchResults.java @@ -14,6 +14,7 @@ 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; @@ -30,7 +31,7 @@ * SearchResults results of a successful search */ @ApiModel(description = "SearchResults results of a successful search") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class SearchResults { @SerializedName("data") private List data = null; diff --git a/src/main/java/io/gitea/model/ServerVersion.java b/src/main/java/io/gitea/model/ServerVersion.java index 30a1868..299ab7b 100644 --- a/src/main/java/io/gitea/model/ServerVersion.java +++ b/src/main/java/io/gitea/model/ServerVersion.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * ServerVersion wraps the version of the server */ @ApiModel(description = "ServerVersion wraps the version of the server") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class ServerVersion { @SerializedName("version") private String version = null; diff --git a/src/main/java/io/gitea/model/Status.java b/src/main/java/io/gitea/model/Status.java index 77b9798..d4d2a96 100644 --- a/src/main/java/io/gitea/model/Status.java +++ b/src/main/java/io/gitea/model/Status.java @@ -14,6 +14,7 @@ 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; @@ -29,7 +30,7 @@ * Status holds a single Status of a single Commit */ @ApiModel(description = "Status holds a single Status of a single Commit") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Status { @SerializedName("context") private String context = null; diff --git a/src/main/java/io/gitea/model/Tag.java b/src/main/java/io/gitea/model/Tag.java new file mode 100644 index 0000000..8e6c464 --- /dev/null +++ b/src/main/java/io/gitea/model/Tag.java @@ -0,0 +1,188 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.CommitMeta; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * Tag represents a repository tag + */ +@ApiModel(description = "Tag represents a repository tag") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class Tag { + @SerializedName("commit") + private CommitMeta commit = null; + + @SerializedName("id") + private String id = null; + + @SerializedName("name") + private String name = null; + + @SerializedName("tarball_url") + private String tarballUrl = null; + + @SerializedName("zipball_url") + private String zipballUrl = null; + + public Tag commit(CommitMeta commit) { + this.commit = commit; + return this; + } + + /** + * Get commit + * @return commit + **/ + @ApiModelProperty(value = "") + public CommitMeta getCommit() { + return commit; + } + + public void setCommit(CommitMeta commit) { + this.commit = commit; + } + + public Tag id(String id) { + this.id = id; + return this; + } + + /** + * Get id + * @return id + **/ + @ApiModelProperty(value = "") + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public Tag 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 Tag tarballUrl(String tarballUrl) { + this.tarballUrl = tarballUrl; + return this; + } + + /** + * Get tarballUrl + * @return tarballUrl + **/ + @ApiModelProperty(value = "") + public String getTarballUrl() { + return tarballUrl; + } + + public void setTarballUrl(String tarballUrl) { + this.tarballUrl = tarballUrl; + } + + public Tag zipballUrl(String zipballUrl) { + this.zipballUrl = zipballUrl; + return this; + } + + /** + * Get zipballUrl + * @return zipballUrl + **/ + @ApiModelProperty(value = "") + public String getZipballUrl() { + return zipballUrl; + } + + public void setZipballUrl(String zipballUrl) { + this.zipballUrl = zipballUrl; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Tag tag = (Tag) o; + return Objects.equals(this.commit, tag.commit) && + Objects.equals(this.id, tag.id) && + Objects.equals(this.name, tag.name) && + Objects.equals(this.tarballUrl, tag.tarballUrl) && + Objects.equals(this.zipballUrl, tag.zipballUrl); + } + + @Override + public int hashCode() { + return Objects.hash(commit, id, name, tarballUrl, zipballUrl); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class Tag {\n"); + + sb.append(" commit: ").append(toIndentedString(commit)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" tarballUrl: ").append(toIndentedString(tarballUrl)).append("\n"); + sb.append(" zipballUrl: ").append(toIndentedString(zipballUrl)).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/Team.java b/src/main/java/io/gitea/model/Team.java index 7f10026..4cbdc2f 100644 --- a/src/main/java/io/gitea/model/Team.java +++ b/src/main/java/io/gitea/model/Team.java @@ -14,20 +14,24 @@ 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.Organization; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.util.ArrayList; +import java.util.List; /** * Team represents a team in an organization */ @ApiModel(description = "Team represents a team in an organization") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class Team { @SerializedName("description") private String description = null; @@ -38,6 +42,9 @@ public class Team { @SerializedName("name") private String name = null; + @SerializedName("organization") + private Organization organization = null; + /** * Gets or Sets permission */ @@ -94,6 +101,9 @@ public PermissionEnum read(final JsonReader jsonReader) throws IOException { @SerializedName("permission") private PermissionEnum permission = null; + @SerializedName("units") + private List units = null; + public Team description(String description) { this.description = description; return this; @@ -148,6 +158,24 @@ public void setName(String name) { this.name = name; } + public Team organization(Organization organization) { + this.organization = organization; + return this; + } + + /** + * Get organization + * @return organization + **/ + @ApiModelProperty(value = "") + public Organization getOrganization() { + return organization; + } + + public void setOrganization(Organization organization) { + this.organization = organization; + } + public Team permission(PermissionEnum permission) { this.permission = permission; return this; @@ -166,6 +194,32 @@ public void setPermission(PermissionEnum permission) { this.permission = permission; } + public Team units(List units) { + this.units = units; + return this; + } + + public Team addUnitsItem(String unitsItem) { + if (this.units == null) { + this.units = new ArrayList(); + } + this.units.add(unitsItem); + return this; + } + + /** + * Get units + * @return units + **/ + @ApiModelProperty(example = "[\"repo.code\",\"repo.issues\",\"repo.ext_issues\",\"repo.wiki\",\"repo.pulls\",\"repo.releases\",\"repo.ext_wiki\"]", value = "") + public List getUnits() { + return units; + } + + public void setUnits(List units) { + this.units = units; + } + @Override public boolean equals(java.lang.Object o) { @@ -179,12 +233,14 @@ public boolean equals(java.lang.Object o) { return Objects.equals(this.description, team.description) && Objects.equals(this.id, team.id) && Objects.equals(this.name, team.name) && - Objects.equals(this.permission, team.permission); + Objects.equals(this.organization, team.organization) && + Objects.equals(this.permission, team.permission) && + Objects.equals(this.units, team.units); } @Override public int hashCode() { - return Objects.hash(description, id, name, permission); + return Objects.hash(description, id, name, organization, permission, units); } @@ -196,7 +252,9 @@ public String toString() { sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" organization: ").append(toIndentedString(organization)).append("\n"); sb.append(" permission: ").append(toIndentedString(permission)).append("\n"); + sb.append(" units: ").append(toIndentedString(units)).append("\n"); sb.append("}"); return sb.toString(); } diff --git a/src/main/java/io/gitea/model/TopicName.java b/src/main/java/io/gitea/model/TopicName.java new file mode 100644 index 0000000..5720d13 --- /dev/null +++ b/src/main/java/io/gitea/model/TopicName.java @@ -0,0 +1,105 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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 java.util.ArrayList; +import java.util.List; + +/** + * TopicName a list of repo topic names + */ +@ApiModel(description = "TopicName a list of repo topic names") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class TopicName { + @SerializedName("topics") + private List topics = null; + + public TopicName topics(List topics) { + this.topics = topics; + return this; + } + + public TopicName addTopicsItem(String topicsItem) { + if (this.topics == null) { + this.topics = new ArrayList(); + } + this.topics.add(topicsItem); + return this; + } + + /** + * Get topics + * @return topics + **/ + @ApiModelProperty(value = "") + public List getTopics() { + return topics; + } + + public void setTopics(List topics) { + this.topics = topics; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TopicName topicName = (TopicName) o; + return Objects.equals(this.topics, topicName.topics); + } + + @Override + public int hashCode() { + return Objects.hash(topics); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TopicName {\n"); + + sb.append(" topics: ").append(toIndentedString(topics)).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/TopicResponse.java b/src/main/java/io/gitea/model/TopicResponse.java new file mode 100644 index 0000000..13e6c20 --- /dev/null +++ b/src/main/java/io/gitea/model/TopicResponse.java @@ -0,0 +1,188 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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; + +/** + * TopicResponse for returning topics + */ +@ApiModel(description = "TopicResponse for returning topics") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class TopicResponse { + @SerializedName("created") + private OffsetDateTime created = null; + + @SerializedName("id") + private Long id = null; + + @SerializedName("repo_count") + private Long repoCount = null; + + @SerializedName("topic_name") + private String topicName = null; + + @SerializedName("updated") + private OffsetDateTime updated = null; + + public TopicResponse 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 TopicResponse 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 TopicResponse repoCount(Long repoCount) { + this.repoCount = repoCount; + return this; + } + + /** + * Get repoCount + * @return repoCount + **/ + @ApiModelProperty(value = "") + public Long getRepoCount() { + return repoCount; + } + + public void setRepoCount(Long repoCount) { + this.repoCount = repoCount; + } + + public TopicResponse topicName(String topicName) { + this.topicName = topicName; + return this; + } + + /** + * Get topicName + * @return topicName + **/ + @ApiModelProperty(value = "") + public String getTopicName() { + return topicName; + } + + public void setTopicName(String topicName) { + this.topicName = topicName; + } + + public TopicResponse updated(OffsetDateTime updated) { + this.updated = updated; + return this; + } + + /** + * Get updated + * @return updated + **/ + @ApiModelProperty(value = "") + public OffsetDateTime getUpdated() { + return updated; + } + + public void setUpdated(OffsetDateTime updated) { + this.updated = updated; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + TopicResponse topicResponse = (TopicResponse) o; + return Objects.equals(this.created, topicResponse.created) && + Objects.equals(this.id, topicResponse.id) && + Objects.equals(this.repoCount, topicResponse.repoCount) && + Objects.equals(this.topicName, topicResponse.topicName) && + Objects.equals(this.updated, topicResponse.updated); + } + + @Override + public int hashCode() { + return Objects.hash(created, id, repoCount, topicName, updated); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class TopicResponse {\n"); + + sb.append(" created: ").append(toIndentedString(created)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" repoCount: ").append(toIndentedString(repoCount)).append("\n"); + sb.append(" topicName: ").append(toIndentedString(topicName)).append("\n"); + sb.append(" updated: ").append(toIndentedString(updated)).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/TrackedTime.java b/src/main/java/io/gitea/model/TrackedTime.java index 407efad..a330c59 100644 --- a/src/main/java/io/gitea/model/TrackedTime.java +++ b/src/main/java/io/gitea/model/TrackedTime.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * TrackedTime worked time for an issue / pr */ @ApiModel(description = "TrackedTime worked time for an issue / pr") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class TrackedTime { @SerializedName("created") private OffsetDateTime created = null; diff --git a/src/main/java/io/gitea/model/UpdateFileOptions.java b/src/main/java/io/gitea/model/UpdateFileOptions.java new file mode 100644 index 0000000..020e925 --- /dev/null +++ b/src/main/java/io/gitea/model/UpdateFileOptions.java @@ -0,0 +1,257 @@ +/* + * Gitea API. + * This documentation describes the Gitea API. + * + * OpenAPI spec version: 1.1.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.Identity; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import java.io.IOException; + +/** + * UpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used) + */ +@ApiModel(description = "UpdateFileOptions options for updating files Note: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") +public class UpdateFileOptions { + @SerializedName("author") + private Identity author = null; + + @SerializedName("branch") + private String branch = null; + + @SerializedName("committer") + private Identity committer = null; + + @SerializedName("content") + private String content = null; + + @SerializedName("from_path") + private String fromPath = null; + + @SerializedName("message") + private String message = null; + + @SerializedName("new_branch") + private String newBranch = null; + + @SerializedName("sha") + private String sha = null; + + public UpdateFileOptions 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 UpdateFileOptions 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 UpdateFileOptions 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 UpdateFileOptions content(String content) { + this.content = content; + return this; + } + + /** + * content must be base64 encoded + * @return content + **/ + @ApiModelProperty(required = true, value = "content must be base64 encoded") + public String getContent() { + return content; + } + + public void setContent(String content) { + this.content = content; + } + + public UpdateFileOptions fromPath(String fromPath) { + this.fromPath = fromPath; + return this; + } + + /** + * from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL + * @return fromPath + **/ + @ApiModelProperty(value = "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL") + public String getFromPath() { + return fromPath; + } + + public void setFromPath(String fromPath) { + this.fromPath = fromPath; + } + + public UpdateFileOptions 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 UpdateFileOptions 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 UpdateFileOptions sha(String sha) { + this.sha = sha; + return this; + } + + /** + * sha is the SHA for the file that already exists + * @return sha + **/ + @ApiModelProperty(required = true, value = "sha is the SHA for the file that already exists") + 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; + } + UpdateFileOptions updateFileOptions = (UpdateFileOptions) o; + return Objects.equals(this.author, updateFileOptions.author) && + Objects.equals(this.branch, updateFileOptions.branch) && + Objects.equals(this.committer, updateFileOptions.committer) && + Objects.equals(this.content, updateFileOptions.content) && + Objects.equals(this.fromPath, updateFileOptions.fromPath) && + Objects.equals(this.message, updateFileOptions.message) && + Objects.equals(this.newBranch, updateFileOptions.newBranch) && + Objects.equals(this.sha, updateFileOptions.sha); + } + + @Override + public int hashCode() { + return Objects.hash(author, branch, committer, content, fromPath, message, newBranch, sha); + } + + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class UpdateFileOptions {\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(" content: ").append(toIndentedString(content)).append("\n"); + sb.append(" fromPath: ").append(toIndentedString(fromPath)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" newBranch: ").append(toIndentedString(newBranch)).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/User.java b/src/main/java/io/gitea/model/User.java index 61784f1..e506bd0 100644 --- a/src/main/java/io/gitea/model/User.java +++ b/src/main/java/io/gitea/model/User.java @@ -14,6 +14,7 @@ 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; @@ -22,16 +23,20 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import org.threeten.bp.OffsetDateTime; /** * User represents a user */ @ApiModel(description = "User represents a user") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class User { @SerializedName("avatar_url") private String avatarUrl = null; + @SerializedName("created") + private OffsetDateTime created = null; + @SerializedName("email") private String email = null; @@ -41,9 +46,15 @@ public class User { @SerializedName("id") private Long id = null; + @SerializedName("is_admin") + private Boolean isAdmin = null; + @SerializedName("language") private String language = null; + @SerializedName("last_login") + private OffsetDateTime lastLogin = null; + @SerializedName("login") private String login = null; @@ -65,6 +76,24 @@ public void setAvatarUrl(String avatarUrl) { this.avatarUrl = avatarUrl; } + public User 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 User email(String email) { this.email = email; return this; @@ -119,6 +148,24 @@ public void setId(Long id) { this.id = id; } + public User isAdmin(Boolean isAdmin) { + this.isAdmin = isAdmin; + return this; + } + + /** + * Is the user an administrator + * @return isAdmin + **/ + @ApiModelProperty(value = "Is the user an administrator") + public Boolean isIsAdmin() { + return isAdmin; + } + + public void setIsAdmin(Boolean isAdmin) { + this.isAdmin = isAdmin; + } + public User language(String language) { this.language = language; return this; @@ -137,6 +184,24 @@ public void setLanguage(String language) { this.language = language; } + public User lastLogin(OffsetDateTime lastLogin) { + this.lastLogin = lastLogin; + return this; + } + + /** + * Get lastLogin + * @return lastLogin + **/ + @ApiModelProperty(value = "") + public OffsetDateTime getLastLogin() { + return lastLogin; + } + + public void setLastLogin(OffsetDateTime lastLogin) { + this.lastLogin = lastLogin; + } + public User login(String login) { this.login = login; return this; @@ -166,16 +231,19 @@ public boolean equals(java.lang.Object o) { } User user = (User) o; return Objects.equals(this.avatarUrl, user.avatarUrl) && + Objects.equals(this.created, user.created) && Objects.equals(this.email, user.email) && Objects.equals(this.fullName, user.fullName) && Objects.equals(this.id, user.id) && + Objects.equals(this.isAdmin, user.isAdmin) && Objects.equals(this.language, user.language) && + Objects.equals(this.lastLogin, user.lastLogin) && Objects.equals(this.login, user.login); } @Override public int hashCode() { - return Objects.hash(avatarUrl, email, fullName, id, language, login); + return Objects.hash(avatarUrl, created, email, fullName, id, isAdmin, language, lastLogin, login); } @@ -185,10 +253,13 @@ public String toString() { sb.append("class User {\n"); sb.append(" avatarUrl: ").append(toIndentedString(avatarUrl)).append("\n"); + sb.append(" created: ").append(toIndentedString(created)).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(" isAdmin: ").append(toIndentedString(isAdmin)).append("\n"); sb.append(" language: ").append(toIndentedString(language)).append("\n"); + sb.append(" lastLogin: ").append(toIndentedString(lastLogin)).append("\n"); sb.append(" login: ").append(toIndentedString(login)).append("\n"); sb.append("}"); return sb.toString(); diff --git a/src/main/java/io/gitea/model/UserHeatmapData.java b/src/main/java/io/gitea/model/UserHeatmapData.java index e37b2da..509a935 100644 --- a/src/main/java/io/gitea/model/UserHeatmapData.java +++ b/src/main/java/io/gitea/model/UserHeatmapData.java @@ -14,6 +14,7 @@ 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; @@ -27,7 +28,7 @@ * UserHeatmapData represents the data needed to create a heatmap */ @ApiModel(description = "UserHeatmapData represents the data needed to create a heatmap") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class UserHeatmapData { @SerializedName("contributions") private Long contributions = null; diff --git a/src/main/java/io/gitea/model/WatchInfo.java b/src/main/java/io/gitea/model/WatchInfo.java index 80cec5a..794fffc 100644 --- a/src/main/java/io/gitea/model/WatchInfo.java +++ b/src/main/java/io/gitea/model/WatchInfo.java @@ -14,6 +14,7 @@ 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; @@ -28,7 +29,7 @@ * WatchInfo represents an API watch status of one repository */ @ApiModel(description = "WatchInfo represents an API watch status of one repository") -@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2018-11-02T17:53:11.028Z") +@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00") public class WatchInfo { @SerializedName("created_at") private OffsetDateTime createdAt = null; diff --git a/src/test/java/io/gitea/api/IssueApiTest.java b/src/test/java/io/gitea/api/IssueApiTest.java index 89f4fd7..1dc7d29 100644 --- a/src/test/java/io/gitea/api/IssueApiTest.java +++ b/src/test/java/io/gitea/api/IssueApiTest.java @@ -468,7 +468,8 @@ public void issueGetMilestoneTest() throws ApiException { public void issueGetMilestonesListTest() throws ApiException { String owner = null; String repo = null; - List response = api.issueGetMilestonesList(owner, repo); + String state = null; + List response = api.issueGetMilestonesList(owner, repo, state); // TODO: test validations } @@ -504,9 +505,10 @@ public void issueListIssuesTest() throws ApiException { String owner = null; String repo = null; String state = null; + String labels = null; Integer page = null; String q = null; - List response = api.issueListIssues(owner, repo, state, page, q); + List response = api.issueListIssues(owner, repo, state, labels, page, q); // TODO: test validations } diff --git a/src/test/java/io/gitea/api/OrganizationApiTest.java b/src/test/java/io/gitea/api/OrganizationApiTest.java index df88563..f688876 100644 --- a/src/test/java/io/gitea/api/OrganizationApiTest.java +++ b/src/test/java/io/gitea/api/OrganizationApiTest.java @@ -14,17 +14,7 @@ package io.gitea.api; import io.gitea.ApiException; -import io.gitea.model.Branch; -import io.gitea.model.CreateHookOption; -import io.gitea.model.CreateRepoOption; -import io.gitea.model.CreateTeamOption; -import io.gitea.model.EditHookOption; -import io.gitea.model.EditOrgOption; -import io.gitea.model.EditTeamOption; -import io.gitea.model.Organization; -import io.gitea.model.Repository; -import io.gitea.model.Team; -import io.gitea.model.User; +import io.gitea.model.*; import org.junit.Test; import org.junit.Ignore; @@ -123,7 +113,7 @@ public void orgConcealMemberTest() throws ApiException { public void orgCreateHookTest() throws ApiException { String org = null; CreateHookOption body = null; - List response = api.orgCreateHook(org, body); + Hook response = api.orgCreateHook(org, body); // TODO: test validations } @@ -225,7 +215,7 @@ public void orgEditHookTest() throws ApiException { String org = null; Long id = null; EditHookOption body = null; - List response = api.orgEditHook(org, id, body); + Hook response = api.orgEditHook(org, id, body); // TODO: test validations } @@ -275,7 +265,7 @@ public void orgGetTest() throws ApiException { public void orgGetHookTest() throws ApiException { String org = null; Long id = null; - List response = api.orgGetHook(org, id); + Hook response = api.orgGetHook(org, id); // TODO: test validations } @@ -356,7 +346,7 @@ public void orgListCurrentUserOrgsTest() throws ApiException { @Test public void orgListHooksTest() throws ApiException { String org = null; - List response = api.orgListHooks(org); + List response = api.orgListHooks(org); // TODO: test validations } diff --git a/src/test/java/io/gitea/api/RepositoryApiTest.java b/src/test/java/io/gitea/api/RepositoryApiTest.java index 519a0e9..9cbf36c 100644 --- a/src/test/java/io/gitea/api/RepositoryApiTest.java +++ b/src/test/java/io/gitea/api/RepositoryApiTest.java @@ -14,31 +14,10 @@ package io.gitea.api; import io.gitea.ApiException; -import io.gitea.model.AddCollaboratorOption; -import io.gitea.model.Attachment; -import io.gitea.model.Branch; -import io.gitea.model.CreateForkOption; -import io.gitea.model.CreateHookOption; -import io.gitea.model.CreateKeyOption; -import io.gitea.model.CreatePullRequestOption; -import io.gitea.model.CreateReleaseOption; -import io.gitea.model.CreateRepoOption; -import io.gitea.model.CreateStatusOption; -import io.gitea.model.DeployKey; -import io.gitea.model.EditAttachmentOptions; -import io.gitea.model.EditHookOption; -import io.gitea.model.EditPullRequestOption; -import io.gitea.model.EditReleaseOption; +import io.gitea.model.*; + import java.io.File; -import io.gitea.model.MigrateRepoForm; -import io.gitea.model.PullRequest; -import io.gitea.model.Release; -import io.gitea.model.Repository; -import io.gitea.model.SearchResults; -import io.gitea.model.Status; -import io.gitea.model.TrackedTime; -import io.gitea.model.User; -import io.gitea.model.WatchInfo; + import org.junit.Test; import org.junit.Ignore; @@ -157,7 +136,7 @@ public void repoCreateHookTest() throws ApiException { String owner = null; String repo = null; CreateHookOption body = null; - List response = api.repoCreateHook(owner, repo, body); + Hook response = api.repoCreateHook(owner, repo, body); // TODO: test validations } @@ -377,7 +356,7 @@ public void repoEditHookTest() throws ApiException { String repo = null; Long id = null; EditHookOption body = null; - List response = api.repoEditHook(owner, repo, id, body); + Hook response = api.repoEditHook(owner, repo, id, body); // TODO: test validations } @@ -522,7 +501,8 @@ public void repoGetCombinedStatusByRefTest() throws ApiException { String owner = null; String repo = null; String ref = null; - Status response = api.repoGetCombinedStatusByRef(owner, repo, ref); + Integer page = null; + Status response = api.repoGetCombinedStatusByRef(owner, repo, ref, page); // TODO: test validations } @@ -558,7 +538,7 @@ public void repoGetHookTest() throws ApiException { String owner = null; String repo = null; Long id = null; - List response = api.repoGetHook(owner, repo, id); + Hook response = api.repoGetHook(owner, repo, id); // TODO: test validations } @@ -700,7 +680,7 @@ public void repoListCollaboratorsTest() throws ApiException { public void repoListHooksTest() throws ApiException { String owner = null; String repo = null; - List response = api.repoListHooks(owner, repo); + List response = api.repoListHooks(owner, repo); // TODO: test validations } @@ -776,7 +756,9 @@ public void repoListReleaseAttachmentsTest() throws ApiException { public void repoListReleasesTest() throws ApiException { String owner = null; String repo = null; - List response = api.repoListReleases(owner, repo); + Integer page = null; + Integer perPage = null; + List response = api.repoListReleases(owner, repo, page, perPage); // TODO: test validations } @@ -811,7 +793,10 @@ public void repoListStatusesTest() throws ApiException { String owner = null; String repo = null; String sha = null; - List response = api.repoListStatuses(owner, repo, sha); + Integer page = null; + String sort = null; + String state = null; + List response = api.repoListStatuses(owner, repo, sha, page, sort, state); // TODO: test validations } @@ -846,7 +831,8 @@ public void repoMergePullRequestTest() throws ApiException { String owner = null; String repo = null; Long index = null; - api.repoMergePullRequest(owner, repo, index); + MergePullRequestOption body = null; + api.repoMergePullRequest(owner, repo, index, body); // TODO: test validations } @@ -913,14 +899,18 @@ public void repoPullRequestIsMergedTest() throws ApiException { @Test public void repoSearchTest() throws ApiException { String q = null; + Boolean topic = null; + Boolean includeDesc = null; Long uid = null; + Long starredBy = null; Integer page = null; + Boolean _private = null; Integer limit = null; String mode = null; Boolean exclusive = null; String sort = null; String order = null; - SearchResults response = api.repoSearch(q, uid, page, limit, mode, exclusive, sort, order); + SearchResults response = api.repoSearch(q, topic, includeDesc, uid, starredBy, _private, page, limit, mode, exclusive, sort, order); // TODO: test validations } @@ -971,7 +961,7 @@ public void repoTrackedTimesTest() throws ApiException { @Test public void topicSearchTest() throws ApiException { String q = null; - Repository response = api.topicSearch(q); + List response = api.topicSearch(q); // TODO: test validations } diff --git a/src/test/java/io/gitea/api/UserApiTest.java b/src/test/java/io/gitea/api/UserApiTest.java index 09d729b..1ada21c 100644 --- a/src/test/java/io/gitea/api/UserApiTest.java +++ b/src/test/java/io/gitea/api/UserApiTest.java @@ -14,21 +14,7 @@ package io.gitea.api; import io.gitea.ApiException; -import io.gitea.model.AccessToken; -import io.gitea.model.AccessTokenName; -import io.gitea.model.CreateEmailOption; -import io.gitea.model.CreateGPGKeyOption; -import io.gitea.model.CreateKeyOption; -import io.gitea.model.CreateRepoOption; -import io.gitea.model.DeleteEmailOption; -import io.gitea.model.Email; -import io.gitea.model.GPGKey; -import io.gitea.model.PublicKey; -import io.gitea.model.Repository; -import io.gitea.model.TrackedTime; -import io.gitea.model.User; -import io.gitea.model.UserHeatmapData; -import io.gitea.model.UserSearchList; +import io.gitea.model.*; import org.junit.Test; import org.junit.Ignore; @@ -106,8 +92,8 @@ public void userCheckFollowingTest() throws ApiException { @Test public void userCreateTokenTest() throws ApiException { String username = null; - AccessTokenName accessTokenName = null; - AccessToken response = api.userCreateToken(username, accessTokenName); + AccessToken accessToken = null; + api.userCreateToken(username, accessToken); // TODO: test validations } @@ -665,7 +651,7 @@ public void userSearchTest() throws ApiException { String q = null; Long uid = null; Integer limit = null; - UserSearchList response = api.userSearch(q, uid, limit); + InlineResponse2001 response = api.userSearch(q, uid, limit); // TODO: test validations } diff --git a/swagger.v1.json b/swagger.v1.json index 7ab1e40..505776c 100644 --- a/swagger.v1.json +++ b/swagger.v1.json @@ -23,7 +23,59 @@ }, "basePath": "/api/v1", "paths": { + "/admin/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all organizations", + "operationId": "adminGetAllOrgs", + "parameters": [ + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "page size of results, maximum page size is 50", + "name": "limit", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + } + }, "/admin/users": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "admin" + ], + "summary": "List all users", + "operationId": "adminGetAllUsers", + "responses": { + "200": { + "$ref": "#/responses/UserList" + }, + "403": { + "$ref": "#/responses/forbidden" + } + } + }, "post": { "consumes": [ "application/json" @@ -406,6 +458,42 @@ } } }, + "/orgs": { + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Create an organization", + "operationId": "orgCreate", + "parameters": [ + { + "name": "organization", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateOrgOption" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/Organization" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } + } + }, "/orgs/{org}": { "get": { "produces": [ @@ -431,6 +519,30 @@ } } }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Delete an organization", + "operationId": "orgDelete", + "parameters": [ + { + "type": "string", + "description": "organization that is to be deleted", + "name": "org", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, "patch": { "consumes": [ "application/json" @@ -454,6 +566,7 @@ { "name": "body", "in": "body", + "required": true, "schema": { "$ref": "#/definitions/EditOrgOption" } @@ -934,6 +1047,70 @@ } } }, + "/orgs/{org}/teams/search": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "Search for teams within an organization", + "operationId": "teamSearch", + "parameters": [ + { + "type": "string", + "description": "name of the organization", + "name": "org", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "keywords to search", + "name": "q", + "in": "query" + }, + { + "type": "boolean", + "description": "include search within team description (defaults to true)", + "name": "include_desc", + "in": "query" + }, + { + "type": "integer", + "description": "limit size of results", + "name": "limit", + "in": "query" + }, + { + "type": "integer", + "description": "page number of results to return (1-based)", + "name": "page", + "in": "query" + } + ], + "responses": { + "200": { + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/Team" + } + }, + "ok": { + "type": "boolean" + } + } + } + } + } + } + }, "/repos/migrate": { "post": { "consumes": [ @@ -980,6 +1157,18 @@ "name": "q", "in": "query" }, + { + "type": "boolean", + "description": "Limit search to repositories with keyword as topic", + "name": "topic", + "in": "query" + }, + { + "type": "boolean", + "description": "include search of keyword within repository description", + "name": "includeDesc", + "in": "query" + }, { "type": "integer", "format": "int64", @@ -987,6 +1176,19 @@ "name": "uid", "in": "query" }, + { + "type": "integer", + "format": "int64", + "description": "search only for repos that the user with the given id has starred", + "name": "starredBy", + "in": "query" + }, + { + "type": "boolean", + "description": "include private repositories this user has access to (defaults to true)", + "name": "private", + "in": "query" + }, { "type": "integer", "description": "page number of results to return (1-based)", @@ -1099,6 +1301,51 @@ "$ref": "#/responses/forbidden" } } + }, + "patch": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Edit a repository's properties. Only fields that are set will be changed.", + "operationId": "repoEdit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to edit", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to edit", + "name": "repo", + "in": "path", + "required": true + }, + { + "description": "Properties of a repo that you can edit", + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/EditRepoOption" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/Repository" + }, + "403": { + "$ref": "#/responses/forbidden" + }, + "422": { + "$ref": "#/responses/validationError" + } + } } }, "/repos/{owner}/{repo}/archive/{archive}": { @@ -1373,7 +1620,7 @@ } } }, - "/repos/{owner}/{repo}/commits/{ref}/statuses": { + "/repos/{owner}/{repo}/commits": { "get": { "produces": [ "application/json" @@ -1381,8 +1628,8 @@ "tags": [ "repository" ], - "summary": "Get a commit's combined status, by branch/tag/commit reference", - "operationId": "repoGetCombinedStatusByRef", + "summary": "Get a list of all commits from a repository", + "operationId": "repoGetAllCommits", "parameters": [ { "type": "string", @@ -1400,20 +1647,31 @@ }, { "type": "string", - "description": "name of branch/tag/commit", - "name": "ref", - "in": "path", - "required": true + "description": "SHA or branch to start listing commits from (usually 'master')", + "name": "sha", + "in": "query" + }, + { + "type": "integer", + "description": "page number of requested commits", + "name": "page", + "in": "query" } ], "responses": { "200": { - "$ref": "#/responses/Status" + "$ref": "#/responses/CommitList" + }, + "404": { + "$ref": "#/responses/notFound" + }, + "409": { + "$ref": "#/responses/EmptyRepository" } } } }, - "/repos/{owner}/{repo}/editorconfig/{filepath}": { + "/repos/{owner}/{repo}/commits/{ref}/statuses": { "get": { "produces": [ "application/json" @@ -1421,8 +1679,8 @@ "tags": [ "repository" ], - "summary": "Get the EditorConfig definitions of a file in a repository", - "operationId": "repoGetEditorConfig", + "summary": "Get a commit's combined status, by branch/tag/commit reference", + "operationId": "repoGetCombinedStatusByRef", "parameters": [ { "type": "string", @@ -1440,20 +1698,26 @@ }, { "type": "string", - "description": "filepath of file to get", - "name": "filepath", + "description": "name of branch/tag/commit", + "name": "ref", "in": "path", "required": true + }, + { + "type": "integer", + "description": "page number of results", + "name": "page", + "in": "query" } ], "responses": { "200": { - "description": "success" + "$ref": "#/responses/Status" } } } }, - "/repos/{owner}/{repo}/forks": { + "/repos/{owner}/{repo}/contents": { "get": { "produces": [ "application/json" @@ -1461,8 +1725,8 @@ "tags": [ "repository" ], - "summary": "List a repository's forks", - "operationId": "listForks", + "summary": "Gets the metadata of all the entries of the root dir", + "operationId": "repoGetContentsList", "parameters": [ { "type": "string", @@ -1477,34 +1741,640 @@ "name": "repo", "in": "path", "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" } ], "responses": { "200": { - "$ref": "#/responses/RepositoryList" + "$ref": "#/responses/ContentsListResponse" } } - }, - "post": { - "produces": [ + } + }, + "/repos/{owner}/{repo}/contents/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the metadata and contents (if a file) of an entry in a repository, or a list of entries if a dir", + "operationId": "repoGetContents", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the dir, file, symlink or submodule in the repo", + "name": "filepath", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "The name of the commit/branch/tag. Default the repository’s default branch (usually master)", + "name": "ref", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/ContentsResponse" + } + } + }, + "put": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Update a file in a repository", + "operationId": "repoUpdateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to update", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UpdateFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileResponse" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a file in a repository", + "operationId": "repoCreateFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to create", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CreateFileOptions" + } + } + ], + "responses": { + "201": { + "$ref": "#/responses/FileResponse" + } + } + }, + "delete": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Delete a file in a repository", + "operationId": "repoDeleteFile", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "path of the file to delete", + "name": "filepath", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/DeleteFileOptions" + } + } + ], + "responses": { + "200": { + "$ref": "#/responses/FileDeleteResponse" + } + } + } + }, + "/repos/{owner}/{repo}/editorconfig/{filepath}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get the EditorConfig definitions of a file in a repository", + "operationId": "repoGetEditorConfig", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "filepath of file to get", + "name": "filepath", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "success" + } + } + } + }, + "/repos/{owner}/{repo}/forks": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's forks", + "operationId": "listForks", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/RepositoryList" + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Fork a repository", + "operationId": "createFork", + "parameters": [ + { + "type": "string", + "description": "owner of the repo to fork", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo to fork", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/CreateForkOption" + } + } + ], + "responses": { + "202": { + "$ref": "#/responses/Repository" + } + } + } + }, + "/repos/{owner}/{repo}/git/blobs/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the blob of a repository.", + "operationId": "GetBlob", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitBlobResponse" + } + } + } + }, + "/repos/{owner}/{repo}/git/commits/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a single commit from a repository", + "operationId": "repoGetSingleCommit", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "the commit hash", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/Commit" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListAllGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/refs/{ref}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get specified ref or filtered repository's refs", + "operationId": "repoListGitRefs", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "part or full name of the ref", + "name": "ref", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/ReferenceList" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + } + }, + "/repos/{owner}/{repo}/git/tags/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tag object of an annotated tag (not lightweight tags)", + "operationId": "GetTag", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the tag. The Git tags API only supports annotated tag objects, not lightweight tags.", + "name": "sha", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/AnnotatedTag" + } + } + } + }, + "/repos/{owner}/{repo}/git/trees/{sha}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Gets the tree of a repository.", + "operationId": "GetTree", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "sha of the commit", + "name": "sha", + "in": "path", + "required": true + }, + { + "type": "boolean", + "description": "show all directories and files", + "name": "recursive", + "in": "query" + }, + { + "type": "integer", + "description": "page number; the 'truncated' field in the response will be true if there are still more items after this page, false if the last page", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "number of items per page; default is 1000 or what is set in app.ini as DEFAULT_GIT_TREES_PER_PAGE", + "name": "per_page", + "in": "query" + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitTreeResponse" + } + } + } + }, + "/repos/{owner}/{repo}/hooks": { + "get": { + "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Fork a repository", - "operationId": "createFork", + "summary": "List the hooks in a repository", + "operationId": "repoListHooks", "parameters": [ { "type": "string", - "description": "owner of the repo to fork", + "description": "owner of the repo", "name": "owner", "in": "path", "required": true }, { "type": "string", - "description": "name of the repo to fork", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/HookList" + } + } + }, + "post": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Create a hook", + "operationId": "repoCreateHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", "name": "repo", "in": "path", "required": true @@ -1513,18 +2383,18 @@ "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateForkOption" + "$ref": "#/definitions/CreateHookOption" } } ], "responses": { - "202": { - "$ref": "#/responses/Repository" + "201": { + "$ref": "#/responses/Hook" } } } }, - "/repos/{owner}/{repo}/hooks": { + "/repos/{owner}/{repo}/hooks/git": { "get": { "produces": [ "application/json" @@ -1532,8 +2402,8 @@ "tags": [ "repository" ], - "summary": "List the hooks in a repository", - "operationId": "repoListHooks", + "summary": "List the Git hooks in a repository", + "operationId": "repoListGitHooks", "parameters": [ { "type": "string", @@ -1552,22 +2422,103 @@ ], "responses": { "200": { - "$ref": "#/responses/HookList" + "$ref": "#/responses/GitHookList" + } + } + } + }, + "/repos/{owner}/{repo}/hooks/git/{id}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get a Git hook", + "operationId": "repoGetGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" } } }, - "post": { - "consumes": [ + "delete": { + "produces": [ "application/json" ], + "tags": [ + "repository" + ], + "summary": "Delete a Git hook in a repository", + "operationId": "repoDeleteGitHook", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + }, + "404": { + "$ref": "#/responses/notFound" + } + } + }, + "patch": { "produces": [ "application/json" ], "tags": [ "repository" ], - "summary": "Create a hook", - "operationId": "repoCreateHook", + "summary": "Edit a Git hook in a repository", + "operationId": "repoEditGitHook", "parameters": [ { "type": "string", @@ -1583,17 +2534,27 @@ "in": "path", "required": true }, + { + "type": "string", + "description": "id of the hook to get", + "name": "id", + "in": "path", + "required": true + }, { "name": "body", "in": "body", "schema": { - "$ref": "#/definitions/CreateHookOption" + "$ref": "#/definitions/EditGitHookOption" } } ], "responses": { - "201": { - "$ref": "#/responses/Hook" + "200": { + "$ref": "#/responses/GitHook" + }, + "404": { + "$ref": "#/responses/notFound" } } } @@ -1799,6 +2760,12 @@ "name": "state", "in": "query" }, + { + "type": "string", + "description": "comma separated list of labels. Fetch only issues that have any of this labels. Non existent labels are discarded", + "name": "labels", + "in": "query" + }, { "type": "integer", "description": "page number of requested issues", @@ -1828,7 +2795,7 @@ "tags": [ "issue" ], - "summary": "Create an issue", + "summary": "Create an issue. If using deadline only the date will be taken into account, and time of day ignored.", "operationId": "issueCreateIssue", "parameters": [ { @@ -2132,7 +3099,7 @@ "tags": [ "issue" ], - "summary": "Edit an issue", + "summary": "Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.", "operationId": "issueEditIssue", "parameters": [ { @@ -2382,7 +3349,7 @@ "tags": [ "issue" ], - "summary": "Set an issue deadline. If set to null, the deadline is deleted.", + "summary": "Set an issue deadline. If set to null, the deadline is deleted. If using deadline only the date will be taken into account, and time of day ignored.", "operationId": "issueEditIssueDeadline", "parameters": [ { @@ -2564,20 +3531,113 @@ } ], "responses": { - "200": { - "$ref": "#/responses/LabelList" + "200": { + "$ref": "#/responses/LabelList" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove all labels from an issue", + "operationId": "issueClearLabels", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "issue" + ], + "summary": "Remove a label from an issue", + "operationId": "issueRemoveLabel", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "index of the issue", + "name": "index", + "in": "path", + "required": true + }, + { + "type": "integer", + "format": "int64", + "description": "id of the label to remove", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" } } - }, - "delete": { + } + }, + "/repos/{owner}/{repo}/issues/{index}/stopwatch/start": { + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Remove all labels from an issue", - "operationId": "issueClearLabels", + "summary": "Start stopwatch on an issue.", + "operationId": "issueStartStopWatch", "parameters": [ { "type": "string", @@ -2596,29 +3656,41 @@ { "type": "integer", "format": "int64", - "description": "index of the issue", + "description": "index of the issue to create the stopwatch on", "name": "index", "in": "path", "required": true } ], "responses": { - "204": { + "201": { "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "description": "Issue not found" + }, + "409": { + "description": "Cannot start a stopwatch again if it already exists" } } } }, - "/repos/{owner}/{repo}/issues/{index}/labels/{id}": { - "delete": { + "/repos/{owner}/{repo}/issues/{index}/stopwatch/stop": { + "post": { + "consumes": [ + "application/json" + ], "produces": [ "application/json" ], "tags": [ "issue" ], - "summary": "Remove a label from an issue", - "operationId": "issueRemoveLabel", + "summary": "Stop an issue's existing stopwatch.", + "operationId": "issueStopWatch", "parameters": [ { "type": "string", @@ -2637,23 +3709,24 @@ { "type": "integer", "format": "int64", - "description": "index of the issue", + "description": "index of the issue to stop the stopwatch on", "name": "index", "in": "path", "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "id of the label to remove", - "name": "id", - "in": "path", - "required": true } ], "responses": { - "204": { + "201": { "$ref": "#/responses/empty" + }, + "403": { + "description": "Not repo writer, user does not have rights to toggle stopwatch" + }, + "404": { + "description": "Issue not found" + }, + "409": { + "description": "Cannot stop a non existent stopwatch" } } } @@ -3029,7 +4102,7 @@ "tags": [ "issue" ], - "summary": "Get all of a repository's milestones", + "summary": "Get all of a repository's opened milestones", "operationId": "issueGetMilestonesList", "parameters": [ { @@ -3045,6 +4118,12 @@ "name": "repo", "in": "path", "required": true + }, + { + "type": "string", + "description": "Milestone state, Recognised values are open, closed and all. Defaults to \"open\"", + "name": "state", + "in": "query" } ], "responses": { @@ -3541,6 +4620,13 @@ "name": "index", "in": "path", "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/MergePullRequestOption" + } } ], "responses": { @@ -3617,6 +4703,18 @@ "name": "repo", "in": "path", "required": true + }, + { + "type": "integer", + "description": "page wants to load", + "name": "page", + "in": "query" + }, + { + "type": "integer", + "description": "items count every page wants to load", + "name": "per_page", + "in": "query" } ], "responses": { @@ -4106,6 +5204,38 @@ "name": "sha", "in": "path", "required": true + }, + { + "type": "integer", + "description": "page number of results", + "name": "page", + "in": "query" + }, + { + "enum": [ + "oldest", + "recentupdate", + "leastupdate", + "leastindex", + "highestindex" + ], + "type": "string", + "description": "type of sort", + "name": "sort", + "in": "query" + }, + { + "enum": [ + "pending", + "success", + "error", + "failure", + "warning" + ], + "type": "string", + "description": "type of state", + "name": "state", + "in": "query" } ], "responses": { @@ -4279,6 +5409,39 @@ } } }, + "/repos/{owner}/{repo}/tags": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "List a repository's tags", + "operationId": "repoListTags", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TagList" + } + } + } + }, "/repos/{owner}/{repo}/times": { "get": { "produces": [ @@ -4318,10 +5481,159 @@ "application/json" ], "tags": [ - "user" + "user" + ], + "summary": "List a user's tracked times in a repo", + "operationId": "userTrackedTimes", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of user", + "name": "user", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TrackedTimeList" + } + } + } + }, + "/repos/{owner}/{repo}/topics": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Get list of topics that a repository has", + "operationId": "repoListTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/TopicNames" + } + } + }, + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Replace list of topics for a repository", + "operationId": "repoUpdateTopics", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "name": "body", + "in": "body", + "schema": { + "$ref": "#/definitions/RepoTopicOptions" + } + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + } + }, + "/repos/{owner}/{repo}/topics/{topic}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" + ], + "summary": "Add a topic to a repository", + "operationId": "repoAddTopíc", + "parameters": [ + { + "type": "string", + "description": "owner of the repo", + "name": "owner", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the repo", + "name": "repo", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "name of the topic to add", + "name": "topic", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "$ref": "#/responses/empty" + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "repository" ], - "summary": "List a user's tracked times in a repo", - "operationId": "userTrackedTimes", + "summary": "Delete a topic from a repository", + "operationId": "repoDeleteTopic", "parameters": [ { "type": "string", @@ -4339,15 +5651,15 @@ }, { "type": "string", - "description": "username of user", - "name": "user", + "description": "name of the topic to delete", + "name": "topic", "in": "path", "required": true } ], "responses": { - "200": { - "$ref": "#/responses/TrackedTimeList" + "204": { + "$ref": "#/responses/empty" } } } @@ -4490,6 +5802,38 @@ } }, "/teams/{id}/members/{username}": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a particular member of team", + "operationId": "orgListTeamMember", + "parameters": [ + { + "type": "integer", + "format": "int64", + "description": "id of the team", + "name": "id", + "in": "path", + "required": true + }, + { + "type": "string", + "description": "username of the member to list", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/User" + } + } + }, "put": { "produces": [ "application/json" @@ -4684,7 +6028,7 @@ ], "responses": { "200": { - "$ref": "#/responses/Repository" + "$ref": "#/responses/TopicListResponse" } } } @@ -5152,6 +6496,12 @@ "responses": { "201": { "$ref": "#/responses/Repository" + }, + "409": { + "description": "The repository with the same name already exists." + }, + "422": { + "$ref": "#/responses/validationError" } } } @@ -5279,7 +6629,7 @@ } } }, - "/user/times": { + "/user/teams": { "get": { "produces": [ "application/json" @@ -5287,37 +6637,28 @@ "tags": [ "user" ], - "summary": "List the current user's tracked times", - "operationId": "userCurrentTrackedTimes", + "summary": "List all the teams a user belongs to", + "operationId": "userListTeams", "responses": { "200": { - "$ref": "#/responses/TrackedTimeList" + "$ref": "#/responses/TeamList" } } } }, - "/user/{username}/orgs": { + "/user/times": { "get": { "produces": [ "application/json" ], "tags": [ - "organization" - ], - "summary": "List a user's organizations", - "operationId": "orgListUserOrgs", - "parameters": [ - { - "type": "string", - "description": "username of user", - "name": "username", - "in": "path", - "required": true - } + "user" ], + "summary": "List the current user's tracked times", + "operationId": "userCurrentTrackedTimes", "responses": { "200": { - "$ref": "#/responses/OrganizationList" + "$ref": "#/responses/TrackedTimeList" } } } @@ -5355,7 +6696,21 @@ ], "responses": { "200": { - "$ref": "#/responses/UserSearchList" + "description": "SearchResults of a successful search", + "schema": { + "type": "object", + "properties": { + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/User" + } + }, + "ok": { + "type": "boolean" + } + } + } } } } @@ -5561,6 +6916,32 @@ } } }, + "/users/{username}/orgs": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "organization" + ], + "summary": "List a user's organizations", + "operationId": "orgListUserOrgs", + "parameters": [ + { + "type": "string", + "description": "username of user", + "name": "username", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "$ref": "#/responses/OrganizationList" + } + } + } + }, "/users/{username}/repos": { "get": { "produces": [ @@ -5686,7 +7067,7 @@ "required": true }, { - "name": "accessTokenName", + "name": "accessToken", "in": "body", "schema": { "type": "object", @@ -5761,21 +7142,44 @@ } }, "definitions": { + "APIError": { + "description": "APIError is an api error with a message", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, "AccessToken": { - "description": "AccessToken represents a API access token.", "type": "object", + "title": "AccessToken represents an API access token.", "properties": { "id": { "type": "integer", - "format": "int64" + "format": "int64", + "x-go-name": "ID" }, "name": { - "type": "string" + "type": "string", + "x-go-name": "Name" }, "sha1": { - "type": "string" + "type": "string", + "x-go-name": "Token" + }, + "token_last_eight": { + "type": "string", + "x-go-name": "TokenLastEight" } - } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "AddCollaboratorOption": { "description": "AddCollaboratorOption options when adding a user as a collaborator of a repository", @@ -5786,7 +7190,7 @@ "x-go-name": "Permission" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "AddTimeOption": { "description": "AddTimeOption options for adding time to an issue", @@ -5802,7 +7206,58 @@ "x-go-name": "Time" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AnnotatedTag": { + "description": "AnnotatedTag represents an annotated tag", + "type": "object", + "properties": { + "message": { + "type": "string", + "x-go-name": "Message" + }, + "object": { + "$ref": "#/definitions/AnnotatedTagObject" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tag": { + "type": "string", + "x-go-name": "Tag" + }, + "tagger": { + "$ref": "#/definitions/CommitUser" + }, + "url": { + "type": "string", + "x-go-name": "URL" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "AnnotatedTagObject": { + "description": "AnnotatedTagObject contains meta information of the tag object", + "type": "object", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Attachment": { "description": "Attachment a generic attachment", @@ -5841,7 +7296,7 @@ "x-go-name": "UUID" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Branch": { "description": "Branch represents a repository branch", @@ -5855,48 +7310,195 @@ "x-go-name": "Name" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Comment": { + "description": "Comment represents a comment on a commit or issue", + "type": "object", + "properties": { + "body": { + "type": "string", + "x-go-name": "Body" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "issue_url": { + "type": "string", + "x-go-name": "IssueURL" + }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, + "pull_request_url": { + "type": "string", + "x-go-name": "PRURL" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + }, + "user": { + "$ref": "#/definitions/User" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Commit": { + "type": "object", + "title": "Commit contains information generated from a Git commit.", + "properties": { + "author": { + "$ref": "#/definitions/User" + }, + "commit": { + "$ref": "#/definitions/RepoCommit" + }, + "committer": { + "$ref": "#/definitions/User" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitMeta": { + "type": "object", + "title": "CommitMeta contains meta information of a commit in terms of API.", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CommitUser": { + "type": "object", + "title": "CommitUser contains information of a user in the context of a commit.", + "properties": { + "date": { + "type": "string", + "x-go-name": "Date" + }, + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, - "Comment": { - "description": "Comment represents a comment on a commit or issue", + "ContentsResponse": { + "description": "ContentsResponse contains information about a repo's entry's (dir, file, symlink, submodule) metadata and content", "type": "object", "properties": { - "body": { + "_links": { + "$ref": "#/definitions/FileLinksResponse" + }, + "content": { + "description": "`content` is populated when `type` is `file`, otherwise null", "type": "string", - "x-go-name": "Body" + "x-go-name": "Content" }, - "created_at": { + "download_url": { "type": "string", - "format": "date-time", - "x-go-name": "Created" + "x-go-name": "DownloadURL" + }, + "encoding": { + "description": "`encoding` is populated when `type` is `file`, otherwise null", + "type": "string", + "x-go-name": "Encoding" + }, + "git_url": { + "type": "string", + "x-go-name": "GitURL" }, "html_url": { "type": "string", "x-go-name": "HTMLURL" }, - "id": { + "name": { + "type": "string", + "x-go-name": "Name" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { "type": "integer", "format": "int64", - "x-go-name": "ID" + "x-go-name": "Size" }, - "issue_url": { + "submodule_git_url": { + "description": "`submodule_git_url` is populated when `type` is `submodule`, otherwise null", "type": "string", - "x-go-name": "IssueURL" + "x-go-name": "SubmoduleGitURL" }, - "pull_request_url": { + "target": { + "description": "`target` is populated when `type` is `symlink`, otherwise null", "type": "string", - "x-go-name": "PRURL" + "x-go-name": "Target" }, - "updated_at": { + "type": { + "description": "`type` will be `file`, `dir`, `symlink`, or `submodule`", "type": "string", - "format": "date-time", - "x-go-name": "Updated" + "x-go-name": "Type" }, - "user": { - "$ref": "#/definitions/User" + "url": { + "type": "string", + "x-go-name": "URL" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateEmailOption": { "description": "CreateEmailOption options when creating email addresses", @@ -5911,7 +7513,43 @@ "x-go-name": "Emails" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "CreateFileOptions": { + "description": "CreateFileOptions options for creating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "content" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "Content" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateForkOption": { "description": "CreateForkOption options for creating a fork", @@ -5923,7 +7561,7 @@ "x-go-name": "Organization" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateGPGKeyOption": { "description": "CreateGPGKeyOption options create user GPG key", @@ -5939,7 +7577,7 @@ "x-go-name": "ArmoredKey" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateHookOption": { "description": "CreateHookOption options when create a hook", @@ -5954,6 +7592,10 @@ "default": false, "x-go-name": "Active" }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, "config": { "type": "object", "additionalProperties": { @@ -5979,7 +7621,7 @@ "x-go-name": "Type" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateIssueCommentOption": { "description": "CreateIssueCommentOption options for creating a comment on an issue", @@ -5993,7 +7635,7 @@ "x-go-name": "Body" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateIssueOption": { "description": "CreateIssueOption options to create one issue", @@ -6047,7 +7689,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateKeyOption": { "description": "CreateKeyOption options when creating a key", @@ -6075,7 +7717,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateLabelOption": { "description": "CreateLabelOption options for creating a label", @@ -6090,12 +7732,16 @@ "x-go-name": "Color", "example": "#00aabb" }, + "description": { + "type": "string", + "x-go-name": "Description" + }, "name": { "type": "string", "x-go-name": "Name" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateMilestoneOption": { "description": "CreateMilestoneOption options for creating a milestone", @@ -6115,7 +7761,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateOrgOption": { "description": "CreateOrgOption options for creating an organization", @@ -6136,16 +7782,30 @@ "type": "string", "x-go-name": "Location" }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, "username": { "type": "string", "x-go-name": "UserName" }, + "visibility": { + "description": "possible values are `public` (default), `limited` or `private`", + "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-name": "Visibility" + }, "website": { "type": "string", "x-go-name": "Website" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreatePullRequestOption": { "description": "CreatePullRequestOption options when creating a pull request", @@ -6197,7 +7857,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateReleaseOption": { "description": "CreateReleaseOption options when creating a release", @@ -6231,7 +7891,7 @@ "x-go-name": "Target" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateRepoOption": { "description": "CreateRepoOption options when creating repository", @@ -6255,6 +7915,11 @@ "type": "string", "x-go-name": "Gitignores" }, + "issue_labels": { + "description": "Issue Label set to use", + "type": "string", + "x-go-name": "IssueLabels" + }, "license": { "description": "License to use", "type": "string", @@ -6277,7 +7942,7 @@ "x-go-name": "Readme" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateStatusOption": { "description": "CreateStatusOption holds the information needed to create a new Status for a Commit", @@ -6299,7 +7964,7 @@ "x-go-name": "TargetURL" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateTeamOption": { "description": "CreateTeamOption options for creating a team", @@ -6324,9 +7989,25 @@ "admin" ], "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.ext_wiki" + ] } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "CreateUserOption": { "description": "CreateUserOption create user options", @@ -6350,6 +8031,10 @@ "type": "string", "x-go-name": "LoginName" }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, "password": { "type": "string", "x-go-name": "Password" @@ -6368,7 +8053,7 @@ "x-go-name": "Username" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "DeleteEmailOption": { "description": "DeleteEmailOption options when deleting email addresses", @@ -6383,7 +8068,43 @@ "x-go-name": "Emails" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "DeleteFileOptions": { + "description": "DeleteFileOptions options for deleting files (used for other File structs below)\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "sha" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "DeployKey": { "description": "DeployKey a deploy key", @@ -6428,7 +8149,7 @@ "x-go-name": "URL" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditAttachmentOptions": { "description": "EditAttachmentOptions options for editing attachments", @@ -6439,7 +8160,7 @@ "x-go-name": "Name" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditDeadlineOption": { "description": "EditDeadlineOption options for creating a deadline", @@ -6454,7 +8175,18 @@ "x-go-name": "Deadline" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditGitHookOption": { + "description": "EditGitHookOption options when modifying one Git hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditHookOption": { "description": "EditHookOption options when modify one hook", @@ -6464,6 +8196,10 @@ "type": "boolean", "x-go-name": "Active" }, + "branch_filter": { + "type": "string", + "x-go-name": "BranchFilter" + }, "config": { "type": "object", "additionalProperties": { @@ -6479,7 +8215,7 @@ "x-go-name": "Events" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditIssueCommentOption": { "description": "EditIssueCommentOption options for editing a comment", @@ -6493,7 +8229,7 @@ "x-go-name": "Body" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditIssueOption": { "description": "EditIssueOption options for editing an issue", @@ -6533,7 +8269,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditLabelOption": { "description": "EditLabelOption options for editing a label", @@ -6543,12 +8279,16 @@ "type": "string", "x-go-name": "Color" }, + "description": { + "type": "string", + "x-go-name": "Description" + }, "name": { "type": "string", "x-go-name": "Name" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditMilestoneOption": { "description": "EditMilestoneOption options for editing a milestone", @@ -6572,7 +8312,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditOrgOption": { "description": "EditOrgOption options for editing an organization", @@ -6590,12 +8330,26 @@ "type": "string", "x-go-name": "Location" }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, + "visibility": { + "description": "possible values are `public`, `limited` or `private`", + "type": "string", + "enum": [ + "public", + "limited", + "private" + ], + "x-go-name": "Visibility" + }, "website": { "type": "string", "x-go-name": "Website" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditPullRequestOption": { "description": "EditPullRequestOption options when modify pull request", @@ -6643,7 +8397,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditReleaseOption": { "description": "EditReleaseOption options when editing a release", @@ -6674,7 +8428,94 @@ "x-go-name": "Target" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "EditRepoOption": { + "description": "EditRepoOption options when editing a repository's properties", + "type": "object", + "properties": { + "allow_merge_commits": { + "description": "either `true` to allow merging pull requests with a merge commit, or `false` to prevent merging pull requests with merge commits. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "description": "either `true` to allow rebase-merging pull requests, or `false` to prevent rebase-merging. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "description": "either `true` to allow rebase with explicit merge commits (--no-ff), or `false` to prevent rebase with explicit merge commits. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash_merge": { + "description": "either `true` to allow squash-merging pull requests, or `false` to prevent squash-merging. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "AllowSquash" + }, + "archived": { + "description": "set to `true` to archive this repository.", + "type": "boolean", + "x-go-name": "Archived" + }, + "default_branch": { + "description": "sets the default branch for this repository.", + "type": "string", + "x-go-name": "DefaultBranch" + }, + "description": { + "description": "a short description of the repository.", + "type": "string", + "x-go-name": "Description" + }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, + "has_issues": { + "description": "either `true` to enable issues for this repository or `false` to disable them.", + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_pull_requests": { + "description": "either `true` to allow pull requests, or `false` to prevent pull request.", + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_wiki": { + "description": "either `true` to enable the wiki for this repository or `false` to disable it.", + "type": "boolean", + "x-go-name": "HasWiki" + }, + "ignore_whitespace_conflicts": { + "description": "either `true` to ignore whitespace for conflicts, or `false` to not ignore whitespace. `has_pull_requests` must be `true`.", + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, + "name": { + "description": "name of the repository", + "type": "string", + "uniqueItems": true, + "x-go-name": "Name" + }, + "private": { + "description": "either `true` to make the repository private or `false` to make it public.\nNote: you will get a 422 error if the organization restricts changing repository visibility to organization\nowners and a non-owner tries to change the value of private.", + "type": "boolean", + "x-go-name": "Private" + }, + "website": { + "description": "a URL with more information about the repository.", + "type": "string", + "x-go-name": "Website" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditTeamOption": { "description": "EditTeamOption options for editing a team", @@ -6699,9 +8540,25 @@ "admin" ], "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.ext_wiki" + ] } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "EditUserOption": { "description": "EditUserOption edit user options", @@ -6752,6 +8609,10 @@ "format": "int64", "x-go-name": "MaxRepoCreation" }, + "must_change_password": { + "type": "boolean", + "x-go-name": "MustChangePassword" + }, "password": { "type": "string", "x-go-name": "Password" @@ -6770,7 +8631,7 @@ "x-go-name": "Website" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Email": { "description": "Email an email address belonging to a user", @@ -6781,16 +8642,141 @@ "format": "email", "x-go-name": "Email" }, - "primary": { - "type": "boolean", - "x-go-name": "Primary" + "primary": { + "type": "boolean", + "x-go-name": "Primary" + }, + "verified": { + "type": "boolean", + "x-go-name": "Verified" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ExternalTracker": { + "description": "ExternalTracker represents settings for external tracker", + "type": "object", + "properties": { + "external_tracker_format": { + "description": "External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.", + "type": "string", + "x-go-name": "ExternalTrackerFormat" + }, + "external_tracker_style": { + "description": "External Issue Tracker Number Format, either `numeric` or `alphanumeric`", + "type": "string", + "x-go-name": "ExternalTrackerStyle" + }, + "external_tracker_url": { + "description": "URL of external issue tracker.", + "type": "string", + "x-go-name": "ExternalTrackerURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "ExternalWiki": { + "description": "ExternalWiki represents setting for external wiki", + "type": "object", + "properties": { + "external_wiki_url": { + "description": "URL of external wiki.", + "type": "string", + "x-go-name": "ExternalWikiURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileCommitResponse": { + "type": "object", + "title": "FileCommitResponse contains information generated from a Git commit for a repo's file.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "html_url": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "parents": { + "type": "array", + "items": { + "$ref": "#/definitions/CommitMeta" + }, + "x-go-name": "Parents" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse contains information about a repo's file that was deleted", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "type": "object", + "x-go-name": "Content" + }, + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileLinksResponse": { + "description": "FileLinksResponse contains the links for a repo's file", + "type": "object", + "properties": { + "git": { + "type": "string", + "x-go-name": "GitURL" + }, + "html": { + "type": "string", + "x-go-name": "HTMLURL" + }, + "self": { + "type": "string", + "x-go-name": "Self" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "FileResponse": { + "description": "FileResponse contains information about a repo's file", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/FileCommitResponse" + }, + "content": { + "$ref": "#/definitions/ContentsResponse" }, - "verified": { - "type": "boolean", - "x-go-name": "Verified" + "verification": { + "$ref": "#/definitions/PayloadCommitVerification" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "GPGKey": { "description": "GPGKey a user GPG key to sign commit and tag in repository", @@ -6854,7 +8840,7 @@ "x-go-name": "SubsKey" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "GPGKeyEmail": { "description": "GPGKeyEmail an email attached to a GPGKey", @@ -6869,7 +8855,223 @@ "x-go-name": "Verified" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitBlobResponse": { + "description": "GitBlobResponse represents a git blob", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "encoding": { + "type": "string", + "x-go-name": "Encoding" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitEntry": { + "description": "GitEntry represents a git tree", + "type": "object", + "properties": { + "mode": { + "type": "string", + "x-go-name": "Mode" + }, + "path": { + "type": "string", + "x-go-name": "Path" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "size": { + "type": "integer", + "format": "int64", + "x-go-name": "Size" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitHook": { + "description": "GitHook represents a Git repository hook", + "type": "object", + "properties": { + "content": { + "type": "string", + "x-go-name": "Content" + }, + "is_active": { + "type": "boolean", + "x-go-name": "IsActive" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitObject": { + "type": "object", + "title": "GitObject represents a Git object.", + "properties": { + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "GitTreeResponse": { + "description": "GitTreeResponse returns a git tree", + "type": "object", + "properties": { + "page": { + "type": "integer", + "format": "int64", + "x-go-name": "Page" + }, + "sha": { + "type": "string", + "x-go-name": "SHA" + }, + "total_count": { + "type": "integer", + "format": "int64", + "x-go-name": "TotalCount" + }, + "tree": { + "type": "array", + "items": { + "$ref": "#/definitions/GitEntry" + }, + "x-go-name": "Entries" + }, + "truncated": { + "type": "boolean", + "x-go-name": "Truncated" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Hook": { + "description": "Hook a hook is a web hook when one repository changed", + "type": "object", + "properties": { + "active": { + "type": "boolean", + "x-go-name": "Active" + }, + "config": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-go-name": "Config" + }, + "created_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "events": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Events" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "type": { + "type": "string", + "x-go-name": "Type" + }, + "updated_at": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Identity": { + "description": "Identity for a person's identity like an author or committer", + "type": "object", + "properties": { + "email": { + "type": "string", + "format": "email", + "x-go-name": "Email" + }, + "name": { + "type": "string", + "x-go-name": "Name" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "InternalTracker": { + "description": "InternalTracker represents settings for internal tracker", + "type": "object", + "properties": { + "allow_only_contributors_to_track_time": { + "description": "Let only contributors track time (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "AllowOnlyContributorsToTrackTime" + }, + "enable_issue_dependencies": { + "description": "Enable dependencies for issues and pull requests (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableIssueDependencies" + }, + "enable_time_tracker": { + "description": "Enable time tracking (Built-in issue tracker)", + "type": "boolean", + "x-go-name": "EnableTimeTracker" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Issue": { "description": "Issue represents an issue in a repository", @@ -6929,6 +9131,15 @@ "format": "int64", "x-go-name": "Index" }, + "original_author": { + "type": "string", + "x-go-name": "OriginalAuthor" + }, + "original_author_id": { + "type": "integer", + "format": "int64", + "x-go-name": "OriginalAuthorID" + }, "pull_request": { "$ref": "#/definitions/PullRequestMeta" }, @@ -6952,7 +9163,7 @@ "$ref": "#/definitions/User" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "IssueDeadline": { "description": "IssueDeadline represents an issue deadline", @@ -6964,7 +9175,7 @@ "x-go-name": "Deadline" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "IssueLabelsOption": { "description": "IssueLabelsOption a collection of labels", @@ -6980,7 +9191,7 @@ "x-go-name": "Labels" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Label": { "description": "Label a label to an issue or a pr", @@ -6991,6 +9202,10 @@ "x-go-name": "Color", "example": "00aabb" }, + "description": { + "type": "string", + "x-go-name": "Description" + }, "id": { "type": "integer", "format": "int64", @@ -7005,7 +9220,7 @@ "x-go-name": "URL" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "MarkdownOption": { "description": "MarkdownOption markdown options", @@ -7028,7 +9243,33 @@ "type": "boolean" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "MergePullRequestOption": { + "description": "MergePullRequestForm form for merging Pull Request", + "type": "object", + "required": [ + "Do" + ], + "properties": { + "Do": { + "type": "string", + "enum": [ + "merge", + "rebase", + "rebase-merge", + "squash" + ] + }, + "MergeMessageField": { + "type": "string" + }, + "MergeTitleField": { + "type": "string" + } + }, + "x-go-name": "MergePullRequestForm", + "x-go-package": "code.gitea.io/gitea/modules/auth" }, "MigrateRepoForm": { "description": "MigrateRepoForm form for migrating repository", @@ -7055,6 +9296,18 @@ "type": "string", "x-go-name": "Description" }, + "issues": { + "type": "boolean", + "x-go-name": "Issues" + }, + "labels": { + "type": "boolean", + "x-go-name": "Labels" + }, + "milestones": { + "type": "boolean", + "x-go-name": "Milestones" + }, "mirror": { "type": "boolean", "x-go-name": "Mirror" @@ -7063,6 +9316,14 @@ "type": "boolean", "x-go-name": "Private" }, + "pull_requests": { + "type": "boolean", + "x-go-name": "PullRequests" + }, + "releases": { + "type": "boolean", + "x-go-name": "Releases" + }, "repo_name": { "type": "string", "x-go-name": "RepoName" @@ -7071,6 +9332,10 @@ "type": "integer", "format": "int64", "x-go-name": "UID" + }, + "wiki": { + "type": "boolean", + "x-go-name": "Wiki" } }, "x-go-package": "code.gitea.io/gitea/modules/auth" @@ -7116,7 +9381,7 @@ "x-go-name": "Title" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Organization": { "description": "Organization represents an organization", @@ -7143,16 +9408,24 @@ "type": "string", "x-go-name": "Location" }, + "repo_admin_change_team_access": { + "type": "boolean", + "x-go-name": "RepoAdminChangeTeamAccess" + }, "username": { "type": "string", "x-go-name": "UserName" }, + "visibility": { + "type": "string", + "x-go-name": "Visibility" + }, "website": { "type": "string", "x-go-name": "Website" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PRBranchInfo": { "description": "PRBranchInfo information about a branch", @@ -7179,12 +9452,19 @@ "x-go-name": "Sha" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PayloadCommit": { "description": "PayloadCommit represents a commit", "type": "object", "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Added" + }, "author": { "$ref": "#/definitions/PayloadUser" }, @@ -7200,6 +9480,20 @@ "type": "string", "x-go-name": "Message" }, + "modified": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Modified" + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Removed" + }, "timestamp": { "type": "string", "format": "date-time", @@ -7213,7 +9507,7 @@ "$ref": "#/definitions/PayloadCommitVerification" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PayloadCommitVerification": { "description": "PayloadCommitVerification represents the GPG verification of a commit", @@ -7236,7 +9530,7 @@ "x-go-name": "Verified" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PayloadUser": { "description": "PayloadUser represents the author or committer of a commit", @@ -7257,7 +9551,7 @@ "x-go-name": "UserName" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Permission": { "description": "Permission represents a set of permissions", @@ -7276,7 +9570,7 @@ "x-go-name": "Push" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PublicKey": { "description": "PublicKey publickey is a user key to push code to repository", @@ -7320,7 +9614,7 @@ "$ref": "#/definitions/User" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PullRequest": { "description": "PullRequest represents a pull request", @@ -7442,7 +9736,7 @@ "$ref": "#/definitions/User" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "PullRequestMeta": { "description": "PullRequestMeta PR info if an issue is a PR", @@ -7458,7 +9752,25 @@ "x-go-name": "Merged" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Reference": { + "type": "object", + "title": "Reference represents a Git reference.", + "properties": { + "object": { + "$ref": "#/definitions/GitObject" + }, + "ref": { + "type": "string", + "x-go-name": "Ref" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Release": { "description": "Release represents a repository release", @@ -7523,19 +9835,78 @@ }, "zipball_url": { "type": "string", - "x-go-name": "ZipURL" + "x-go-name": "ZipURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoCommit": { + "type": "object", + "title": "RepoCommit contains information of a commit in the context of a repository.", + "properties": { + "author": { + "$ref": "#/definitions/CommitUser" + }, + "committer": { + "$ref": "#/definitions/CommitUser" + }, + "message": { + "type": "string", + "x-go-name": "Message" + }, + "tree": { + "$ref": "#/definitions/CommitMeta" + }, + "url": { + "type": "string", + "x-go-name": "URL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "RepoTopicOptions": { + "description": "RepoTopicOptions a collection of repo topic names", + "type": "object", + "properties": { + "topics": { + "description": "list of topic names", + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Topics" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Repository": { "description": "Repository represents a repository", "type": "object", "properties": { + "allow_merge_commits": { + "type": "boolean", + "x-go-name": "AllowMerge" + }, + "allow_rebase": { + "type": "boolean", + "x-go-name": "AllowRebase" + }, + "allow_rebase_explicit": { + "type": "boolean", + "x-go-name": "AllowRebaseMerge" + }, + "allow_squash_merge": { + "type": "boolean", + "x-go-name": "AllowSquash" + }, "archived": { "type": "boolean", "x-go-name": "Archived" }, + "avatar_url": { + "type": "string", + "x-go-name": "AvatarURL" + }, "clone_url": { "type": "string", "x-go-name": "CloneURL" @@ -7557,6 +9928,12 @@ "type": "boolean", "x-go-name": "Empty" }, + "external_tracker": { + "$ref": "#/definitions/ExternalTracker" + }, + "external_wiki": { + "$ref": "#/definitions/ExternalWiki" + }, "fork": { "type": "boolean", "x-go-name": "Fork" @@ -7570,6 +9947,18 @@ "type": "string", "x-go-name": "FullName" }, + "has_issues": { + "type": "boolean", + "x-go-name": "HasIssues" + }, + "has_pull_requests": { + "type": "boolean", + "x-go-name": "HasPullRequests" + }, + "has_wiki": { + "type": "boolean", + "x-go-name": "HasWiki" + }, "html_url": { "type": "string", "x-go-name": "HTMLURL" @@ -7579,6 +9968,13 @@ "format": "int64", "x-go-name": "ID" }, + "ignore_whitespace_conflicts": { + "type": "boolean", + "x-go-name": "IgnoreWhitespaceConflicts" + }, + "internal_tracker": { + "$ref": "#/definitions/InternalTracker" + }, "mirror": { "type": "boolean", "x-go-name": "Mirror" @@ -7592,6 +9988,10 @@ "format": "int64", "x-go-name": "OpenIssues" }, + "original_url": { + "type": "string", + "x-go-name": "OriginalURL" + }, "owner": { "$ref": "#/definitions/User" }, @@ -7634,7 +10034,7 @@ "x-go-name": "Website" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "SearchResults": { "description": "SearchResults results of a successful search", @@ -7652,7 +10052,7 @@ "x-go-name": "OK" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "ServerVersion": { "description": "ServerVersion wraps the version of the server", @@ -7663,12 +10063,12 @@ "x-go-name": "Version" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "StateType": { "description": "StateType issue state type", "type": "string", - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Status": { "description": "Status holds a single Status of a single Commit", @@ -7712,12 +10112,38 @@ "x-go-name": "URL" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "StatusState": { "description": "StatusState holds the state of a Status\nIt can be \"pending\", \"success\", \"error\", \"failure\", and \"warning\"", "type": "string", - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "Tag": { + "description": "Tag represents a repository tag", + "type": "object", + "properties": { + "commit": { + "$ref": "#/definitions/CommitMeta" + }, + "id": { + "type": "string", + "x-go-name": "ID" + }, + "name": { + "type": "string", + "x-go-name": "Name" + }, + "tarball_url": { + "type": "string", + "x-go-name": "TarballURL" + }, + "zipball_url": { + "type": "string", + "x-go-name": "ZipballURL" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "Team": { "description": "Team represents a team in an organization", @@ -7736,6 +10162,9 @@ "type": "string", "x-go-name": "Name" }, + "organization": { + "$ref": "#/definitions/Organization" + }, "permission": { "type": "string", "enum": [ @@ -7746,15 +10175,76 @@ "owner" ], "x-go-name": "Permission" + }, + "units": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "Units", + "example": [ + "repo.code", + "repo.issues", + "repo.ext_issues", + "repo.wiki", + "repo.pulls", + "repo.releases", + "repo.ext_wiki" + ] } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "TimeStamp": { "description": "TimeStamp defines a timestamp", "type": "integer", "format": "int64", - "x-go-package": "code.gitea.io/gitea/modules/util" + "x-go-package": "code.gitea.io/gitea/modules/timeutil" + }, + "TopicName": { + "description": "TopicName a list of repo topic names", + "type": "object", + "properties": { + "topics": { + "type": "array", + "items": { + "type": "string" + }, + "x-go-name": "TopicNames" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "TopicResponse": { + "description": "TopicResponse for returning topics", + "type": "object", + "properties": { + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, + "id": { + "type": "integer", + "format": "int64", + "x-go-name": "ID" + }, + "repo_count": { + "type": "integer", + "format": "int64", + "x-go-name": "RepoCount" + }, + "topic_name": { + "type": "string", + "x-go-name": "Name" + }, + "updated": { + "type": "string", + "format": "date-time", + "x-go-name": "Updated" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "TrackedTime": { "description": "TrackedTime worked time for an issue / pr", @@ -7787,7 +10277,54 @@ "x-go-name": "UserID" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" + }, + "UpdateFileOptions": { + "description": "UpdateFileOptions options for updating files\nNote: `author` and `committer` are optional (if only one is given, it will be used for the other, otherwise the authenticated user will be used)", + "type": "object", + "required": [ + "sha", + "content" + ], + "properties": { + "author": { + "$ref": "#/definitions/Identity" + }, + "branch": { + "description": "branch (optional) to base this file from. if not given, the default branch is used", + "type": "string", + "x-go-name": "BranchName" + }, + "committer": { + "$ref": "#/definitions/Identity" + }, + "content": { + "description": "content must be base64 encoded", + "type": "string", + "x-go-name": "Content" + }, + "from_path": { + "description": "from_path (optional) is the path of the original file which will be moved/renamed to the path in the URL", + "type": "string", + "x-go-name": "FromPath" + }, + "message": { + "description": "message (optional) for the commit of this file. if not supplied, a default message will be used", + "type": "string", + "x-go-name": "Message" + }, + "new_branch": { + "description": "new_branch (optional) will make a new branch from `branch` before creating the file", + "type": "string", + "x-go-name": "NewBranchName" + }, + "sha": { + "description": "sha is the SHA for the file that already exists", + "type": "string", + "x-go-name": "SHA" + } + }, + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "User": { "description": "User represents a user", @@ -7798,6 +10335,11 @@ "type": "string", "x-go-name": "AvatarURL" }, + "created": { + "type": "string", + "format": "date-time", + "x-go-name": "Created" + }, "email": { "type": "string", "format": "email", @@ -7814,18 +10356,28 @@ "format": "int64", "x-go-name": "ID" }, + "is_admin": { + "description": "Is the user an administrator", + "type": "boolean", + "x-go-name": "IsAdmin" + }, "language": { "description": "User locale", "type": "string", "x-go-name": "Language" }, + "last_login": { + "type": "string", + "format": "date-time", + "x-go-name": "LastLogin" + }, "login": { "description": "the user's username", "type": "string", "x-go-name": "UserName" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" }, "UserHeatmapData": { "description": "UserHeatmapData represents the data needed to create a heatmap", @@ -7842,23 +10394,6 @@ }, "x-go-package": "code.gitea.io/gitea/models" }, - "UserSearchList": { - "description": "UserSearchList", - "type": "object", - "properties": { - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/User" - }, - "x-go-name": "Data" - }, - "ok": { - "type": "boolean", - "x-go-name": "Ok" - } - } - }, "WatchInfo": { "description": "WatchInfo represents an API watch status of one repository", "type": "object", @@ -7889,14 +10424,26 @@ "x-go-name": "URL" } }, - "x-go-package": "code.gitea.io/gitea/vendor/code.gitea.io/sdk/gitea" + "x-go-package": "code.gitea.io/gitea/modules/structs" } }, "responses": { "AccessToken": { - "description": "AccessToken represents a API access token.", - "schema": { - "$ref": "#/definitions/AccessToken" + "description": "AccessToken represents an API access token.", + "headers": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "sha1": { + "type": "string" + }, + "token_last_eight": { + "type": "string" + } } }, "AccessTokenList": { @@ -7908,6 +10455,12 @@ } } }, + "AnnotatedTag": { + "description": "AnnotatedTag", + "schema": { + "$ref": "#/definitions/AnnotatedTag" + } + }, "Attachment": { "description": "Attachment", "schema": { @@ -7953,6 +10506,62 @@ } } }, + "Commit": { + "description": "Commit", + "schema": { + "$ref": "#/definitions/Commit" + } + }, + "CommitList": { + "description": "CommitList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Commit" + } + }, + "headers": { + "X-HasMore": { + "type": "boolean", + "description": "True if there is another page" + }, + "X-Page": { + "type": "integer", + "format": "int64", + "description": "The current page" + }, + "X-PageCount": { + "type": "integer", + "format": "int64", + "description": "Total number of pages" + }, + "X-PerPage": { + "type": "integer", + "format": "int64", + "description": "Commits per page" + }, + "X-Total": { + "type": "integer", + "format": "int64", + "description": "Total commit count" + } + } + }, + "ContentsListResponse": { + "description": "ContentsListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ContentsResponse" + } + } + }, + "ContentsResponse": { + "description": "ContentsResponse", + "schema": { + "$ref": "#/definitions/ContentsResponse" + } + }, "DeployKey": { "description": "DeployKey", "schema": { @@ -7977,6 +10586,24 @@ } } }, + "EmptyRepository": { + "description": "EmptyRepository", + "schema": { + "$ref": "#/definitions/APIError" + } + }, + "FileDeleteResponse": { + "description": "FileDeleteResponse", + "schema": { + "$ref": "#/definitions/FileDeleteResponse" + } + }, + "FileResponse": { + "description": "FileResponse", + "schema": { + "$ref": "#/definitions/FileResponse" + } + }, "GPGKey": { "description": "GPGKey", "schema": { @@ -7992,21 +10619,45 @@ } } }, - "Hook": { - "description": "Hook", + "GitBlobResponse": { + "description": "GitBlobResponse", + "schema": { + "$ref": "#/definitions/GitBlobResponse" + } + }, + "GitHook": { + "description": "GitHook", + "schema": { + "$ref": "#/definitions/GitHook" + } + }, + "GitHookList": { + "description": "GitHookList", "schema": { "type": "array", "items": { - "$ref": "#/definitions/Branch" + "$ref": "#/definitions/GitHook" } } }, + "GitTreeResponse": { + "description": "GitTreeResponse", + "schema": { + "$ref": "#/definitions/GitTreeResponse" + } + }, + "Hook": { + "description": "Hook", + "schema": { + "$ref": "#/definitions/Hook" + } + }, "HookList": { "description": "HookList", "schema": { "type": "array", "items": { - "$ref": "#/definitions/Branch" + "$ref": "#/definitions/Hook" } } }, @@ -8047,7 +10698,10 @@ } }, "MarkdownRender": { - "description": "MarkdownRender is a rendered markdown document" + "description": "MarkdownRender is a rendered markdown document", + "schema": { + "type": "string" + } }, "Milestone": { "description": "Milestone", @@ -8109,6 +10763,21 @@ } } }, + "Reference": { + "description": "Reference", + "schema": { + "$ref": "#/definitions/Reference" + } + }, + "ReferenceList": { + "description": "ReferenceList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Reference" + } + } + }, "Release": { "description": "Release", "schema": { @@ -8166,6 +10835,21 @@ } } }, + "Tag": { + "description": "Tag", + "schema": { + "$ref": "#/definitions/Tag" + } + }, + "TagList": { + "description": "TagList", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Tag" + } + } + }, "Team": { "description": "Team", "schema": { @@ -8181,6 +10865,21 @@ } } }, + "TopicListResponse": { + "description": "TopicListResponse", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/TopicResponse" + } + } + }, + "TopicNames": { + "description": "TopicNames", + "schema": { + "$ref": "#/definitions/TopicName" + } + }, "TrackedTime": { "description": "TrackedTime", "schema": { @@ -8220,12 +10919,6 @@ } } }, - "UserSearchList": { - "description": "UserSearchList", - "schema": { - "$ref": "#/definitions/UserSearchList" - } - }, "WatchInfo": { "description": "WatchInfo", "schema": { @@ -8263,7 +10956,7 @@ "parameterBodies": { "description": "parameterBodies", "schema": { - "$ref": "#/definitions/EditAttachmentOptions" + "$ref": "#/definitions/RepoTopicOptions" } }, "redirect": { @@ -8288,6 +10981,7 @@ "in": "query" }, "AuthorizationHeaderToken": { + "description": "API tokens must be prepended with \"token\" followed by a space.", "type": "apiKey", "name": "Authorization", "in": "header"