Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* lakeFS API
* lakeFS HTTP API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.lakefs.clients.api;
import io.lakefs.clients.api.ApiCallback;
import io.lakefs.clients.api.ApiClient;
import io.lakefs.clients.api.ApiException;
import io.lakefs.clients.api.ApiResponse;
import io.lakefs.clients.api.Configuration;
import io.lakefs.clients.api.Pair;
import io.lakefs.clients.api.ProgressRequestBody;
import io.lakefs.clients.api.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import io.lakefs.clients.api.model.Error;
import java.io.File;
import io.lakefs.clients.api.model.ObjectCopyCreation;
import io.lakefs.clients.api.model.ObjectErrorList;
import io.lakefs.clients.api.model.ObjectStats;
import io.lakefs.clients.api.model.ObjectStatsList;
import io.lakefs.clients.api.model.PathList;
import io.lakefs.clients.api.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;
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;
}
/**
* Build call for copyObject
* @param repository (required)
* @param branch destination branch for the copy (required)
* @param destPath destination path relative to the branch (required)
* @param objectCopyCreation (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
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 copyObjectCall(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = objectCopyCreation;
// create path and map variables
String localVarPath = "/repositories/{repository}/branches/{branch}/objects/copy"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = copyObjectCall(repository, branch, destPath, objectCopyCreation, _callback);
return localVarCall;
}
/**
* 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 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 copyObject(String repository, String branch, String destPath, ObjectCopyCreation objectCopyCreation) throws ApiException {
ApiResponse localVarResp = copyObjectWithHttpInfo(repository, branch, destPath, objectCopyCreation);
return localVarResp.getData();
}
/**
* 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 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 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);
}
/**
* create a copy of an object (asynchronously)
*
* @param repository (required)
* @param branch destination branch for the copy (required)
* @param destPath destination path relative to the branch (required)
* @param objectCopyCreation (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
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 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;
}
/**
* Build call for deleteObject
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param force (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
object deleted successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call deleteObjectCall(String repository, String branch, String path, Boolean force, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/branches/{branch}/objects"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = deleteObjectCall(repository, branch, path, force, _callback);
return localVarCall;
}
/**
* delete object. Missing objects will not return a NotFound error.
*
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param force (optional, default to false)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
object deleted successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public void deleteObject(String repository, String branch, String path, Boolean force) throws ApiException {
deleteObjectWithHttpInfo(repository, branch, path, force);
}
/**
* delete object. Missing objects will not return a NotFound error.
*
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param force (optional, default to false)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
object deleted successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public 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);
}
/**
* delete object. Missing objects will not return a NotFound error. (asynchronously)
*
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param force (optional, default to false)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
204
object deleted successfully
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public 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;
}
/**
* Build call for deleteObjects
* @param repository (required)
* @param branch (required)
* @param pathList (required)
* @param force (optional, default to false)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Delete objects response
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call deleteObjectsCall(String repository, String branch, PathList pathList, Boolean force, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = pathList;
// create path and map variables
String localVarPath = "/repositories/{repository}/branches/{branch}/objects/delete"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (force != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("force", force));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = deleteObjectsCall(repository, branch, pathList, force, _callback);
return localVarCall;
}
/**
* delete objects. Missing objects will not return a NotFound error.
*
* @param repository (required)
* @param branch (required)
* @param pathList (required)
* @param force (optional, default to false)
* @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 deleteObjects(String repository, String branch, PathList pathList, Boolean force) throws ApiException {
ApiResponse localVarResp = deleteObjectsWithHttpInfo(repository, branch, pathList, force);
return localVarResp.getData();
}
/**
* delete objects. Missing objects will not return a NotFound error.
*
* @param repository (required)
* @param branch (required)
* @param pathList (required)
* @param force (optional, default to false)
* @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 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);
}
/**
* delete objects. Missing objects will not return a NotFound error. (asynchronously)
*
* @param repository (required)
* @param branch (required)
* @param pathList (required)
* @param force (optional, default to false)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
Delete objects response
-
401
Unauthorized
-
403
Forbidden
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public 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;
}
/**
* Build call for getObject
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the ref (required)
* @param range Byte range to retrieve (optional)
* @param ifNoneMatch Returns response only if the object does not have a matching ETag (optional)
* @param presign (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public File getObject(String repository, String ref, String path, String range, String ifNoneMatch, Boolean presign) throws ApiException {
ApiResponse localVarResp = getObjectWithHttpInfo(repository, ref, path, range, ifNoneMatch, presign);
return localVarResp.getData();
}
/**
* 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)
* @param range Byte range to retrieve (optional)
* @param ifNoneMatch Returns response only if the object does not have a matching ETag (optional)
* @param presign (optional)
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
public 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);
}
/**
* get object content (asynchronously)
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the ref (required)
* @param range Byte range to retrieve (optional)
* @param ifNoneMatch Returns response only if the object does not have a matching ETag (optional)
* @param presign (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
*/
public 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;
}
/**
* Build call for getUnderlyingProperties
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the branch (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
object metadata on underlying storage
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call getUnderlyingPropertiesCall(String repository, String ref, String path, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/refs/{ref}/objects/underlyingProperties"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = getUnderlyingPropertiesCall(repository, ref, path, _callback);
return localVarCall;
}
/**
* 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 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 getUnderlyingProperties(String repository, String ref, String path) throws ApiException {
ApiResponse localVarResp = getUnderlyingPropertiesWithHttpInfo(repository, ref, path);
return localVarResp.getData();
}
/**
* 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 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 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);
}
/**
* get object properties on underlying storage (asynchronously)
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the branch (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
object metadata on underlying storage
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public 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;
}
/**
* Build call for headObject
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the ref (required)
* @param range Byte range to retrieve (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
*/
public void headObject(String repository, String ref, String path, String range) throws ApiException {
headObjectWithHttpInfo(repository, ref, path, range);
}
/**
* 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)
* @param range Byte range to retrieve (optional)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
*/
public 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);
}
/**
* check if object exists (asynchronously)
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the ref (required)
* @param range Byte range to retrieve (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
*/
public 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;
}
/**
* Build call for listObjects
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @param after return items after this value (optional)
* @param amount how many items to return (optional, default to 100)
* @param delimiter delimiter used to group common prefixes by (optional)
* @param prefix return items prefixed with this value (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
object listing
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public okhttp3.Call listObjectsCall(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/refs/{ref}/objects/ls"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = listObjectsCall(repository, ref, userMetadata, presign, after, amount, delimiter, prefix, _callback);
return localVarCall;
}
/**
* list objects under a given prefix
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @param after return items after this value (optional)
* @param amount how many items to return (optional, default to 100)
* @param delimiter delimiter used to group common prefixes by (optional)
* @param prefix return items prefixed with this value (optional)
* @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 listObjects(String repository, String ref, Boolean userMetadata, Boolean presign, String after, Integer amount, String delimiter, String prefix) throws ApiException {
ApiResponse localVarResp = listObjectsWithHttpInfo(repository, ref, userMetadata, presign, after, amount, delimiter, prefix);
return localVarResp.getData();
}
/**
* list objects under a given prefix
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @param after return items after this value (optional)
* @param amount how many items to return (optional, default to 100)
* @param delimiter delimiter used to group common prefixes by (optional)
* @param prefix return items prefixed with this value (optional)
* @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 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);
}
/**
* list objects under a given prefix (asynchronously)
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @param after return items after this value (optional)
* @param amount how many items to return (optional, default to 100)
* @param delimiter delimiter used to group common prefixes by (optional)
* @param prefix return items prefixed with this value (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
object listing
-
401
Unauthorized
-
404
Resource Not Found
-
420
too many requests
-
0
Internal Server Error
-
*/
public 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;
}
/**
* Build call for statObject
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the branch (required)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
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 statObjectCall(String repository, String ref, String path, Boolean userMetadata, Boolean presign, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/refs/{ref}/objects/stat"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = statObjectCall(repository, ref, path, userMetadata, presign, _callback);
return localVarCall;
}
/**
* 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)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @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 statObject(String repository, String ref, String path, Boolean userMetadata, Boolean presign) throws ApiException {
ApiResponse localVarResp = statObjectWithHttpInfo(repository, ref, path, userMetadata, presign);
return localVarResp.getData();
}
/**
* 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)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @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 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);
}
/**
* get object metadata (asynchronously)
*
* @param repository (required)
* @param ref a reference (could be either a branch or a commit ID) (required)
* @param path relative to the branch (required)
* @param userMetadata (optional, default to true)
* @param presign (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
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 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;
}
/**
* Build call for uploadObject
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param ifNoneMatch Set to \"*\" to atomically allow the upload only if the key has no object yet. Other values are not supported. (optional)
* @param storageClass Deprecated, this capability will not be supported in future releases. (optional)
* @param force (optional, default to false)
* @param content Only a single file per upload which must be named \\\"content\\\". (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
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 uploadObjectCall(String repository, String branch, String path, String ifNoneMatch, String storageClass, Boolean force, File content, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/repositories/{repository}/branches/{branch}/objects"
.replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString()))
.replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call 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)");
}
okhttp3.Call localVarCall = uploadObjectCall(repository, branch, path, ifNoneMatch, storageClass, force, content, _callback);
return localVarCall;
}
/**
*
*
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param ifNoneMatch Set to \"*\" to atomically allow the upload only if the key has no object yet. Other values are not supported. (optional)
* @param storageClass Deprecated, this capability will not be supported in future releases. (optional)
* @param force (optional, default to false)
* @param content Only a single file per upload which must be named \\\"content\\\". (optional)
* @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 uploadObject(String repository, String branch, String path, String ifNoneMatch, String storageClass, Boolean force, File content) throws ApiException {
ApiResponse localVarResp = uploadObjectWithHttpInfo(repository, branch, path, ifNoneMatch, storageClass, force, content);
return localVarResp.getData();
}
/**
*
*
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param ifNoneMatch Set to \"*\" to atomically allow the upload only if the key has no object yet. Other values are not supported. (optional)
* @param storageClass Deprecated, this capability will not be supported in future releases. (optional)
* @param force (optional, default to false)
* @param content Only a single file per upload which must be named \\\"content\\\". (optional)
* @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 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);
}
/**
* (asynchronously)
*
* @param repository (required)
* @param branch (required)
* @param path relative to the branch (required)
* @param ifNoneMatch Set to \"*\" to atomically allow the upload only if the key has no object yet. Other values are not supported. (optional)
* @param storageClass Deprecated, this capability will not be supported in future releases. (optional)
* @param force (optional, default to false)
* @param content Only a single file per upload which must be named \\\"content\\\". (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details