All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.lakefs.clients.api.RepositoriesApi Maven / Gradle / Ivy

There is a newer version: 1.43.0
Show newest version
/*
 * 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> localVarResp = getRepositoryMetadataWithHttpInfo(repository); return localVarResp.getData(); } /** * get repository metadata * * @param repository (required) * @return ApiResponse<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 ApiResponse> getRepositoryMetadataWithHttpInfo(String repository) throws ApiException { okhttp3.Call localVarCall = getRepositoryMetadataValidateBeforeCall(repository, null); Type localVarReturnType = new TypeToken>(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * get repository metadata (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 metadata -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call getRepositoryMetadataAsync(String repository, final ApiCallback> _callback) throws ApiException { okhttp3.Call localVarCall = getRepositoryMetadataValidateBeforeCall(repository, _callback); Type localVarReturnType = new TypeToken>(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listRepositories * @param prefix return items prefixed with this value (optional) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @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 list -
401 Unauthorized -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call listRepositoriesCall(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // 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 (prefix != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix)); } if (after != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); } if (amount != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount)); } 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 listRepositoriesValidateBeforeCall(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listRepositoriesCall(prefix, after, amount, _callback); return localVarCall; } /** * list repositories * * @param prefix return items prefixed with this value (optional) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @return RepositoryList * @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 list -
401 Unauthorized -
420 too many requests -
0 Internal Server Error -
*/ public RepositoryList listRepositories(String prefix, String after, Integer amount) throws ApiException { ApiResponse localVarResp = listRepositoriesWithHttpInfo(prefix, after, amount); return localVarResp.getData(); } /** * list repositories * * @param prefix return items prefixed with this value (optional) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @return ApiResponse<RepositoryList> * @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 list -
401 Unauthorized -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse listRepositoriesWithHttpInfo(String prefix, String after, Integer amount) throws ApiException { okhttp3.Call localVarCall = listRepositoriesValidateBeforeCall(prefix, after, amount, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * list repositories (asynchronously) * * @param prefix return items prefixed with this value (optional) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @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 list -
401 Unauthorized -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call listRepositoriesAsync(String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listRepositoriesValidateBeforeCall(prefix, after, amount, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for restoreStatus * @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 restore task status -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call restoreStatusCall(String repository, String taskId, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/restore" .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 restoreStatusValidateBeforeCall(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 restoreStatus(Async)"); } // verify the required parameter 'taskId' is set if (taskId == null) { throw new ApiException("Missing the required parameter 'taskId' when calling restoreStatus(Async)"); } okhttp3.Call localVarCall = restoreStatusCall(repository, taskId, _callback); return localVarCall; } /** * Status of a restore request * * @param repository (required) * @param taskId (required) * @return RepositoryRestoreStatus * @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 restore task status -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public RepositoryRestoreStatus restoreStatus(String repository, String taskId) throws ApiException { ApiResponse localVarResp = restoreStatusWithHttpInfo(repository, taskId); return localVarResp.getData(); } /** * Status of a restore request * * @param repository (required) * @param taskId (required) * @return ApiResponse<RepositoryRestoreStatus> * @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 restore task status -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse restoreStatusWithHttpInfo(String repository, String taskId) throws ApiException { okhttp3.Call localVarCall = restoreStatusValidateBeforeCall(repository, taskId, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Status of a restore request (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 restore task status -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call restoreStatusAsync(String repository, String taskId, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = restoreStatusValidateBeforeCall(repository, taskId, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for restoreSubmit * @param repository (required) * @param refsRestore (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 restore task created -
400 Validation Error -
403 Forbidden -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
*/ public okhttp3.Call restoreSubmitCall(String repository, RefsRestore refsRestore, final ApiCallback _callback) throws ApiException { Object localVarPostBody = refsRestore; // create path and map variables String localVarPath = "/repositories/{repository}/restore" .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 = { "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 restoreSubmitValidateBeforeCall(String repository, RefsRestore refsRestore, 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 restoreSubmit(Async)"); } // verify the required parameter 'refsRestore' is set if (refsRestore == null) { throw new ApiException("Missing the required parameter 'refsRestore' when calling restoreSubmit(Async)"); } okhttp3.Call localVarCall = restoreSubmitCall(repository, refsRestore, _callback); return localVarCall; } /** * Restore repository from a dump in the object store * * @param repository (required) * @param refsRestore (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 restore task created -
400 Validation Error -
403 Forbidden -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
*/ public TaskInfo restoreSubmit(String repository, RefsRestore refsRestore) throws ApiException { ApiResponse localVarResp = restoreSubmitWithHttpInfo(repository, refsRestore); return localVarResp.getData(); } /** * Restore repository from a dump in the object store * * @param repository (required) * @param refsRestore (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 restore task created -
400 Validation Error -
403 Forbidden -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
*/ public ApiResponse restoreSubmitWithHttpInfo(String repository, RefsRestore refsRestore) throws ApiException { okhttp3.Call localVarCall = restoreSubmitValidateBeforeCall(repository, refsRestore, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Restore repository from a dump in the object store (asynchronously) * * @param repository (required) * @param refsRestore (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 restore task created -
400 Validation Error -
403 Forbidden -
401 Unauthorized -
404 Resource Not Found -
0 Internal Server Error -
*/ public okhttp3.Call restoreSubmitAsync(String repository, RefsRestore refsRestore, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = restoreSubmitValidateBeforeCall(repository, refsRestore, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for setBranchProtectionRules * @param repository (required) * @param branchProtectionRule (required) * @param ifMatch if provided, the branch protection rules will be updated only if the current ETag match the provided value (optional) * @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 branch protection rule created successfully -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call setBranchProtectionRulesCall(String repository, List branchProtectionRule, String ifMatch, final ApiCallback _callback) throws ApiException { Object localVarPostBody = branchProtectionRule; // 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(); if (ifMatch != null) { localVarHeaderParams.put("If-Match", localVarApiClient.parameterToString(ifMatch)); } 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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setBranchProtectionRulesValidateBeforeCall(String repository, List branchProtectionRule, String ifMatch, 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 setBranchProtectionRules(Async)"); } // verify the required parameter 'branchProtectionRule' is set if (branchProtectionRule == null) { throw new ApiException("Missing the required parameter 'branchProtectionRule' when calling setBranchProtectionRules(Async)"); } okhttp3.Call localVarCall = setBranchProtectionRulesCall(repository, branchProtectionRule, ifMatch, _callback); return localVarCall; } /** * * * @param repository (required) * @param branchProtectionRule (required) * @param ifMatch if provided, the branch protection rules will be updated only if the current ETag match the provided value (optional) * @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 branch protection rule created successfully -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public void setBranchProtectionRules(String repository, List branchProtectionRule, String ifMatch) throws ApiException { setBranchProtectionRulesWithHttpInfo(repository, branchProtectionRule, ifMatch); } /** * * * @param repository (required) * @param branchProtectionRule (required) * @param ifMatch if provided, the branch protection rules will be updated only if the current ETag match the provided value (optional) * @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 branch protection rule created successfully -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse setBranchProtectionRulesWithHttpInfo(String repository, List branchProtectionRule, String ifMatch) throws ApiException { okhttp3.Call localVarCall = setBranchProtectionRulesValidateBeforeCall(repository, branchProtectionRule, ifMatch, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * * @param repository (required) * @param branchProtectionRule (required) * @param ifMatch if provided, the branch protection rules will be updated only if the current ETag match the provided value (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 * @http.response.details
Status Code Description Response Headers
204 branch protection rule created successfully -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call setBranchProtectionRulesAsync(String repository, List branchProtectionRule, String ifMatch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setBranchProtectionRulesValidateBeforeCall(repository, branchProtectionRule, ifMatch, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for setGCRules * @param repository (required) * @param garbageCollectionRules (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 set garbage collection rules successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call setGCRulesCall(String repository, GarbageCollectionRules garbageCollectionRules, final ApiCallback _callback) throws ApiException { Object localVarPostBody = garbageCollectionRules; // 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 = { "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, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call setGCRulesValidateBeforeCall(String repository, GarbageCollectionRules garbageCollectionRules, 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 setGCRules(Async)"); } // verify the required parameter 'garbageCollectionRules' is set if (garbageCollectionRules == null) { throw new ApiException("Missing the required parameter 'garbageCollectionRules' when calling setGCRules(Async)"); } okhttp3.Call localVarCall = setGCRulesCall(repository, garbageCollectionRules, _callback); return localVarCall; } /** * * * @param repository (required) * @param garbageCollectionRules (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 set garbage collection rules successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public void setGCRules(String repository, GarbageCollectionRules garbageCollectionRules) throws ApiException { setGCRulesWithHttpInfo(repository, garbageCollectionRules); } /** * * * @param repository (required) * @param garbageCollectionRules (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 set garbage collection rules successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse setGCRulesWithHttpInfo(String repository, GarbageCollectionRules garbageCollectionRules) throws ApiException { okhttp3.Call localVarCall = setGCRulesValidateBeforeCall(repository, garbageCollectionRules, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * * @param repository (required) * @param garbageCollectionRules (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 set garbage collection rules successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call setGCRulesAsync(String repository, GarbageCollectionRules garbageCollectionRules, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = setGCRulesValidateBeforeCall(repository, garbageCollectionRules, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy