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

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

There is a newer version: 1.43.0
Show newest version
/*
 * lakeFS API
 * lakeFS HTTP API
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package io.lakefs.clients.api;

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

import com.google.gson.reflect.TypeToken;

import java.io.IOException;


import io.lakefs.clients.api.model.Error;
import io.lakefs.clients.api.model.ImportCreation;
import io.lakefs.clients.api.model.ImportCreationResponse;
import io.lakefs.clients.api.model.ImportStatus;

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

public class ImportApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for importCancel
     * @param repository  (required)
     * @param branch  (required)
     * @param id Unique identifier of the import process (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
204 import canceled successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call importCancelCall(String repository, String branch, String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/import" .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 (id != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } 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 importCancelValidateBeforeCall(String repository, String branch, String id, 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 importCancel(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling importCancel(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling importCancel(Async)"); } okhttp3.Call localVarCall = importCancelCall(repository, branch, id, _callback); return localVarCall; } /** * cancel ongoing import * * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (required) * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 import canceled successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public void importCancel(String repository, String branch, String id) throws ApiException { importCancelWithHttpInfo(repository, branch, id); } /** * cancel ongoing import * * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (required) * @return ApiResponse<Void> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
204 import canceled successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse importCancelWithHttpInfo(String repository, String branch, String id) throws ApiException { okhttp3.Call localVarCall = importCancelValidateBeforeCall(repository, branch, id, null); return localVarApiClient.execute(localVarCall); } /** * cancel ongoing import (asynchronously) * * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
204 import canceled successfully -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
409 Resource Conflicts With Target -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call importCancelAsync(String repository, String branch, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = importCancelValidateBeforeCall(repository, branch, id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for importStart * @param repository (required) * @param branch (required) * @param importCreation (required) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
202 Import started -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call importStartCall(String repository, String branch, ImportCreation importCreation, final ApiCallback _callback) throws ApiException { Object localVarPostBody = importCreation; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/import" .replaceAll("\\{" + "repository" + "\\}", localVarApiClient.escapeString(repository.toString())) .replaceAll("\\{" + "branch" + "\\}", localVarApiClient.escapeString(branch.toString())); List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "basic_auth", "cookie_auth", "jwt_token", "oidc_auth", "saml_auth" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call importStartValidateBeforeCall(String repository, String branch, ImportCreation importCreation, 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 importStart(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling importStart(Async)"); } // verify the required parameter 'importCreation' is set if (importCreation == null) { throw new ApiException("Missing the required parameter 'importCreation' when calling importStart(Async)"); } okhttp3.Call localVarCall = importStartCall(repository, branch, importCreation, _callback); return localVarCall; } /** * import data from object store * * @param repository (required) * @param branch (required) * @param importCreation (required) * @return ImportCreationResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
202 Import started -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ImportCreationResponse importStart(String repository, String branch, ImportCreation importCreation) throws ApiException { ApiResponse localVarResp = importStartWithHttpInfo(repository, branch, importCreation); return localVarResp.getData(); } /** * import data from object store * * @param repository (required) * @param branch (required) * @param importCreation (required) * @return ApiResponse<ImportCreationResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
202 Import started -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse importStartWithHttpInfo(String repository, String branch, ImportCreation importCreation) throws ApiException { okhttp3.Call localVarCall = importStartValidateBeforeCall(repository, branch, importCreation, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * import data from object store (asynchronously) * * @param repository (required) * @param branch (required) * @param importCreation (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
202 Import started -
400 Validation Error -
401 Unauthorized -
403 Forbidden -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call importStartAsync(String repository, String branch, ImportCreation importCreation, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = importStartValidateBeforeCall(repository, branch, importCreation, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for importStatus * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (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 import status -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call importStatusCall(String repository, String branch, String id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/repositories/{repository}/branches/{branch}/import" .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 (id != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("id", id)); } 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 importStatusValidateBeforeCall(String repository, String branch, String id, 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 importStatus(Async)"); } // verify the required parameter 'branch' is set if (branch == null) { throw new ApiException("Missing the required parameter 'branch' when calling importStatus(Async)"); } // verify the required parameter 'id' is set if (id == null) { throw new ApiException("Missing the required parameter 'id' when calling importStatus(Async)"); } okhttp3.Call localVarCall = importStatusCall(repository, branch, id, _callback); return localVarCall; } /** * get import status * * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (required) * @return ImportStatus * @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 import status -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ImportStatus importStatus(String repository, String branch, String id) throws ApiException { ApiResponse localVarResp = importStatusWithHttpInfo(repository, branch, id); return localVarResp.getData(); } /** * get import status * * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (required) * @return ApiResponse<ImportStatus> * @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 import status -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public ApiResponse importStatusWithHttpInfo(String repository, String branch, String id) throws ApiException { okhttp3.Call localVarCall = importStatusValidateBeforeCall(repository, branch, id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * get import status (asynchronously) * * @param repository (required) * @param branch (required) * @param id Unique identifier of the import process (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 import status -
401 Unauthorized -
404 Resource Not Found -
420 too many requests -
0 Internal Server Error -
*/ public okhttp3.Call importStatusAsync(String repository, String branch, String id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = importStatusValidateBeforeCall(repository, branch, id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy