Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* lakeFS API
* lakeFS HTTP API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.lakefs.clients.api;
import io.lakefs.clients.api.ApiCallback;
import io.lakefs.clients.api.ApiClient;
import io.lakefs.clients.api.ApiException;
import io.lakefs.clients.api.ApiResponse;
import io.lakefs.clients.api.Configuration;
import io.lakefs.clients.api.Pair;
import io.lakefs.clients.api.ProgressRequestBody;
import io.lakefs.clients.api.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.lakefs.clients.api.model.BranchProtectionRule;
import io.lakefs.clients.api.model.Error;
import io.lakefs.clients.api.model.GarbageCollectionRules;
import io.lakefs.clients.api.model.RefsRestore;
import io.lakefs.clients.api.model.Repository;
import io.lakefs.clients.api.model.RepositoryCreation;
import io.lakefs.clients.api.model.RepositoryDumpStatus;
import io.lakefs.clients.api.model.RepositoryList;
import io.lakefs.clients.api.model.RepositoryRestoreStatus;
import io.lakefs.clients.api.model.TaskInfo;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class RepositoriesApi {
private ApiClient localVarApiClient;
public RepositoriesApi() {
this(Configuration.getDefaultApiClient());
}
public RepositoriesApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for createRepository
* @param repositoryCreation (required)
* @param bare If true, create a bare repository with no initial commit and branch (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
repository
-
400
Validation Error
-
401
Unauthorized
-
409
Resource Conflicts With Target
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call createRepositoryCall(RepositoryCreation repositoryCreation, Boolean bare, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = repositoryCreation;
// create path and map variables
String localVarPath = "/repositories";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (bare != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("bare", bare));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createRepositoryValidateBeforeCall(RepositoryCreation repositoryCreation, Boolean bare, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repositoryCreation' is set
if (repositoryCreation == null) {
throw new ApiException("Missing the required parameter 'repositoryCreation' when calling createRepository(Async)");
}
okhttp3.Call localVarCall = createRepositoryCall(repositoryCreation, bare, _callback);
return localVarCall;
}
/**
* create repository
*
* @param repositoryCreation (required)
* @param bare If true, create a bare repository with no initial commit and branch (optional, default to false)
* @return Repository
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
repository
-
400
Validation Error
-
401
Unauthorized
-
409
Resource Conflicts With Target
-
420
too many requests
-
0
Internal Server Error
-
*/
public Repository createRepository(RepositoryCreation repositoryCreation, Boolean bare) throws ApiException {
ApiResponse localVarResp = createRepositoryWithHttpInfo(repositoryCreation, bare);
return localVarResp.getData();
}
/**
* create repository
*
* @param repositoryCreation (required)
* @param bare If true, create a bare repository with no initial commit and branch (optional, default to false)
* @return ApiResponse<Repository>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
201
repository
-
400
Validation Error
-
401
Unauthorized
-
409
Resource Conflicts With Target
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse createRepositoryWithHttpInfo(RepositoryCreation repositoryCreation, Boolean bare) throws ApiException {
okhttp3.Call localVarCall = createRepositoryValidateBeforeCall(repositoryCreation, bare, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* create repository (asynchronously)
*
* @param repositoryCreation (required)
* @param bare If true, create a bare repository with no initial commit and branch (optional, default to false)
* @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
* @http.response.details
Status Code
Description
Response Headers
201
repository
-
400
Validation Error
-
401
Unauthorized
-
409
Resource Conflicts With Target
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call createRepositoryAsync(RepositoryCreation repositoryCreation, Boolean bare, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createRepositoryValidateBeforeCall(repositoryCreation, bare, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteGCRules
* @param repository (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
deleted garbage collection rules successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call deleteGCRulesCall(String repository, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/settings/gc_rules"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteGCRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling deleteGCRules(Async)");
}
okhttp3.Call localVarCall = deleteGCRulesCall(repository, _callback);
return localVarCall;
}
/**
*
*
* @param repository (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
deleted garbage collection rules successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public void deleteGCRules(String repository) throws ApiException {
deleteGCRulesWithHttpInfo(repository);
}
/**
*
*
* @param repository (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
deleted garbage collection rules successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse deleteGCRulesWithHttpInfo(String repository) throws ApiException {
okhttp3.Call localVarCall = deleteGCRulesValidateBeforeCall(repository, null);
return localVarApiClient.execute(localVarCall);
}
/**
* (asynchronously)
*
* @param repository (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
* @http.response.details
Status Code
Description
Response Headers
204
deleted garbage collection rules successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call deleteGCRulesAsync(String repository, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteGCRulesValidateBeforeCall(repository, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for deleteRepository
* @param repository (required)
* @param force Bypass read-only protection and delete the repository (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
repository deleted successfully
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call deleteRepositoryCall(String repository, Boolean force, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (force != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteRepositoryValidateBeforeCall(String repository, Boolean force, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling deleteRepository(Async)");
}
okhttp3.Call localVarCall = deleteRepositoryCall(repository, force, _callback);
return localVarCall;
}
/**
* delete repository
*
* @param repository (required)
* @param force Bypass read-only protection and delete the repository (optional, default to false)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
repository deleted successfully
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public void deleteRepository(String repository, Boolean force) throws ApiException {
deleteRepositoryWithHttpInfo(repository, force);
}
/**
* delete repository
*
* @param repository (required)
* @param force Bypass read-only protection and delete the repository (optional, default to false)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
repository deleted successfully
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse deleteRepositoryWithHttpInfo(String repository, Boolean force) throws ApiException {
okhttp3.Call localVarCall = deleteRepositoryValidateBeforeCall(repository, force, null);
return localVarApiClient.execute(localVarCall);
}
/**
* delete repository (asynchronously)
*
* @param repository (required)
* @param force Bypass read-only protection and delete the repository (optional, default to false)
* @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
* @http.response.details
Status Code
Description
Response Headers
204
repository deleted successfully
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call deleteRepositoryAsync(String repository, Boolean force, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteRepositoryValidateBeforeCall(repository, force, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for dumpStatus
* @param repository (required)
* @param taskId (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
dump task status
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call dumpStatusCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/dump"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (taskId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("task_id", taskId));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call dumpStatusValidateBeforeCall(String repository, String taskId, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling dumpStatus(Async)");
}
// verify the required parameter 'taskId' is set
if (taskId == null) {
throw new ApiException("Missing the required parameter 'taskId' when calling dumpStatus(Async)");
}
okhttp3.Call localVarCall = dumpStatusCall(repository, taskId, _callback);
return localVarCall;
}
/**
* Status of a repository dump task
*
* @param repository (required)
* @param taskId (required)
* @return RepositoryDumpStatus
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
dump task status
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public RepositoryDumpStatus dumpStatus(String repository, String taskId) throws ApiException {
ApiResponse localVarResp = dumpStatusWithHttpInfo(repository, taskId);
return localVarResp.getData();
}
/**
* Status of a repository dump task
*
* @param repository (required)
* @param taskId (required)
* @return ApiResponse<RepositoryDumpStatus>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
dump task status
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse dumpStatusWithHttpInfo(String repository, String taskId) throws ApiException {
okhttp3.Call localVarCall = dumpStatusValidateBeforeCall(repository, taskId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Status of a repository dump task (asynchronously)
*
* @param repository (required)
* @param taskId (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
* @http.response.details
Status Code
Description
Response Headers
200
dump task status
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call dumpStatusAsync(String repository, String taskId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = dumpStatusValidateBeforeCall(repository, taskId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for dumpSubmit
* @param repository (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
202
dump task information
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
0
Internal Server Error
-
*/
public okhttp3.Call dumpSubmitCall(String repository, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/dump"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call dumpSubmitValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling dumpSubmit(Async)");
}
okhttp3.Call localVarCall = dumpSubmitCall(repository, _callback);
return localVarCall;
}
/**
* Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
*
* @param repository (required)
* @return TaskInfo
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
202
dump task information
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
0
Internal Server Error
-
*/
public TaskInfo dumpSubmit(String repository) throws ApiException {
ApiResponse localVarResp = dumpSubmitWithHttpInfo(repository);
return localVarResp.getData();
}
/**
* Backup the repository metadata (tags, commits, branches) and save the backup to the object store.
*
* @param repository (required)
* @return ApiResponse<TaskInfo>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
202
dump task information
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
0
Internal Server Error
-
*/
public ApiResponse dumpSubmitWithHttpInfo(String repository) throws ApiException {
okhttp3.Call localVarCall = dumpSubmitValidateBeforeCall(repository, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Backup the repository metadata (tags, commits, branches) and save the backup to the object store. (asynchronously)
*
* @param repository (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
* @http.response.details
Status Code
Description
Response Headers
202
dump task information
-
400
Validation Error
-
401
Unauthorized
-
404
Resource Not Found
-
0
Internal Server Error
-
*/
public okhttp3.Call dumpSubmitAsync(String repository, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = dumpSubmitValidateBeforeCall(repository, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getBranchProtectionRules
* @param repository (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
branch protection rules
* ETag -
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getBranchProtectionRulesCall(String repository, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/settings/branch_protection"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getBranchProtectionRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling getBranchProtectionRules(Async)");
}
okhttp3.Call localVarCall = getBranchProtectionRulesCall(repository, _callback);
return localVarCall;
}
/**
* get branch protection rules
*
* @param repository (required)
* @return List<BranchProtectionRule>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
branch protection rules
* ETag -
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public List getBranchProtectionRules(String repository) throws ApiException {
ApiResponse> localVarResp = getBranchProtectionRulesWithHttpInfo(repository);
return localVarResp.getData();
}
/**
* get branch protection rules
*
* @param repository (required)
* @return ApiResponse<List<BranchProtectionRule>>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
branch protection rules
* ETag -
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse> getBranchProtectionRulesWithHttpInfo(String repository) throws ApiException {
okhttp3.Call localVarCall = getBranchProtectionRulesValidateBeforeCall(repository, null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* get branch protection rules (asynchronously)
*
* @param repository (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
* @http.response.details
Status Code
Description
Response Headers
200
branch protection rules
* ETag -
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getBranchProtectionRulesAsync(String repository, final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = getBranchProtectionRulesValidateBeforeCall(repository, _callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getGCRules
* @param repository (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
repository GC rules
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getGCRulesCall(String repository, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/settings/gc_rules"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getGCRulesValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling getGCRules(Async)");
}
okhttp3.Call localVarCall = getGCRulesCall(repository, _callback);
return localVarCall;
}
/**
* get repository GC rules
*
* @param repository (required)
* @return GarbageCollectionRules
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
repository GC rules
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public GarbageCollectionRules getGCRules(String repository) throws ApiException {
ApiResponse localVarResp = getGCRulesWithHttpInfo(repository);
return localVarResp.getData();
}
/**
* get repository GC rules
*
* @param repository (required)
* @return ApiResponse<GarbageCollectionRules>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
repository GC rules
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse getGCRulesWithHttpInfo(String repository) throws ApiException {
okhttp3.Call localVarCall = getGCRulesValidateBeforeCall(repository, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* get repository GC rules (asynchronously)
*
* @param repository (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
* @http.response.details
Status Code
Description
Response Headers
200
repository GC rules
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getGCRulesAsync(String repository, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getGCRulesValidateBeforeCall(repository, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getRepository
* @param repository (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
repository
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getRepositoryCall(String repository, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRepositoryValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling getRepository(Async)");
}
okhttp3.Call localVarCall = getRepositoryCall(repository, _callback);
return localVarCall;
}
/**
* get repository
*
* @param repository (required)
* @return Repository
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
repository
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public Repository getRepository(String repository) throws ApiException {
ApiResponse localVarResp = getRepositoryWithHttpInfo(repository);
return localVarResp.getData();
}
/**
* get repository
*
* @param repository (required)
* @return ApiResponse<Repository>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
repository
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public ApiResponse getRepositoryWithHttpInfo(String repository) throws ApiException {
okhttp3.Call localVarCall = getRepositoryValidateBeforeCall(repository, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* get repository (asynchronously)
*
* @param repository (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
* @http.response.details
Status Code
Description
Response Headers
200
repository
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getRepositoryAsync(String repository, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRepositoryValidateBeforeCall(repository, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getRepositoryMetadata
* @param repository (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
repository metadata
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getRepositoryMetadataCall(String repository, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/metadata"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRepositoryMetadataValidateBeforeCall(String repository, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'repository' is set
if (repository == null) {
throw new ApiException("Missing the required parameter 'repository' when calling getRepositoryMetadata(Async)");
}
okhttp3.Call localVarCall = getRepositoryMetadataCall(repository, _callback);
return localVarCall;
}
/**
* get repository metadata
*
* @param repository (required)
* @return Map<String, String>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
repository metadata
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public Map getRepositoryMetadata(String repository) throws ApiException {
ApiResponse