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

io.lakefs.clients.api.BranchesApi 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.BranchCreation;
import io.lakefs.clients.api.model.CherryPickCreation;
import io.lakefs.clients.api.model.Commit;
import io.lakefs.clients.api.model.DiffList;
import io.lakefs.clients.api.model.Error;
import io.lakefs.clients.api.model.Ref;
import io.lakefs.clients.api.model.RefList;
import io.lakefs.clients.api.model.ResetCreation;
import io.lakefs.clients.api.model.RevertCreation;

import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class BranchesApi {
    private ApiClient localVarApiClient;

    public BranchesApi() {
        this(Configuration.getDefaultApiClient());
    }

    public BranchesApi(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

    public void setApiClient(ApiClient apiClient) {
        this.localVarApiClient = apiClient;
    }

    /**
     * Build call for cherryPick
     * @param repository  (required)
     * @param branch  (required)
     * @param cherryPickCreation  (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
201 the cherry-pick commit -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call cherryPickCall(String repository, String branch, CherryPickCreation cherryPickCreation, final ApiCallback _callback) throws ApiException { Object localVarPostBody = cherryPickCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/cherry-pick" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.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 cherryPickValidateBeforeCall(String repository, String branch, CherryPickCreation cherryPickCreation, 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 cherryPick(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling cherryPick(Async)"); } // verify the required parameter 'cherryPickCreation' is set if (cherryPickCreation == null) { throw new ApiException("Missing the required parameter 'cherryPickCreation' when calling cherryPick(Async)"); } okhttp3.Call localVarCall = cherryPickCall(repository, branch, cherryPickCreation, _callback); return localVarCall; } /** * Replay the changes from the given commit on the branch * * @param repository (required) * @param branch (required) * @param cherryPickCreation (required) * @return Commit * @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 the cherry-pick commit -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public Commit cherryPick(String repository, String branch, CherryPickCreation cherryPickCreation) throws ApiException { ApiResponse localVarResp = cherryPickWithHttpInfo(repository, branch, cherryPickCreation); return localVarResp.getData(); } /** * Replay the changes from the given commit on the branch * * @param repository (required) * @param branch (required) * @param cherryPickCreation (required) * @return ApiResponse<Commit> * @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 the cherry-pick commit -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse cherryPickWithHttpInfo(String repository, String branch, CherryPickCreation cherryPickCreation) throws ApiException { okhttp3.Call localVarCall = cherryPickValidateBeforeCall(repository, branch, cherryPickCreation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * Replay the changes from the given commit on the branch (asynchronously) * * @param repository (required) * @param branch (required) * @param cherryPickCreation (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
201 the cherry-pick commit -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call cherryPickAsync(String repository, String branch, CherryPickCreation cherryPickCreation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = cherryPickValidateBeforeCall(repository, branch, cherryPickCreation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createBranch * @param repository (required) * @param branchCreation (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
201 reference -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call createBranchCall(String repository, BranchCreation branchCreation, final ApiCallback _callback) throws ApiException { Object localVarPostBody = branchCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches" .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 = { "text/html", "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 createBranchValidateBeforeCall(String repository, BranchCreation branchCreation, 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 createBranch(Async)"); } // verify the required parameter 'branchCreation' is set if (branchCreation == null) { throw new ApiException("Missing the required parameter 'branchCreation' when calling createBranch(Async)"); } okhttp3.Call localVarCall = createBranchCall(repository, branchCreation, _callback); return localVarCall; } /** * create branch * * @param repository (required) * @param branchCreation (required) * @return 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
201 reference -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public String createBranch(String repository, BranchCreation branchCreation) throws ApiException { ApiResponse localVarResp = createBranchWithHttpInfo(repository, branchCreation); return localVarResp.getData(); } /** * create branch * * @param repository (required) * @param branchCreation (required) * @return ApiResponse<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
201 reference -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse createBranchWithHttpInfo(String repository, BranchCreation branchCreation) throws ApiException { okhttp3.Call localVarCall = createBranchValidateBeforeCall(repository, branchCreation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * create branch (asynchronously) * * @param repository (required) * @param branchCreation (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
201 reference -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call createBranchAsync(String repository, BranchCreation branchCreation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createBranchValidateBeforeCall(repository, branchCreation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteBranch * @param repository (required) * @param branch (required) * @param force (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 branch deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call deleteBranchCall(String repository, String branch, Boolean force, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.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 deleteBranchValidateBeforeCall(String repository, String branch, 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 deleteBranch(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling deleteBranch(Async)"); } okhttp3.Call localVarCall = deleteBranchCall(repository, branch, force, _callback); return localVarCall; } /** * delete branch * * @param repository (required) * @param branch (required) * @param force (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 branch deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public void deleteBranch(String repository, String branch, Boolean force) throws ApiException { deleteBranchWithHttpInfo(repository, branch, force); } /** * delete branch * * @param repository (required) * @param branch (required) * @param force (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 branch deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse deleteBranchWithHttpInfo(String repository, String branch, Boolean force) throws ApiException { okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(repository, branch, force, null); return localVarApiClient.execute(localVarCall); } /** * delete branch (asynchronously) * * @param repository (required) * @param branch (required) * @param force (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 branch deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call deleteBranchAsync(String repository, String branch, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteBranchValidateBeforeCall(repository, branch, force, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for diffBranch * @param repository (required) * @param branch (required) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @param prefix return items prefixed with this value (optional) * @param delimiter delimiter used to group common prefixes by (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
200 diff of branch uncommitted changes -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call diffBranchCall(String repository, String branch, String after, Integer amount, String prefix, String delimiter, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/diff" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (after != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); } if (amount != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount)); } if (prefix != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix)); } if (delimiter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("delimiter", delimiter)); } 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 diffBranchValidateBeforeCall(String repository, String branch, String after, Integer amount, String prefix, String delimiter, 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 diffBranch(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling diffBranch(Async)"); } okhttp3.Call localVarCall = diffBranchCall(repository, branch, after, amount, prefix, delimiter, _callback); return localVarCall; } /** * diff branch * * @param repository (required) * @param branch (required) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @param prefix return items prefixed with this value (optional) * @param delimiter delimiter used to group common prefixes by (optional) * @return DiffList * @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 diff of branch uncommitted changes -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public DiffList diffBranch(String repository, String branch, String after, Integer amount, String prefix, String delimiter) throws ApiException { ApiResponse localVarResp = diffBranchWithHttpInfo(repository, branch, after, amount, prefix, delimiter); return localVarResp.getData(); } /** * diff branch * * @param repository (required) * @param branch (required) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @param prefix return items prefixed with this value (optional) * @param delimiter delimiter used to group common prefixes by (optional) * @return ApiResponse<DiffList> * @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 diff of branch uncommitted changes -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse diffBranchWithHttpInfo(String repository, String branch, String after, Integer amount, String prefix, String delimiter) throws ApiException { okhttp3.Call localVarCall = diffBranchValidateBeforeCall(repository, branch, after, amount, prefix, delimiter, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * diff branch (asynchronously) * * @param repository (required) * @param branch (required) * @param after return items after this value (optional) * @param amount how many items to return (optional, default to 100) * @param prefix return items prefixed with this value (optional) * @param delimiter delimiter used to group common prefixes by (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
200 diff of branch uncommitted changes -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call diffBranchAsync(String repository, String branch, String after, Integer amount, String prefix, String delimiter, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = diffBranchValidateBeforeCall(repository, branch, after, amount, prefix, delimiter, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getBranch * @param repository (required) * @param branch (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 -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call getBranchCall(String repository, String branch, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.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 getBranchValidateBeforeCall(String repository, String branch, 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 getBranch(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling getBranch(Async)"); } okhttp3.Call localVarCall = getBranchCall(repository, branch, _callback); return localVarCall; } /** * get branch * * @param repository (required) * @param branch (required) * @return Ref * @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 -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public Ref getBranch(String repository, String branch) throws ApiException { ApiResponse localVarResp = getBranchWithHttpInfo(repository, branch); return localVarResp.getData(); } /** * get branch * * @param repository (required) * @param branch (required) * @return ApiResponse<Ref> * @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 -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse getBranchWithHttpInfo(String repository, String branch) throws ApiException { okhttp3.Call localVarCall = getBranchValidateBeforeCall(repository, branch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * get branch (asynchronously) * * @param repository (required) * @param branch (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 -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call getBranchAsync(String repository, String branch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getBranchValidateBeforeCall(repository, branch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for listBranches * @param repository (required) * @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 branch list -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call listBranchesCall(String repository, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/branches" .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 (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 listBranchesValidateBeforeCall(String repository, String prefix, String after, Integer amount, 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 listBranches(Async)"); } okhttp3.Call localVarCall = listBranchesCall(repository, prefix, after, amount, _callback); return localVarCall; } /** * list branches * * @param repository (required) * @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 RefList * @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 list -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public RefList listBranches(String repository, String prefix, String after, Integer amount) throws ApiException { ApiResponse localVarResp = listBranchesWithHttpInfo(repository, prefix, after, amount); return localVarResp.getData(); } /** * list branches * * @param repository (required) * @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<RefList> * @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 list -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse listBranchesWithHttpInfo(String repository, String prefix, String after, Integer amount) throws ApiException { okhttp3.Call localVarCall = listBranchesValidateBeforeCall(repository, prefix, after, amount, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * list branches (asynchronously) * * @param repository (required) * @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 branch list -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call listBranchesAsync(String repository, String prefix, String after, Integer amount, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listBranchesValidateBeforeCall(repository, prefix, after, amount, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for resetBranch * @param repository (required) * @param branch (required) * @param resetCreation (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 reset successful -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call resetBranchCall(String repository, String branch, ResetCreation resetCreation, final ApiCallback _callback) throws ApiException { Object localVarPostBody = resetCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.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 resetBranchValidateBeforeCall(String repository, String branch, ResetCreation resetCreation, 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 resetBranch(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling resetBranch(Async)"); } // verify the required parameter 'resetCreation' is set if (resetCreation == null) { throw new ApiException("Missing the required parameter 'resetCreation' when calling resetBranch(Async)"); } okhttp3.Call localVarCall = resetBranchCall(repository, branch, resetCreation, _callback); return localVarCall; } /** * reset branch * * @param repository (required) * @param branch (required) * @param resetCreation (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 reset successful -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public void resetBranch(String repository, String branch, ResetCreation resetCreation) throws ApiException { resetBranchWithHttpInfo(repository, branch, resetCreation); } /** * reset branch * * @param repository (required) * @param branch (required) * @param resetCreation (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 reset successful -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse resetBranchWithHttpInfo(String repository, String branch, ResetCreation resetCreation) throws ApiException { okhttp3.Call localVarCall = resetBranchValidateBeforeCall(repository, branch, resetCreation, null); return localVarApiClient.execute(localVarCall); } /** * reset branch (asynchronously) * * @param repository (required) * @param branch (required) * @param resetCreation (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 reset successful -
400 Bad Request -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call resetBranchAsync(String repository, String branch, ResetCreation resetCreation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = resetBranchValidateBeforeCall(repository, branch, resetCreation, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for revertBranch * @param repository (required) * @param branch (required) * @param revertCreation (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 revert successful -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call revertBranchCall(String repository, String branch, RevertCreation revertCreation, final ApiCallback _callback) throws ApiException { Object localVarPostBody = revertCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/revert" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.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 revertBranchValidateBeforeCall(String repository, String branch, RevertCreation revertCreation, 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 revertBranch(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling revertBranch(Async)"); } // verify the required parameter 'revertCreation' is set if (revertCreation == null) { throw new ApiException("Missing the required parameter 'revertCreation' when calling revertBranch(Async)"); } okhttp3.Call localVarCall = revertBranchCall(repository, branch, revertCreation, _callback); return localVarCall; } /** * revert * * @param repository (required) * @param branch (required) * @param revertCreation (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 revert successful -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public void revertBranch(String repository, String branch, RevertCreation revertCreation) throws ApiException { revertBranchWithHttpInfo(repository, branch, revertCreation); } /** * revert * * @param repository (required) * @param branch (required) * @param revertCreation (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 revert successful -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse revertBranchWithHttpInfo(String repository, String branch, RevertCreation revertCreation) throws ApiException { okhttp3.Call localVarCall = revertBranchValidateBeforeCall(repository, branch, revertCreation, null); return localVarApiClient.execute(localVarCall); } /** * revert (asynchronously) * * @param repository (required) * @param branch (required) * @param revertCreation (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 revert successful -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call revertBranchAsync(String repository, String branch, RevertCreation revertCreation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = revertBranchValidateBeforeCall(repository, branch, revertCreation, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy