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

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

There is a newer version: 1.45.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.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.Error;
import java.io.File;
import io.lakefs.clients.sdk.model.ObjectCopyCreation;
import io.lakefs.clients.sdk.model.ObjectErrorList;
import io.lakefs.clients.sdk.model.ObjectStats;
import io.lakefs.clients.sdk.model.ObjectStatsList;
import io.lakefs.clients.sdk.model.PathList;
import io.lakefs.clients.sdk.model.UnderlyingObjectProperties;

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

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

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

    public ObjectsApi(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 copyObjectCall(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation, 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 = objectCopyCreation;

        // create path and map variables
        String localVarPath = "/repositories/{repository}/branches/{branch}/objects/copy"
            .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString()))
            .replace("{" + "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 (destPath != null) {
            localVarQueryParams.addAll(localVarApiClient.parameterToPair("dest_path", destPath));
        }

        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 copyObjectValidateBeforeCall(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation, 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 copyObject(Async)");
        }

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

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

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

        return copyObjectCall(repository, branch, destPath, objectCopyCreation, _callback);

    }


    private ApiResponse copyObjectWithHttpInfo(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation) throws ApiException {
        okhttp3.Call localVarCall = copyObjectValidateBeforeCall(repository, branch, destPath, objectCopyCreation, null);
        Type localVarReturnType = new TypeToken(){}.getType();
        return localVarApiClient.execute(localVarCall, localVarReturnType);
    }

    private okhttp3.Call copyObjectAsync(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation, final ApiCallback _callback) throws ApiException {

        okhttp3.Call localVarCall = copyObjectValidateBeforeCall(repository, branch, destPath, objectCopyCreation, _callback);
        Type localVarReturnType = new TypeToken(){}.getType();
        localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
        return localVarCall;
    }

    public class APIcopyObjectRequest {
        private final String repository;
        private final String branch;
        private final String destPath;
        private final ObjectCopyCreation objectCopyCreation;

        private APIcopyObjectRequest(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation) {
            this.repository = repository;
            this.branch = branch;
            this.destPath = destPath;
            this.objectCopyCreation = objectCopyCreation;
        }

        /**
         * Build call for copyObject
         * @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
201 Copy object response -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return copyObjectCall(repository, branch, destPath, objectCopyCreation, _callback); } /** * Execute copyObject request * @return ObjectStats * @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 Copy object response -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ObjectStats execute() throws ApiException { ApiResponse localVarResp = copyObjectWithHttpInfo(repository, branch, destPath, objectCopyCreation); return localVarResp.getData(); } /** * Execute copyObject request with HTTP info returned * @return ApiResponse<ObjectStats> * @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 Copy object response -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return copyObjectWithHttpInfo(repository, branch, destPath, objectCopyCreation); } /** * Execute copyObject 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
201 Copy object response -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return copyObjectAsync(repository, branch, destPath, objectCopyCreation, _callback); } } /** * create a copy of an object * * @param repository (required) * @param branch destination branch for the copy (required) * @param destPath destination path relative to the branch (required) * @param objectCopyCreation (required) * @return APIcopyObjectRequest * @http.response.details
Status Code Description Response Headers
201 Copy object response -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIcopyObjectRequest copyObject(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation) { return new APIcopyObjectRequest(repository, branch, destPath, objectCopyCreation); } private okhttp3.Call deleteObjectCall(String repository, String branch, String path, Boolean force, 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}/branches/{branch}/objects" .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) .replace("{" + "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 (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } 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); 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, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteObjectValidateBeforeCall(String repository, String branch, String path, 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 deleteObject(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling deleteObject(Async)"); } // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling deleteObject(Async)"); } return deleteObjectCall(repository, branch, path, force, _callback); } private ApiResponse deleteObjectWithHttpInfo(String repository, String branch, String path, Boolean force) throws ApiException { okhttp3.Call localVarCall = deleteObjectValidateBeforeCall(repository, branch, path, force, null); return localVarApiClient.execute(localVarCall); } private okhttp3.Call deleteObjectAsync(String repository, String branch, String path, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteObjectValidateBeforeCall(repository, branch, path, force, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public class APIdeleteObjectRequest { private final String repository; private final String branch; private final String path; private Boolean force; private APIdeleteObjectRequest(String repository, String branch, String path) { this.repository = repository; this.branch = branch; this.path = path; } /** * Set force * @param force (optional, default to false) * @return APIdeleteObjectRequest */ public APIdeleteObjectRequest force(Boolean force) { this.force = force; return this; } /** * Build call for deleteObject * @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
204 object deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteObjectCall(repository, branch, path, force, _callback); } /** * Execute deleteObject request * @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 object deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public void execute() throws ApiException { deleteObjectWithHttpInfo(repository, branch, path, force); } /** * Execute deleteObject request with HTTP info returned * @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 object deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteObjectWithHttpInfo(repository, branch, path, force); } /** * Execute deleteObject 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
204 object deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteObjectAsync(repository, branch, path, force, _callback); } } /** * delete object. Missing objects will not return a NotFound error. * * @param repository (required) * @param branch (required) * @param path relative to the branch (required) * @return APIdeleteObjectRequest * @http.response.details
Status Code Description Response Headers
204 object deleted successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIdeleteObjectRequest deleteObject(String repository, String branch, String path) { return new APIdeleteObjectRequest(repository, branch, path); } private okhttp3.Call deleteObjectsCall(String repository, String branch, PathList pathList, Boolean force, 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 = pathList; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/objects/delete" .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) .replace("{" + "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 = { "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 deleteObjectsValidateBeforeCall(String repository, String branch, PathList pathList, 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 deleteObjects(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling deleteObjects(Async)"); } // verify the required parameter 'pathList' is set if (pathList == null) { throw new ApiException("Missing the required parameter 'pathList' when calling deleteObjects(Async)"); } return deleteObjectsCall(repository, branch, pathList, force, _callback); } private ApiResponse deleteObjectsWithHttpInfo(String repository, String branch, PathList pathList, Boolean force) throws ApiException { okhttp3.Call localVarCall = deleteObjectsValidateBeforeCall(repository, branch, pathList, force, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call deleteObjectsAsync(String repository, String branch, PathList pathList, Boolean force, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteObjectsValidateBeforeCall(repository, branch, pathList, force, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIdeleteObjectsRequest { private final String repository; private final String branch; private final PathList pathList; private Boolean force; private APIdeleteObjectsRequest(String repository, String branch, PathList pathList) { this.repository = repository; this.branch = branch; this.pathList = pathList; } /** * Set force * @param force (optional, default to false) * @return APIdeleteObjectsRequest */ public APIdeleteObjectsRequest force(Boolean force) { this.force = force; return this; } /** * Build call for deleteObjects * @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 Delete objects response -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return deleteObjectsCall(repository, branch, pathList, force, _callback); } /** * Execute deleteObjects request * @return ObjectErrorList * @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 Delete objects response -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ObjectErrorList execute() throws ApiException { ApiResponse localVarResp = deleteObjectsWithHttpInfo(repository, branch, pathList, force); return localVarResp.getData(); } /** * Execute deleteObjects request with HTTP info returned * @return ApiResponse<ObjectErrorList> * @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 Delete objects response -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return deleteObjectsWithHttpInfo(repository, branch, pathList, force); } /** * Execute deleteObjects 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 Delete objects response -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return deleteObjectsAsync(repository, branch, pathList, force, _callback); } } /** * delete objects. Missing objects will not return a NotFound error. * * @param repository (required) * @param branch (required) * @param pathList (required) * @return APIdeleteObjectsRequest * @http.response.details
Status Code Description Response Headers
200 Delete objects response -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIdeleteObjectsRequest deleteObjects(String repository, String branch, PathList pathList) { return new APIdeleteObjectsRequest(repository, branch, pathList); } private okhttp3.Call getObjectCall(String repository, String ref, String path, String range, String ifNoneMatch, Boolean presign, 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}/objects" .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 (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } if (presign != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("presign", presign)); } if (range != null) { localVarHeaderParams.put("Range", localVarApiClient.parameterToString(range)); } if (ifNoneMatch != null) { localVarHeaderParams.put("If-None-Match", localVarApiClient.parameterToString(ifNoneMatch)); } final String[] localVarAccepts = { "application/octet-stream", "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 getObjectValidateBeforeCall(String repository, String ref, String path, String range, String ifNoneMatch, Boolean presign, 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 getObject(Async)"); } // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling getObject(Async)"); } // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling getObject(Async)"); } return getObjectCall(repository, ref, path, range, ifNoneMatch, presign, _callback); } private ApiResponse getObjectWithHttpInfo(String repository, String ref, String path, String range, String ifNoneMatch, Boolean presign) throws ApiException { okhttp3.Call localVarCall = getObjectValidateBeforeCall(repository, ref, path, range, ifNoneMatch, presign, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getObjectAsync(String repository, String ref, String path, String range, String ifNoneMatch, Boolean presign, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getObjectValidateBeforeCall(repository, ref, path, range, ifNoneMatch, presign, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetObjectRequest { private final String repository; private final String ref; private final String path; private String range; private String ifNoneMatch; private Boolean presign; private APIgetObjectRequest(String repository, String ref, String path) { this.repository = repository; this.ref = ref; this.path = path; } /** * Set range * @param range Byte range to retrieve (optional) * @return APIgetObjectRequest */ public APIgetObjectRequest range(String range) { this.range = range; return this; } /** * Set ifNoneMatch * @param ifNoneMatch Returns response only if the object does not have a matching ETag (optional) * @return APIgetObjectRequest */ public APIgetObjectRequest ifNoneMatch(String ifNoneMatch) { this.ifNoneMatch = ifNoneMatch; return this; } /** * Set presign * @param presign (optional) * @return APIgetObjectRequest */ public APIgetObjectRequest presign(Boolean presign) { this.presign = presign; return this; } /** * Build call for getObject * @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 object content * Content-Length -
* Last-Modified -
* ETag -
206 partial object content * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
302 Redirect to a pre-signed URL for the object * Location - redirect to S3
304 Content not modified -
401 Unauthorized -
404 Resource Not Found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getObjectCall(repository, ref, path, range, ifNoneMatch, presign, _callback); } /** * Execute getObject request * @return File * @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 object content * Content-Length -
* Last-Modified -
* ETag -
206 partial object content * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
302 Redirect to a pre-signed URL for the object * Location - redirect to S3
304 Content not modified -
401 Unauthorized -
404 Resource Not Found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 Internal Server Error -
*/ public File execute() throws ApiException { ApiResponse localVarResp = getObjectWithHttpInfo(repository, ref, path, range, ifNoneMatch, presign); return localVarResp.getData(); } /** * Execute getObject request with HTTP info returned * @return ApiResponse<File> * @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 object content * Content-Length -
* Last-Modified -
* ETag -
206 partial object content * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
302 Redirect to a pre-signed URL for the object * Location - redirect to S3
304 Content not modified -
401 Unauthorized -
404 Resource Not Found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getObjectWithHttpInfo(repository, ref, path, range, ifNoneMatch, presign); } /** * Execute getObject 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 object content * Content-Length -
* Last-Modified -
* ETag -
206 partial object content * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
302 Redirect to a pre-signed URL for the object * Location - redirect to S3
304 Content not modified -
401 Unauthorized -
404 Resource Not Found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getObjectAsync(repository, ref, path, range, ifNoneMatch, presign, _callback); } } /** * get object content * * @param repository (required) * @param ref a reference (could be either a branch or a commit ID) (required) * @param path relative to the ref (required) * @return APIgetObjectRequest * @http.response.details
Status Code Description Response Headers
200 object content * Content-Length -
* Last-Modified -
* ETag -
206 partial object content * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
302 Redirect to a pre-signed URL for the object * Location - redirect to S3
304 Content not modified -
401 Unauthorized -
404 Resource Not Found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 Internal Server Error -
*/ public APIgetObjectRequest getObject(String repository, String ref, String path) { return new APIgetObjectRequest(repository, ref, path); } private okhttp3.Call getUnderlyingPropertiesCall(String repository, String ref, String path, 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}/objects/underlyingProperties" .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 (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } 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 getUnderlyingPropertiesValidateBeforeCall(String repository, String ref, String path, 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 getUnderlyingProperties(Async)"); } // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling getUnderlyingProperties(Async)"); } // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling getUnderlyingProperties(Async)"); } return getUnderlyingPropertiesCall(repository, ref, path, _callback); } private ApiResponse getUnderlyingPropertiesWithHttpInfo(String repository, String ref, String path) throws ApiException { okhttp3.Call localVarCall = getUnderlyingPropertiesValidateBeforeCall(repository, ref, path, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getUnderlyingPropertiesAsync(String repository, String ref, String path, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getUnderlyingPropertiesValidateBeforeCall(repository, ref, path, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIgetUnderlyingPropertiesRequest { private final String repository; private final String ref; private final String path; private APIgetUnderlyingPropertiesRequest(String repository, String ref, String path) { this.repository = repository; this.ref = ref; this.path = path; } /** * Build call for getUnderlyingProperties * @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 object metadata on underlying storage -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getUnderlyingPropertiesCall(repository, ref, path, _callback); } /** * Execute getUnderlyingProperties request * @return UnderlyingObjectProperties * @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 object metadata on underlying storage -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public UnderlyingObjectProperties execute() throws ApiException { ApiResponse localVarResp = getUnderlyingPropertiesWithHttpInfo(repository, ref, path); return localVarResp.getData(); } /** * Execute getUnderlyingProperties request with HTTP info returned * @return ApiResponse<UnderlyingObjectProperties> * @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 object metadata on underlying storage -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getUnderlyingPropertiesWithHttpInfo(repository, ref, path); } /** * Execute getUnderlyingProperties 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 object metadata on underlying storage -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getUnderlyingPropertiesAsync(repository, ref, path, _callback); } } /** * get object properties on underlying storage * * @param repository (required) * @param ref a reference (could be either a branch or a commit ID) (required) * @param path relative to the branch (required) * @return APIgetUnderlyingPropertiesRequest * @http.response.details
Status Code Description Response Headers
200 object metadata on underlying storage -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIgetUnderlyingPropertiesRequest getUnderlyingProperties(String repository, String ref, String path) { return new APIgetUnderlyingPropertiesRequest(repository, ref, path); } private okhttp3.Call headObjectCall(String repository, String ref, String path, String range, 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}/objects" .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 (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } if (range != null) { localVarHeaderParams.put("Range", localVarApiClient.parameterToString(range)); } final String[] localVarAccepts = { }; 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, "HEAD", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call headObjectValidateBeforeCall(String repository, String ref, String path, String range, 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 headObject(Async)"); } // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling headObject(Async)"); } // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling headObject(Async)"); } return headObjectCall(repository, ref, path, range, _callback); } private ApiResponse headObjectWithHttpInfo(String repository, String ref, String path, String range) throws ApiException { okhttp3.Call localVarCall = headObjectValidateBeforeCall(repository, ref, path, range, null); return localVarApiClient.execute(localVarCall); } private okhttp3.Call headObjectAsync(String repository, String ref, String path, String range, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = headObjectValidateBeforeCall(repository, ref, path, range, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } public class APIheadObjectRequest { private final String repository; private final String ref; private final String path; private String range; private APIheadObjectRequest(String repository, String ref, String path) { this.repository = repository; this.ref = ref; this.path = path; } /** * Set range * @param range Byte range to retrieve (optional) * @return APIheadObjectRequest */ public APIheadObjectRequest range(String range) { this.range = range; return this; } /** * Build call for headObject * @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 object exists * Content-Length -
* Last-Modified -
* ETag -
206 partial object content info * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
401 Unauthorized -
404 object not found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 internal server error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return headObjectCall(repository, ref, path, range, _callback); } /** * Execute headObject request * @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 object exists * Content-Length -
* Last-Modified -
* ETag -
206 partial object content info * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
401 Unauthorized -
404 object not found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 internal server error -
*/ public void execute() throws ApiException { headObjectWithHttpInfo(repository, ref, path, range); } /** * Execute headObject request with HTTP info returned * @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
200 object exists * Content-Length -
* Last-Modified -
* ETag -
206 partial object content info * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
401 Unauthorized -
404 object not found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 internal server error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return headObjectWithHttpInfo(repository, ref, path, range); } /** * Execute headObject 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 object exists * Content-Length -
* Last-Modified -
* ETag -
206 partial object content info * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
401 Unauthorized -
404 object not found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 internal server error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return headObjectAsync(repository, ref, path, range, _callback); } } /** * check if object exists * * @param repository (required) * @param ref a reference (could be either a branch or a commit ID) (required) * @param path relative to the ref (required) * @return APIheadObjectRequest * @http.response.details
Status Code Description Response Headers
200 object exists * Content-Length -
* Last-Modified -
* ETag -
206 partial object content info * Content-Length -
* Content-Range -
* Last-Modified -
* ETag -
401 Unauthorized -
404 object not found -
410 object expired -
416 Requested Range Not Satisfiable -
420 too many requests -
0 internal server error -
*/ public APIheadObjectRequest headObject(String repository, String ref, String path) { return new APIheadObjectRequest(repository, ref, path); } private okhttp3.Call listObjectsCall(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix, 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}/objects/ls" .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 (userMetadata != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_metadata", userMetadata)); } if (presign != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("presign", presign)); } if (after != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("after", after)); } if (amount != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("amount", amount)); } if (delimiter != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("delimiter", delimiter)); } if (prefix != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("prefix", prefix)); } 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 listObjectsValidateBeforeCall(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix, 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 listObjects(Async)"); } // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling listObjects(Async)"); } return listObjectsCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback); } private ApiResponse listObjectsWithHttpInfo(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix) throws ApiException { okhttp3.Call localVarCall = listObjectsValidateBeforeCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call listObjectsAsync(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = listObjectsValidateBeforeCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIlistObjectsRequest { private final String repository; private final String ref; private Boolean userMetadata; private Boolean presign; private String after; private Integer amount; private String delimiter; private String prefix; private APIlistObjectsRequest(String repository, String ref) { this.repository = repository; this.ref = ref; } /** * Set userMetadata * @param userMetadata (optional, default to true) * @return APIlistObjectsRequest */ public APIlistObjectsRequest userMetadata(Boolean userMetadata) { this.userMetadata = userMetadata; return this; } /** * Set presign * @param presign (optional) * @return APIlistObjectsRequest */ public APIlistObjectsRequest presign(Boolean presign) { this.presign = presign; return this; } /** * Set after * @param after return items after this value (optional) * @return APIlistObjectsRequest */ public APIlistObjectsRequest after(String after) { this.after = after; return this; } /** * Set amount * @param amount how many items to return (optional, default to 100) * @return APIlistObjectsRequest */ public APIlistObjectsRequest amount(Integer amount) { this.amount = amount; return this; } /** * Set delimiter * @param delimiter delimiter used to group common prefixes by (optional) * @return APIlistObjectsRequest */ public APIlistObjectsRequest delimiter(String delimiter) { this.delimiter = delimiter; return this; } /** * Set prefix * @param prefix return items prefixed with this value (optional) * @return APIlistObjectsRequest */ public APIlistObjectsRequest prefix(String prefix) { this.prefix = prefix; return this; } /** * Build call for listObjects * @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 object listing -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return listObjectsCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback); } /** * Execute listObjects request * @return ObjectStatsList * @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 object listing -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ObjectStatsList execute() throws ApiException { ApiResponse localVarResp = listObjectsWithHttpInfo(repository, ref, userMetadata, presign, after, amount, delimiter, prefix); return localVarResp.getData(); } /** * Execute listObjects request with HTTP info returned * @return ApiResponse<ObjectStatsList> * @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 object listing -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return listObjectsWithHttpInfo(repository, ref, userMetadata, presign, after, amount, delimiter, prefix); } /** * Execute listObjects 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 object listing -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return listObjectsAsync(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback); } } /** * list objects under a given prefix * * @param repository (required) * @param ref a reference (could be either a branch or a commit ID) (required) * @return APIlistObjectsRequest * @http.response.details
Status Code Description Response Headers
200 object listing -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public APIlistObjectsRequest listObjects(String repository, String ref) { return new APIlistObjectsRequest(repository, ref); } private okhttp3.Call statObjectCall(String repository, String ref, String path, Boolean userMetadata, Boolean presign, 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}/objects/stat" .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 (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } if (userMetadata != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("user_metadata", userMetadata)); } if (presign != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("presign", presign)); } 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 statObjectValidateBeforeCall(String repository, String ref, String path, Boolean userMetadata, Boolean presign, 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 statObject(Async)"); } // verify the required parameter 'ref' is set if (ref == null) { throw new ApiException("Missing the required parameter 'ref' when calling statObject(Async)"); } // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling statObject(Async)"); } return statObjectCall(repository, ref, path, userMetadata, presign, _callback); } private ApiResponse statObjectWithHttpInfo(String repository, String ref, String path, Boolean userMetadata, Boolean presign) throws ApiException { okhttp3.Call localVarCall = statObjectValidateBeforeCall(repository, ref, path, userMetadata, presign, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call statObjectAsync(String repository, String ref, String path, Boolean userMetadata, Boolean presign, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = statObjectValidateBeforeCall(repository, ref, path, userMetadata, presign, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIstatObjectRequest { private final String repository; private final String ref; private final String path; private Boolean userMetadata; private Boolean presign; private APIstatObjectRequest(String repository, String ref, String path) { this.repository = repository; this.ref = ref; this.path = path; } /** * Set userMetadata * @param userMetadata (optional, default to true) * @return APIstatObjectRequest */ public APIstatObjectRequest userMetadata(Boolean userMetadata) { this.userMetadata = userMetadata; return this; } /** * Set presign * @param presign (optional) * @return APIstatObjectRequest */ public APIstatObjectRequest presign(Boolean presign) { this.presign = presign; return this; } /** * Build call for statObject * @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 object metadata -
401 Unauthorized -
404 Resource Not Found -
400 Bad Request -
410 object gone (but partial metadata may be available) -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return statObjectCall(repository, ref, path, userMetadata, presign, _callback); } /** * Execute statObject request * @return ObjectStats * @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 object metadata -
401 Unauthorized -
404 Resource Not Found -
400 Bad Request -
410 object gone (but partial metadata may be available) -
420 too many requests -
0 Internal Server Error -
*/ public ObjectStats execute() throws ApiException { ApiResponse localVarResp = statObjectWithHttpInfo(repository, ref, path, userMetadata, presign); return localVarResp.getData(); } /** * Execute statObject request with HTTP info returned * @return ApiResponse<ObjectStats> * @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 object metadata -
401 Unauthorized -
404 Resource Not Found -
400 Bad Request -
410 object gone (but partial metadata may be available) -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return statObjectWithHttpInfo(repository, ref, path, userMetadata, presign); } /** * Execute statObject 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 object metadata -
401 Unauthorized -
404 Resource Not Found -
400 Bad Request -
410 object gone (but partial metadata may be available) -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return statObjectAsync(repository, ref, path, userMetadata, presign, _callback); } } /** * get object metadata * * @param repository (required) * @param ref a reference (could be either a branch or a commit ID) (required) * @param path relative to the branch (required) * @return APIstatObjectRequest * @http.response.details
Status Code Description Response Headers
200 object metadata -
401 Unauthorized -
404 Resource Not Found -
400 Bad Request -
410 object gone (but partial metadata may be available) -
420 too many requests -
0 Internal Server Error -
*/ public APIstatObjectRequest statObject(String repository, String ref, String path) { return new APIstatObjectRequest(repository, ref, path); } private okhttp3.Call uploadObjectCall(String repository, String branch, String path, String ifNoneMatch, String storageClass, Boolean force, File content, 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}/branches/{branch}/objects" .replace("{" + "repository" + "}", localVarApiClient.escapeString(repository.toString())) .replace("{" + "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 (content != null) { localVarFormParams.put("content", content); } if (path != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("path", path)); } if (storageClass != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("storageClass", storageClass)); } if (force != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force)); } if (ifNoneMatch != null) { localVarHeaderParams.put("If-None-Match", localVarApiClient.parameterToString(ifNoneMatch)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "multipart/form-data", "application/octet-stream" }; 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 uploadObjectValidateBeforeCall(String repository, String branch, String path, String ifNoneMatch, String storageClass, Boolean force, File content, 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 uploadObject(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling uploadObject(Async)"); } // verify the required parameter 'path' is set if (path == null) { throw new ApiException("Missing the required parameter 'path' when calling uploadObject(Async)"); } return uploadObjectCall(repository, branch, path, ifNoneMatch, storageClass, force, content, _callback); } private ApiResponse uploadObjectWithHttpInfo(String repository, String branch, String path, String ifNoneMatch, String storageClass, Boolean force, File content) throws ApiException { okhttp3.Call localVarCall = uploadObjectValidateBeforeCall(repository, branch, path, ifNoneMatch, storageClass, force, content, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call uploadObjectAsync(String repository, String branch, String path, String ifNoneMatch, String storageClass, Boolean force, File content, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadObjectValidateBeforeCall(repository, branch, path, ifNoneMatch, storageClass, force, content, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public class APIuploadObjectRequest { private final String repository; private final String branch; private final String path; private String ifNoneMatch; private String storageClass; private Boolean force; private File content; private APIuploadObjectRequest(String repository, String branch, String path) { this.repository = repository; this.branch = branch; this.path = path; } /** * Set ifNoneMatch * @param ifNoneMatch Set to \"*\" to atomically allow the upload only if the key has no object yet. Other values are not supported. (optional) * @return APIuploadObjectRequest */ public APIuploadObjectRequest ifNoneMatch(String ifNoneMatch) { this.ifNoneMatch = ifNoneMatch; return this; } /** * Set storageClass * @param storageClass Deprecated, this capability will not be supported in future releases. (optional) * @return APIuploadObjectRequest */ public APIuploadObjectRequest storageClass(String storageClass) { this.storageClass = storageClass; return this; } /** * Set force * @param force (optional, default to false) * @return APIuploadObjectRequest */ public APIuploadObjectRequest force(Boolean force) { this.force = force; return this; } /** * Set content * @param content Only a single file per upload which must be named \\\"content\\\". (optional) * @return APIuploadObjectRequest */ public APIuploadObjectRequest content(File content) { this.content = content; return this; } /** * Build call for uploadObject * @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
201 object metadata -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return uploadObjectCall(repository, branch, path, ifNoneMatch, storageClass, force, content, _callback); } /** * Execute uploadObject request * @return ObjectStats * @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 object metadata -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public ObjectStats execute() throws ApiException { ApiResponse localVarResp = uploadObjectWithHttpInfo(repository, branch, path, ifNoneMatch, storageClass, force, content); return localVarResp.getData(); } /** * Execute uploadObject request with HTTP info returned * @return ApiResponse<ObjectStats> * @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 object metadata -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return uploadObjectWithHttpInfo(repository, branch, path, ifNoneMatch, storageClass, force, content); } /** * Execute uploadObject 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
201 object metadata -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return uploadObjectAsync(repository, branch, path, ifNoneMatch, storageClass, force, content, _callback); } } /** * * * @param repository (required) * @param branch (required) * @param path relative to the branch (required) * @return APIuploadObjectRequest * @http.response.details
Status Code Description Response Headers
201 object metadata -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
412 Precondition Failed -
420 too many requests -
0 Internal Server Error -
*/ public APIuploadObjectRequest uploadObject(String repository, String branch, String path) { return new APIuploadObjectRequest(repository, branch, path); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy