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

io.lakefs.clients.sdk.RefsApi Maven / Gradle / Ivy

/*
 * 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.sdk;

import io.lakefs.clients.sdk.ApiCallback;
import io.lakefs.clients.sdk.ApiClient;
import io.lakefs.clients.sdk.ApiException;
import io.lakefs.clients.sdk.ApiResponse;
import io.lakefs.clients.sdk.Configuration;
import io.lakefs.clients.sdk.Pair;
import io.lakefs.clients.sdk.ProgressRequestBody;
import io.lakefs.clients.sdk.ProgressResponseBody;

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import io.lakefs.clients.sdk.model.CommitList;
import io.lakefs.clients.sdk.model.DiffList;
import io.lakefs.clients.sdk.model.Error;
import io.lakefs.clients.sdk.model.FindMergeBaseResult;
import io.lakefs.clients.sdk.model.Merge;
import io.lakefs.clients.sdk.model.MergeResult;
import java.time.OffsetDateTime;

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

public class RefsApi {
    private ApiClient localVarApiClient;
    private int localHostIndex;
    private String localCustomBaseUrl;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    public int getHostIndex() {
        return localHostIndex;
    }

    public void setHostIndex(int hostIndex) {
        this.localHostIndex = hostIndex;
    }

    public String getCustomBaseUrl() {
        return localCustomBaseUrl;
    }

    public void setCustomBaseUrl(String customBaseUrl) {
        this.localCustomBaseUrl = customBaseUrl;
    }

    private okhttp3.Call diffRefsCall(String repository, String leftRef, String rightRef, String after, Integer amount, String prefix, String delimiter, String type, final ApiCallback _callback) throws ApiException {
        String basePath = null;
        // Operation Servers
        String[] localBasePaths = new String[] {  };

        // Determine Base Path to Use
        if (localCustomBaseUrl != null){
            basePath = localCustomBaseUrl;
        } else if ( localBasePaths.length > 0 ) {
            basePath = localBasePaths[localHostIndex];
        } else {
            basePath = null;
        }

        Object localVarPostBody = null;

        // create path and map variables
        String localVarPath = "/repositories/{repository}/refs/{leftRef}/diff/{rightRef}"
            .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()))
            .replace("{" + "leftRef" + "}", localVarApiClient.escapeString(leftRef.toString()))
            .replace("{" + "rightRef" + "}", localVarApiClient.escapeString(rightRef.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));
        }

        if (type != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
        }

        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);
        if (localVarContentType != null) {
            localVarHeaderParams.put("Content-Type", localVarContentType);
        }

        String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" };
        return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
    }

    @SuppressWarnings("rawtypes")
    private okhttp3.Call diffRefsValidateBeforeCall(String repository, String leftRef, String rightRef, String after, Integer amount, String prefix, String delimiter, String type, 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 diffRefs(Async)");
        }

        // verify the required parameter 'leftRef' is set
        if (leftRef == null) {
            throw new ApiException("Missing the required parameter 'leftRef' when calling diffRefs(Async)");
        }

        // verify the required parameter 'rightRef' is set
        if (rightRef == null) {
            throw new ApiException("Missing the required parameter 'rightRef' when calling diffRefs(Async)");
        }

        return diffRefsCall(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, _callback);

    }


    private ApiResponse diffRefsWithHttpInfo(String repository, String leftRef, String rightRef, String after, Integer amount, String prefix, String delimiter, String type) throws ApiException {
        okhttp3.Call localVarCall = diffRefsValidateBeforeCall(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call diffRefsAsync(String repository, String leftRef, String rightRef, String after, Integer amount, String prefix, String delimiter, String type, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = diffRefsValidateBeforeCall(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIdiffRefsRequest {
        private final String repository;
        private final String leftRef;
        private final String rightRef;
        private String after;
        private Integer amount;
        private String prefix;
        private String delimiter;
        private String type;

        private APIdiffRefsRequest(String repository, String leftRef, String rightRef) {
            this.repository = repository;
            this.leftRef = leftRef;
            this.rightRef = rightRef;
        }

        /**
         * Set after
         * @param after return items after this value (optional)
         * @return APIdiffRefsRequest
         */
        public APIdiffRefsRequest after(String after) {
            this.after = after;
            return this;
        }

        /**
         * Set amount
         * @param amount how many items to return (optional, default to 100)
         * @return APIdiffRefsRequest
         */
        public APIdiffRefsRequest amount(Integer amount) {
            this.amount = amount;
            return this;
        }

        /**
         * Set prefix
         * @param prefix return items prefixed with this value (optional)
         * @return APIdiffRefsRequest
         */
        public APIdiffRefsRequest prefix(String prefix) {
            this.prefix = prefix;
            return this;
        }

        /**
         * Set delimiter
         * @param delimiter delimiter used to group common prefixes by (optional)
         * @return APIdiffRefsRequest
         */
        public APIdiffRefsRequest delimiter(String delimiter) {
            this.delimiter = delimiter;
            return this;
        }

        /**
         * Set type
         * @param type  (optional, default to three_dot)
         * @return APIdiffRefsRequest
         */
        public APIdiffRefsRequest type(String type) {
            this.type = type;
            return this;
        }

        /**
         * Build call for diffRefs
         * @param _callback ApiCallback API callback
         * @return Call to execute
         * @throws ApiException If fail to serialize the request body object
         * @http.response.details
         
Status Code Description Response Headers
200 diff between refs -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return diffRefsCall(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, _callback); } /** * Execute diffRefs request * @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 between refs -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public DiffList execute() throws ApiException { ApiResponse localVarResp = diffRefsWithHttpInfo(repository, leftRef, rightRef, after, amount, prefix, delimiter, type); return localVarResp.getData(); } /** * Execute diffRefs request with HTTP info returned * @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 between refs -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return diffRefsWithHttpInfo(repository, leftRef, rightRef, after, amount, prefix, delimiter, type); } /** * Execute diffRefs request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 diff between refs -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return diffRefsAsync(repository, leftRef, rightRef, after, amount, prefix, delimiter, type, _callback); } } /** * diff references * * @param repository (required) * @param leftRef a reference (could be either a branch or a commit ID) (required) * @param rightRef a reference (could be either a branch or a commit ID) to compare against (required) * @return APIdiffRefsRequest * @http.response.details
Status Code Description Response Headers
200 diff between refs -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIdiffRefsRequest diffRefs(String repository, String leftRef, String rightRef) { return new APIdiffRefsRequest(repository, leftRef, rightRef); } private okhttp3.Call findMergeBaseCall(String repository, String sourceRef, String destinationBranch, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}" .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) .replace("{" + "sourceRef" + "}", localVarApiClient.escapeString(sourceRef.toString())) .replace("{" + "destinationBranch" + "}", localVarApiClient.escapeString(destinationBranch.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); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call findMergeBaseValidateBeforeCall(String repository, String sourceRef, String destinationBranch, 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 findMergeBase(Async)"); } // verify the required parameter 'sourceRef' is set if (sourceRef == null) { throw new ApiException("Missing the required parameter 'sourceRef' when calling findMergeBase(Async)"); } // verify the required parameter 'destinationBranch' is set if (destinationBranch == null) { throw new ApiException("Missing the required parameter 'destinationBranch' when calling findMergeBase(Async)"); } return findMergeBaseCall(repository, sourceRef, destinationBranch, _callback); } private ApiResponse findMergeBaseWithHttpInfo(String repository, String sourceRef, String destinationBranch) throws ApiException { okhttp3.Call localVarCall = findMergeBaseValidateBeforeCall(repository, sourceRef, destinationBranch, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call findMergeBaseAsync(String repository, String sourceRef, String destinationBranch, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = findMergeBaseValidateBeforeCall(repository, sourceRef, destinationBranch, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIfindMergeBaseRequest { private final String repository; private final String sourceRef; private final String destinationBranch; private APIfindMergeBaseRequest(String repository, String sourceRef, String destinationBranch) { this.repository = repository; this.sourceRef = sourceRef; this.destinationBranch = destinationBranch; } /** * Build call for findMergeBase * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Found the merge base -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return findMergeBaseCall(repository, sourceRef, destinationBranch, _callback); } /** * Execute findMergeBase request * @return FindMergeBaseResult * @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 Found the merge base -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public FindMergeBaseResult execute() throws ApiException { ApiResponse localVarResp = findMergeBaseWithHttpInfo(repository, sourceRef, destinationBranch); return localVarResp.getData(); } /** * Execute findMergeBase request with HTTP info returned * @return ApiResponse<FindMergeBaseResult> * @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 Found the merge base -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return findMergeBaseWithHttpInfo(repository, sourceRef, destinationBranch); } /** * Execute findMergeBase request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Found the merge base -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return findMergeBaseAsync(repository, sourceRef, destinationBranch, _callback); } } /** * find the merge base for 2 references * * @param repository (required) * @param sourceRef source ref (required) * @param destinationBranch destination branch name (required) * @return APIfindMergeBaseRequest * @http.response.details
Status Code Description Response Headers
200 Found the merge base -
400 Validation Error -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIfindMergeBaseRequest findMergeBase(String repository, String sourceRef, String destinationBranch) { return new APIfindMergeBaseRequest(repository, sourceRef, destinationBranch); } private okhttp3.Call logCommitsCall(String repository, String ref, String after, Integer amount, List objects, List prefixes, Boolean limit, Boolean firstParent, OffsetDateTime since, String stopAt, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/refs/{ref}/commits" .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) .replace("{" + "ref" + "}", localVarApiClient.escapeString(ref.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 (objects != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "objects", objects)); } if (prefixes != null) { localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "prefixes", prefixes)); } if (limit != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit)); } if (firstParent != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("first_parent", firstParent)); } if (since != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("since", since)); } if (stopAt != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("stop_at", stopAt)); } 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); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call logCommitsValidateBeforeCall(String repository, String ref, String after, Integer amount, List objects, List prefixes, Boolean limit, Boolean firstParent, OffsetDateTime since, String stopAt, 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 logCommits(Async)"); } // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling logCommits(Async)"); } return logCommitsCall(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt, _callback); } private ApiResponse logCommitsWithHttpInfo(String repository, String ref, String after, Integer amount, List objects, List prefixes, Boolean limit, Boolean firstParent, OffsetDateTime since, String stopAt) throws ApiException { okhttp3.Call localVarCall = logCommitsValidateBeforeCall(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call logCommitsAsync(String repository, String ref, String after, Integer amount, List objects, List prefixes, Boolean limit, Boolean firstParent, OffsetDateTime since, String stopAt, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = logCommitsValidateBeforeCall(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlogCommitsRequest { private final String repository; private final String ref; private String after; private Integer amount; private List objects; private List prefixes; private Boolean limit; private Boolean firstParent; private OffsetDateTime since; private String stopAt; private APIlogCommitsRequest(String repository, String ref) { this.repository = repository; this.ref = ref; } /** * Set after * @param after return items after this value (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest after(String after) { this.after = after; return this; } /** * Set amount * @param amount how many items to return (optional, default to 100) * @return APIlogCommitsRequest */ public APIlogCommitsRequest amount(Integer amount) { this.amount = amount; return this; } /** * Set objects * @param objects list of paths, each element is a path of a specific object (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest objects(List objects) { this.objects = objects; return this; } /** * Set prefixes * @param prefixes list of paths, each element is a path of a prefix (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest prefixes(List prefixes) { this.prefixes = prefixes; return this; } /** * Set limit * @param limit limit the number of items in return to 'amount'. Without further indication on actual number of items. (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest limit(Boolean limit) { this.limit = limit; return this; } /** * Set firstParent * @param firstParent if set to true, follow only the first parent upon reaching a merge commit (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest firstParent(Boolean firstParent) { this.firstParent = firstParent; return this; } /** * Set since * @param since Show commits more recent than a specific date-time. In case used with stop_at parameter, will stop at the first commit that meets any of the conditions. (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest since(OffsetDateTime since) { this.since = since; return this; } /** * Set stopAt * @param stopAt A reference to stop at. In case used with since parameter, will stop at the first commit that meets any of the conditions. (optional) * @return APIlogCommitsRequest */ public APIlogCommitsRequest stopAt(String stopAt) { this.stopAt = stopAt; return this; } /** * Build call for logCommits * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 commit log -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return logCommitsCall(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt, _callback); } /** * Execute logCommits request * @return CommitList * @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 commit log -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public CommitList execute() throws ApiException { ApiResponse localVarResp = logCommitsWithHttpInfo(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt); return localVarResp.getData(); } /** * Execute logCommits request with HTTP info returned * @return ApiResponse<CommitList> * @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 commit log -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return logCommitsWithHttpInfo(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt); } /** * Execute logCommits request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 commit log -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return logCommitsAsync(repository, ref, after, amount, objects, prefixes, limit, firstParent, since, stopAt, _callback); } } /** * get commit log from ref. If both objects and prefixes are empty, return all commits. * * @param repository (required) * @param ref (required) * @return APIlogCommitsRequest * @http.response.details
Status Code Description Response Headers
200 commit log -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIlogCommitsRequest logCommits(String repository, String ref) { return new APIlogCommitsRequest(repository, ref); } private okhttp3.Call mergeIntoBranchCall(String repository, String sourceRef, String destinationBranch, Merge merge, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = merge; // create path and map variables String localVarPath = "/repositories/{repository}/refs/{sourceRef}/merge/{destinationBranch}" .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) .replace("{" + "sourceRef" + "}", localVarApiClient.escapeString(sourceRef.toString())) .replace("{" + "destinationBranch" + "}", localVarApiClient.escapeString(destinationBranch.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); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "oidc_auth", "saml_auth", "jwt_token" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call mergeIntoBranchValidateBeforeCall(String repository, String sourceRef, String destinationBranch, Merge merge, 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 mergeIntoBranch(Async)"); } // verify the required parameter 'sourceRef' is set if (sourceRef == null) { throw new ApiException("Missing the required parameter 'sourceRef' when calling mergeIntoBranch(Async)"); } // verify the required parameter 'destinationBranch' is set if (destinationBranch == null) { throw new ApiException("Missing the required parameter 'destinationBranch' when calling mergeIntoBranch(Async)"); } return mergeIntoBranchCall(repository, sourceRef, destinationBranch, merge, _callback); } private ApiResponse mergeIntoBranchWithHttpInfo(String repository, String sourceRef, String destinationBranch, Merge merge) throws ApiException { okhttp3.Call localVarCall = mergeIntoBranchValidateBeforeCall(repository, sourceRef, destinationBranch, merge, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call mergeIntoBranchAsync(String repository, String sourceRef, String destinationBranch, Merge merge, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = mergeIntoBranchValidateBeforeCall(repository, sourceRef, destinationBranch, merge, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APImergeIntoBranchRequest { private final String repository; private final String sourceRef; private final String destinationBranch; private Merge merge; private APImergeIntoBranchRequest(String repository, String sourceRef, String destinationBranch) { this.repository = repository; this.sourceRef = sourceRef; this.destinationBranch = destinationBranch; } /** * Set merge * @param merge (optional) * @return APImergeIntoBranchRequest */ public APImergeIntoBranchRequest merge(Merge merge) { this.merge = merge; return this; } /** * Build call for mergeIntoBranch * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 merge completed -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Deprecated: content schema will return Error format and not an empty MergeResult -
412 precondition failed (e.g. a pre-merge hook returned a failure) -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return mergeIntoBranchCall(repository, sourceRef, destinationBranch, merge, _callback); } /** * Execute mergeIntoBranch request * @return MergeResult * @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 merge completed -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Deprecated: content schema will return Error format and not an empty MergeResult -
412 precondition failed (e.g. a pre-merge hook returned a failure) -
420 too many requests -
0 Internal Server Error -
*/ public MergeResult execute() throws ApiException { ApiResponse localVarResp = mergeIntoBranchWithHttpInfo(repository, sourceRef, destinationBranch, merge); return localVarResp.getData(); } /** * Execute mergeIntoBranch request with HTTP info returned * @return ApiResponse<MergeResult> * @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 merge completed -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Deprecated: content schema will return Error format and not an empty MergeResult -
412 precondition failed (e.g. a pre-merge hook returned a failure) -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return mergeIntoBranchWithHttpInfo(repository, sourceRef, destinationBranch, merge); } /** * Execute mergeIntoBranch request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 merge completed -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Deprecated: content schema will return Error format and not an empty MergeResult -
412 precondition failed (e.g. a pre-merge hook returned a failure) -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return mergeIntoBranchAsync(repository, sourceRef, destinationBranch, merge, _callback); } } /** * merge references * * @param repository (required) * @param sourceRef source ref (required) * @param destinationBranch destination branch name (required) * @return APImergeIntoBranchRequest * @http.response.details
Status Code Description Response Headers
200 merge completed -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Conflict Deprecated: content schema will return Error format and not an empty MergeResult -
412 precondition failed (e.g. a pre-merge hook returned a failure) -
420 too many requests -
0 Internal Server Error -
*/ public APImergeIntoBranchRequest mergeIntoBranch(String repository, String sourceRef, String destinationBranch) { return new APImergeIntoBranchRequest(repository, sourceRef, destinationBranch); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy