queryParams, List queryParams, List collectionQueryParams, Object body, Map headerParams, Map formParams, String[] authNames, ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
diff --git a/src/main/java/io/gitea/ApiException.java b/src/main/java/io/gitea/ApiException.java
index 2c8fec4..2fe9dad 100644
--- a/src/main/java/io/gitea/ApiException.java
+++ b/src/main/java/io/gitea/ApiException.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -16,7 +16,7 @@
import java.util.Map;
import java.util.List;
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-03-09T00:25:51.647+03:00")
public class ApiException extends Exception {
private int code = 0;
private Map> responseHeaders = null;
diff --git a/src/main/java/io/gitea/ApiResponse.java b/src/main/java/io/gitea/ApiResponse.java
index a1330b4..4574e72 100644
--- a/src/main/java/io/gitea/ApiResponse.java
+++ b/src/main/java/io/gitea/ApiResponse.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
diff --git a/src/main/java/io/gitea/Configuration.java b/src/main/java/io/gitea/Configuration.java
index 40a2288..219aacf 100644
--- a/src/main/java/io/gitea/Configuration.java
+++ b/src/main/java/io/gitea/Configuration.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -13,7 +13,7 @@
package io.gitea;
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-03-09T00:25:51.647+03:00")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();
diff --git a/src/main/java/io/gitea/GzipRequestInterceptor.java b/src/main/java/io/gitea/GzipRequestInterceptor.java
index 404fdbb..d1117c9 100644
--- a/src/main/java/io/gitea/GzipRequestInterceptor.java
+++ b/src/main/java/io/gitea/GzipRequestInterceptor.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
diff --git a/src/main/java/io/gitea/JSON.java b/src/main/java/io/gitea/JSON.java
index c8bcdf3..38b1523 100644
--- a/src/main/java/io/gitea/JSON.java
+++ b/src/main/java/io/gitea/JSON.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
diff --git a/src/main/java/io/gitea/Pair.java b/src/main/java/io/gitea/Pair.java
index 914659d..360997c 100644
--- a/src/main/java/io/gitea/Pair.java
+++ b/src/main/java/io/gitea/Pair.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -13,7 +13,7 @@
package io.gitea;
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-03-09T00:25:51.647+03:00")
public class Pair {
private String name = "";
private String value = "";
diff --git a/src/main/java/io/gitea/ProgressRequestBody.java b/src/main/java/io/gitea/ProgressRequestBody.java
index 1bed222..d75c3a2 100644
--- a/src/main/java/io/gitea/ProgressRequestBody.java
+++ b/src/main/java/io/gitea/ProgressRequestBody.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
diff --git a/src/main/java/io/gitea/ProgressResponseBody.java b/src/main/java/io/gitea/ProgressResponseBody.java
index f66d852..dff32ff 100644
--- a/src/main/java/io/gitea/ProgressResponseBody.java
+++ b/src/main/java/io/gitea/ProgressResponseBody.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
diff --git a/src/main/java/io/gitea/StringUtil.java b/src/main/java/io/gitea/StringUtil.java
index 1556ff2..4cda5be 100644
--- a/src/main/java/io/gitea/StringUtil.java
+++ b/src/main/java/io/gitea/StringUtil.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -13,7 +13,7 @@
package io.gitea;
-@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-10-15T10:08:30.717+03:00")
+@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-03-09T00:25:51.647+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 8c91225..bce9ebd 100644
--- a/src/main/java/io/gitea/api/AdminApi.java
+++ b/src/main/java/io/gitea/api/AdminApi.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -31,6 +31,7 @@
import io.gitea.model.CreateOrgOption;
import io.gitea.model.CreateRepoOption;
import io.gitea.model.CreateUserOption;
+import io.gitea.model.Cron;
import io.gitea.model.EditUserOption;
import io.gitea.model.Organization;
import io.gitea.model.PublicKey;
@@ -62,6 +63,135 @@ public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
+ /**
+ * Build call for adminAdoptRepository
+ * @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 adminAdoptRepositoryCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/admin/unadopted/{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", "TOTPHeader", "Token" };
+ return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call adminAdoptRepositoryValidateBeforeCall(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 adminAdoptRepository(Async)");
+ }
+
+ // verify the required parameter 'repo' is set
+ if (repo == null) {
+ throw new ApiException("Missing the required parameter 'repo' when calling adminAdoptRepository(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = adminAdoptRepositoryCall(owner, repo, progressListener, progressRequestListener);
+ return call;
+
+ }
+
+ /**
+ * Adopt unadopted files as a repository
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void adminAdoptRepository(String owner, String repo) throws ApiException {
+ adminAdoptRepositoryWithHttpInfo(owner, repo);
+ }
+
+ /**
+ * Adopt unadopted files as a repository
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse adminAdoptRepositoryWithHttpInfo(String owner, String repo) throws ApiException {
+ com.squareup.okhttp.Call call = adminAdoptRepositoryValidateBeforeCall(owner, repo, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Adopt unadopted files as a repository (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 adminAdoptRepositoryAsync(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 = adminAdoptRepositoryValidateBeforeCall(owner, repo, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
/**
* Build call for adminCreateOrg
* @param username username of the user that will own the created organization (required)
@@ -109,7 +239,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -241,7 +371,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -368,7 +498,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -392,7 +522,7 @@ private com.squareup.okhttp.Call adminCreateRepoValidateBeforeCall(String userna
}
/**
- * Create a repository on behalf a user
+ * Create a repository on behalf of a user
*
* @param username username of the user. This user will own the created repository (required)
* @param repository (required)
@@ -405,7 +535,7 @@ public Repository adminCreateRepo(String username, CreateRepoOption repository)
}
/**
- * Create a repository on behalf a user
+ * Create a repository on behalf of a user
*
* @param username username of the user. This user will own the created repository (required)
* @param repository (required)
@@ -419,7 +549,7 @@ public ApiResponse adminCreateRepoWithHttpInfo(String username, Crea
}
/**
- * Create a repository on behalf a user (asynchronously)
+ * Create a repository on behalf of a user (asynchronously)
*
* @param username username of the user. This user will own the created repository (required)
* @param repository (required)
@@ -498,7 +628,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -570,6 +700,379 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
+ /**
+ * Build call for adminCronList
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @param progressListener Progress listener
+ * @param progressRequestListener Progress request listener
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call adminCronListCall(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/cron";
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ if (page != null)
+ localVarQueryParams.addAll(apiClient.parameterToPair("page", page));
+ if (limit != null)
+ localVarQueryParams.addAll(apiClient.parameterToPair("limit", limit));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json", "text/plain"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call adminCronListValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+
+ com.squareup.okhttp.Call call = adminCronListCall(page, limit, progressListener, progressRequestListener);
+ return call;
+
+ }
+
+ /**
+ * List cron tasks
+ *
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @return List<Cron>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public List adminCronList(Integer page, Integer limit) throws ApiException {
+ ApiResponse> resp = adminCronListWithHttpInfo(page, limit);
+ return resp.getData();
+ }
+
+ /**
+ * List cron tasks
+ *
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @return ApiResponse<List<Cron>>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse> adminCronListWithHttpInfo(Integer page, Integer limit) throws ApiException {
+ com.squareup.okhttp.Call call = adminCronListValidateBeforeCall(page, limit, null, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ return apiClient.execute(call, localVarReturnType);
+ }
+
+ /**
+ * List cron tasks (asynchronously)
+ *
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @param callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ */
+ public com.squareup.okhttp.Call adminCronListAsync(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 = adminCronListValidateBeforeCall(page, limit, progressListener, progressRequestListener);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ apiClient.executeAsync(call, localVarReturnType, callback);
+ return call;
+ }
+ /**
+ * Build call for adminCronRun
+ * @param task task to run (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 adminCronRunCall(String task, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/admin/cron/{task}"
+ .replaceAll("\\{" + "task" + "\\}", apiClient.escapeString(task.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json", "text/plain"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
+ return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call adminCronRunValidateBeforeCall(String task, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+ // verify the required parameter 'task' is set
+ if (task == null) {
+ throw new ApiException("Missing the required parameter 'task' when calling adminCronRun(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = adminCronRunCall(task, progressListener, progressRequestListener);
+ return call;
+
+ }
+
+ /**
+ * Run cron task
+ *
+ * @param task task to run (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void adminCronRun(String task) throws ApiException {
+ adminCronRunWithHttpInfo(task);
+ }
+
+ /**
+ * Run cron task
+ *
+ * @param task task to run (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse adminCronRunWithHttpInfo(String task) throws ApiException {
+ com.squareup.okhttp.Call call = adminCronRunValidateBeforeCall(task, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Run cron task (asynchronously)
+ *
+ * @param task task to run (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 adminCronRunAsync(String task, 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 = adminCronRunValidateBeforeCall(task, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
+ /**
+ * Build call for adminDeleteUnadoptedRepository
+ * @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 adminDeleteUnadoptedRepositoryCall(String owner, String repo, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/admin/unadopted/{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", "TOTPHeader", "Token" };
+ return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call adminDeleteUnadoptedRepositoryValidateBeforeCall(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 adminDeleteUnadoptedRepository(Async)");
+ }
+
+ // verify the required parameter 'repo' is set
+ if (repo == null) {
+ throw new ApiException("Missing the required parameter 'repo' when calling adminDeleteUnadoptedRepository(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = adminDeleteUnadoptedRepositoryCall(owner, repo, progressListener, progressRequestListener);
+ return call;
+
+ }
+
+ /**
+ * Delete unadopted files
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void adminDeleteUnadoptedRepository(String owner, String repo) throws ApiException {
+ adminDeleteUnadoptedRepositoryWithHttpInfo(owner, repo);
+ }
+
+ /**
+ * Delete unadopted files
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse adminDeleteUnadoptedRepositoryWithHttpInfo(String owner, String repo) throws ApiException {
+ com.squareup.okhttp.Call call = adminDeleteUnadoptedRepositoryValidateBeforeCall(owner, repo, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Delete unadopted files (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 adminDeleteUnadoptedRepositoryAsync(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 = adminDeleteUnadoptedRepositoryValidateBeforeCall(owner, repo, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
/**
* Build call for adminDeleteUser
* @param username username of user to delete (required)
@@ -616,7 +1119,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -737,7 +1240,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -865,7 +1368,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -948,7 +1451,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
/**
* 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 limit page size of results (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
@@ -995,7 +1498,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -1012,7 +1515,7 @@ private com.squareup.okhttp.Call adminGetAllOrgsValidateBeforeCall(Integer page,
* 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)
+ * @param limit page size of results (optional)
* @return List<Organization>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -1025,7 +1528,7 @@ public List adminGetAllOrgs(Integer page, Integer limit) throws Ap
* 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)
+ * @param limit page size of results (optional)
* @return ApiResponse<List<Organization>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
@@ -1039,7 +1542,7 @@ public ApiResponse> adminGetAllOrgsWithHttpInfo(Integer page,
* 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 limit page size of results (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
@@ -1072,12 +1575,14 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
}
/**
* Build call for adminGetAllUsers
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call adminGetAllUsersCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public com.squareup.okhttp.Call adminGetAllUsersCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
@@ -1085,6 +1590,10 @@ public com.squareup.okhttp.Call adminGetAllUsersCall(final ProgressResponseBody.
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();
@@ -1114,15 +1623,15 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call adminGetAllUsersValidateBeforeCall(final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private com.squareup.okhttp.Call adminGetAllUsersValidateBeforeCall(Integer page, Integer limit, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
- com.squareup.okhttp.Call call = adminGetAllUsersCall(progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = adminGetAllUsersCall(page, limit, progressListener, progressRequestListener);
return call;
}
@@ -1130,22 +1639,26 @@ private com.squareup.okhttp.Call adminGetAllUsersValidateBeforeCall(final Progre
/**
* List all users
*
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
* @return List<User>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public List adminGetAllUsers() throws ApiException {
- ApiResponse> resp = adminGetAllUsersWithHttpInfo();
+ public List adminGetAllUsers(Integer page, Integer limit) throws ApiException {
+ ApiResponse> resp = adminGetAllUsersWithHttpInfo(page, limit);
return resp.getData();
}
/**
* List all users
*
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
* @return ApiResponse<List<User>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public ApiResponse> adminGetAllUsersWithHttpInfo() throws ApiException {
- com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(null, null);
+ public ApiResponse> adminGetAllUsersWithHttpInfo(Integer page, Integer limit) throws ApiException {
+ com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(page, limit, null, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
@@ -1153,11 +1666,13 @@ public ApiResponse> adminGetAllUsersWithHttpInfo() throws ApiExceptio
/**
* List all users (asynchronously)
*
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call adminGetAllUsersAsync(final ApiCallback> callback) throws ApiException {
+ public com.squareup.okhttp.Call adminGetAllUsersAsync(Integer page, Integer limit, final ApiCallback> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -1178,9 +1693,140 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = adminGetAllUsersValidateBeforeCall(page, limit, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
+ /**
+ * Build call for adminUnadoptedList
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @param pattern pattern of repositories to search for (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 adminUnadoptedListCall(Integer page, Integer limit, String pattern, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ Object localVarPostBody = null;
+
+ // create path and map variables
+ String localVarPath = "/admin/unadopted";
+
+ 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));
+ if (pattern != null)
+ localVarQueryParams.addAll(apiClient.parameterToPair("pattern", pattern));
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json", "text/plain"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
+ return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call adminUnadoptedListValidateBeforeCall(Integer page, Integer limit, String pattern, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+
+
+ com.squareup.okhttp.Call call = adminUnadoptedListCall(page, limit, pattern, progressListener, progressRequestListener);
+ return call;
+
+ }
+
+ /**
+ * List unadopted repositories
+ *
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @param pattern pattern of repositories to search for (optional)
+ * @return List<String>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public List adminUnadoptedList(Integer page, Integer limit, String pattern) throws ApiException {
+ ApiResponse> resp = adminUnadoptedListWithHttpInfo(page, limit, pattern);
+ return resp.getData();
+ }
+
+ /**
+ * List unadopted repositories
+ *
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @param pattern pattern of repositories to search for (optional)
+ * @return ApiResponse<List<String>>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse> adminUnadoptedListWithHttpInfo(Integer page, Integer limit, String pattern) throws ApiException {
+ com.squareup.okhttp.Call call = adminUnadoptedListValidateBeforeCall(page, limit, pattern, null, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ return apiClient.execute(call, localVarReturnType);
+ }
+
+ /**
+ * List unadopted repositories (asynchronously)
+ *
+ * @param page page number of results to return (1-based) (optional)
+ * @param limit page size of results (optional)
+ * @param pattern pattern of repositories to search for (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 adminUnadoptedListAsync(Integer page, Integer limit, String pattern, 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 = adminUnadoptedListValidateBeforeCall(page, limit, pattern, 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 055cfe5..d46da44 100644
--- a/src/main/java/io/gitea/api/IssueApi.java
+++ b/src/main/java/io/gitea/api/IssueApi.java
@@ -2,7 +2,7 @@
* Gitea API.
* This documentation describes the Gitea API.
*
- * OpenAPI spec version: 1.1.1
+ * OpenAPI spec version: 1.14.0+dev-803-gf1da46622
*
*
* NOTE: This class is auto generated by the swagger code generator program.
@@ -38,12 +38,17 @@
import io.gitea.model.EditIssueOption;
import io.gitea.model.EditLabelOption;
import io.gitea.model.EditMilestoneOption;
+import io.gitea.model.EditReactionOption;
import io.gitea.model.Issue;
import io.gitea.model.IssueDeadline;
import io.gitea.model.IssueLabelsOption;
import io.gitea.model.Label;
import io.gitea.model.Milestone;
+import org.threeten.bp.OffsetDateTime;
+import io.gitea.model.Reaction;
import io.gitea.model.TrackedTime;
+import io.gitea.model.User;
+import io.gitea.model.WatchInfo;
import java.lang.reflect.Type;
import java.util.ArrayList;
@@ -121,7 +126,7 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@@ -217,25 +222,174 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
+ /**
+ * Build call for issueAddSubscription
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param index index of the issue (required)
+ * @param user user to subscribe (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 issueAddSubscriptionCall(String owner, String repo, Long index, String user, 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}/subscriptions/{user}"
+ .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString()))
+ .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString()))
+ .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString()))
+ .replaceAll("\\{" + "user" + "\\}", apiClient.escapeString(user.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+
+ Map localVarHeaderParams = new HashMap();
+
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "application/json"
+ };
+ final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
+ if (localVarAccept != null) localVarHeaderParams.put("Accept", localVarAccept);
+
+ final String[] localVarContentTypes = {
+ "application/json"
+ };
+ final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
+ localVarHeaderParams.put("Content-Type", localVarContentType);
+
+ if(progressListener != null) {
+ apiClient.getHttpClient().networkInterceptors().add(new com.squareup.okhttp.Interceptor() {
+ @Override
+ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Chain chain) throws IOException {
+ com.squareup.okhttp.Response originalResponse = chain.proceed(chain.request());
+ return originalResponse.newBuilder()
+ .body(new ProgressResponseBody(originalResponse.body(), progressListener))
+ .build();
+ }
+ });
+ }
+
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
+ return apiClient.buildCall(localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
+ }
+
+ @SuppressWarnings("rawtypes")
+ private com.squareup.okhttp.Call issueAddSubscriptionValidateBeforeCall(String owner, String repo, Long index, String user, 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 issueAddSubscription(Async)");
+ }
+
+ // verify the required parameter 'repo' is set
+ if (repo == null) {
+ throw new ApiException("Missing the required parameter 'repo' when calling issueAddSubscription(Async)");
+ }
+
+ // verify the required parameter 'index' is set
+ if (index == null) {
+ throw new ApiException("Missing the required parameter 'index' when calling issueAddSubscription(Async)");
+ }
+
+ // verify the required parameter 'user' is set
+ if (user == null) {
+ throw new ApiException("Missing the required parameter 'user' when calling issueAddSubscription(Async)");
+ }
+
+
+ com.squareup.okhttp.Call call = issueAddSubscriptionCall(owner, repo, index, user, progressListener, progressRequestListener);
+ return call;
+
+ }
+
+ /**
+ * Subscribe user to issue
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param index index of the issue (required)
+ * @param user user to subscribe (required)
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public void issueAddSubscription(String owner, String repo, Long index, String user) throws ApiException {
+ issueAddSubscriptionWithHttpInfo(owner, repo, index, user);
+ }
+
+ /**
+ * Subscribe user to issue
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param index index of the issue (required)
+ * @param user user to subscribe (required)
+ * @return ApiResponse<Void>
+ * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
+ */
+ public ApiResponse issueAddSubscriptionWithHttpInfo(String owner, String repo, Long index, String user) throws ApiException {
+ com.squareup.okhttp.Call call = issueAddSubscriptionValidateBeforeCall(owner, repo, index, user, null, null);
+ return apiClient.execute(call);
+ }
+
+ /**
+ * Subscribe user to issue (asynchronously)
+ *
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param index index of the issue (required)
+ * @param user user to subscribe (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 issueAddSubscriptionAsync(String owner, String repo, Long index, String user, 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 = issueAddSubscriptionValidateBeforeCall(owner, repo, index, user, progressListener, progressRequestListener);
+ apiClient.executeAsync(call, callback);
+ return call;
+ }
/**
* Build call for issueAddTime
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
- * @param id index of the issue to add tracked time to (required)
+ * @param index index of the issue (required)
* @param body (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
*/
- public com.squareup.okhttp.Call issueAddTimeCall(String owner, String repo, Long id, AddTimeOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ public com.squareup.okhttp.Call issueAddTimeCall(String owner, String repo, Long index, AddTimeOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
- String localVarPath = "/repos/{owner}/{repo}/issues/{id}/times"
+ String localVarPath = "/repos/{owner}/{repo}/issues/{index}/times"
.replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString()))
.replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString()))
- .replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
+ .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
@@ -268,12 +422,12 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
});
}
- String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "Token" };
+ String[] localVarAuthNames = new String[] { "AccessToken", "AuthorizationHeaderToken", "BasicAuth", "SudoHeader", "SudoParam", "TOTPHeader", "Token" };
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}
@SuppressWarnings("rawtypes")
- private com.squareup.okhttp.Call issueAddTimeValidateBeforeCall(String owner, String repo, Long id, AddTimeOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
+ private com.squareup.okhttp.Call issueAddTimeValidateBeforeCall(String owner, String repo, Long index, AddTimeOption body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
// verify the required parameter 'owner' is set
if (owner == null) {
@@ -285,60 +439,60 @@ private com.squareup.okhttp.Call issueAddTimeValidateBeforeCall(String owner, St
throw new ApiException("Missing the required parameter 'repo' when calling issueAddTime(Async)");
}
- // verify the required parameter 'id' is set
- if (id == null) {
- throw new ApiException("Missing the required parameter 'id' when calling issueAddTime(Async)");
+ // verify the required parameter 'index' is set
+ if (index == null) {
+ throw new ApiException("Missing the required parameter 'index' when calling issueAddTime(Async)");
}
- com.squareup.okhttp.Call call = issueAddTimeCall(owner, repo, id, body, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = issueAddTimeCall(owner, repo, index, body, progressListener, progressRequestListener);
return call;
}
/**
- * Add a tracked time to a issue
+ * Add tracked time to a issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
- * @param id index of the issue to add tracked time to (required)
+ * @param index index of the issue (required)
* @param body (optional)
* @return TrackedTime
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public TrackedTime issueAddTime(String owner, String repo, Long id, AddTimeOption body) throws ApiException {
- ApiResponse resp = issueAddTimeWithHttpInfo(owner, repo, id, body);
+ public TrackedTime issueAddTime(String owner, String repo, Long index, AddTimeOption body) throws ApiException {
+ ApiResponse resp = issueAddTimeWithHttpInfo(owner, repo, index, body);
return resp.getData();
}
/**
- * Add a tracked time to a issue
+ * Add tracked time to a issue
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
- * @param id index of the issue to add tracked time to (required)
+ * @param index index of the issue (required)
* @param body (optional)
* @return ApiResponse<TrackedTime>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
*/
- public ApiResponse issueAddTimeWithHttpInfo(String owner, String repo, Long id, AddTimeOption body) throws ApiException {
- com.squareup.okhttp.Call call = issueAddTimeValidateBeforeCall(owner, repo, id, body, null, null);
+ public ApiResponse issueAddTimeWithHttpInfo(String owner, String repo, Long index, AddTimeOption body) throws ApiException {
+ com.squareup.okhttp.Call call = issueAddTimeValidateBeforeCall(owner, repo, index, body, null, null);
Type localVarReturnType = new TypeToken(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
/**
- * Add a tracked time to a issue (asynchronously)
+ * Add tracked time to a issue (asynchronously)
*
* @param owner owner of the repo (required)
* @param repo name of the repo (required)
- * @param id index of the issue to add tracked time to (required)
+ * @param index index of the issue (required)
* @param body (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
*/
- public com.squareup.okhttp.Call issueAddTimeAsync(String owner, String repo, Long id, AddTimeOption body, final ApiCallback callback) throws ApiException {
+ public com.squareup.okhttp.Call issueAddTimeAsync(String owner, String repo, Long index, AddTimeOption body, final ApiCallback callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
@@ -359,11 +513,154 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}
- com.squareup.okhttp.Call call = issueAddTimeValidateBeforeCall(owner, repo, id, body, progressListener, progressRequestListener);
+ com.squareup.okhttp.Call call = issueAddTimeValidateBeforeCall(owner, repo, index, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
}
+ /**
+ * Build call for issueCheckSubscription
+ * @param owner owner of the repo (required)
+ * @param repo name of the repo (required)
+ * @param index index of the issue (required)
+ * @param progressListener Progress listener
+ * @param progressRequestListener Progress request listener
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ */
+ public com.squareup.okhttp.Call issueCheckSubscriptionCall(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}/subscriptions/check"
+ .replaceAll("\\{" + "owner" + "\\}", apiClient.escapeString(owner.toString()))
+ .replaceAll("\\{" + "repo" + "\\}", apiClient.escapeString(repo.toString()))
+ .replaceAll("\\{" + "index" + "\\}", apiClient.escapeString(index.toString()));
+
+ List