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.
/*
* FINBOURNE Drive API
*
* Contact: [email protected]
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package com.finbourne.drive.api;
import com.finbourne.drive.ApiCallback;
import com.finbourne.drive.ApiClient;
import com.finbourne.drive.ApiException;
import com.finbourne.drive.ApiResponse;
import com.finbourne.drive.Configuration;
import com.finbourne.drive.Pair;
import com.finbourne.drive.ProgressRequestBody;
import com.finbourne.drive.ProgressResponseBody;
import com.finbourne.drive.extensions.ConfigurationOptions;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.finbourne.drive.model.CreateFolder;
import com.finbourne.drive.model.LusidProblemDetails;
import com.finbourne.drive.model.LusidValidationProblemDetails;
import com.finbourne.drive.model.PagedResourceListOfStorageObject;
import com.finbourne.drive.model.StorageObject;
import com.finbourne.drive.model.UpdateFolder;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FoldersApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public FoldersApi() {
this(Configuration.getDefaultApiClient());
}
public FoldersApi(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 createFolderCall(CreateFolder createFolder, final ApiCallback _callback) throws ApiException {
return createFolderCall(createFolder, _callback, new ConfigurationOptions());
}
private okhttp3.Call createFolderCall(CreateFolder createFolder, final ApiCallback _callback, ConfigurationOptions opts) 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 = createFolder;
// create path and map variables
String localVarPath = "/api/folders";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createFolderValidateBeforeCall(CreateFolder createFolder, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'createFolder' is set
if (createFolder == null) {
throw new ApiException("Missing the required parameter 'createFolder' when calling createFolder(Async)");
}
return createFolderCall(createFolder, _callback, opts);
}
private ApiResponse createFolderWithHttpInfo(CreateFolder createFolder) throws ApiException {
okhttp3.Call localVarCall = createFolderValidateBeforeCall(createFolder, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createFolderWithHttpInfo(CreateFolder createFolder, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createFolderValidateBeforeCall(createFolder, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createFolderAsync(CreateFolder createFolder, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createFolderValidateBeforeCall(createFolder, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createFolderAsync(CreateFolder createFolder, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createFolderValidateBeforeCall(createFolder, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateFolderRequest {
private final CreateFolder createFolder;
private APIcreateFolderRequest(CreateFolder createFolder) {
this.createFolder = createFolder;
}
/**
* Build call for createFolder
* @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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return createFolderCall(createFolder, _callback);
}
/**
* Execute createFolder request
* @return StorageObject
* @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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public StorageObject execute() throws ApiException {
ApiResponse localVarResp = createFolderWithHttpInfo(createFolder);
return localVarResp.getData();
}
/**
* Execute createFolder request. Use any specified configuration options to override any other configuration for this request only.
* @return StorageObject
* @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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public StorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = createFolderWithHttpInfo(createFolder, opts);
return localVarResp.getData();
}
/**
* Execute createFolder request with HTTP info returned
* @return ApiResponse<StorageObject>
* @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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return createFolderWithHttpInfo(createFolder);
}
/**
* Execute createFolder request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<StorageObject>
* @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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return createFolderWithHttpInfo(createFolder, opts);
}
/**
* Execute createFolder 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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return createFolderAsync(createFolder, _callback);
}
/**
* Execute createFolder request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return createFolderAsync(createFolder, _callback, opts);
}
}
/**
* [EARLY ACCESS] CreateFolder: Create a new folder in LUSID Drive
*
* @param createFolder A CreateFolder object that defines the name and path of the new folder (required)
* @return APIcreateFolderRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreateFolderRequest createFolder(CreateFolder createFolder) {
return new APIcreateFolderRequest(createFolder);
}
private okhttp3.Call deleteFolderCall(String id, final ApiCallback _callback) throws ApiException {
return deleteFolderCall(id, _callback, new ConfigurationOptions());
}
private okhttp3.Call deleteFolderCall(String id, final ApiCallback _callback, ConfigurationOptions opts) 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 = "/api/folders/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteFolderValidateBeforeCall(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling deleteFolder(Async)");
}
return deleteFolderCall(id, _callback, opts);
}
private ApiResponse deleteFolderWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = deleteFolderValidateBeforeCall(id, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deleteFolderWithHttpInfo(String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteFolderValidateBeforeCall(id, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deleteFolderAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteFolderValidateBeforeCall(id, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deleteFolderAsync(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteFolderValidateBeforeCall(id, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeleteFolderRequest {
private final String id;
private APIdeleteFolderRequest(String id) {
this.id = id;
}
/**
* Build call for deleteFolder
* @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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deleteFolderCall(id, _callback);
}
/**
* Execute deleteFolder 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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public void execute() throws ApiException {
deleteFolderWithHttpInfo(id);
}
/**
* Execute deleteFolder 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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public void execute(ConfigurationOptions opts) throws ApiException {
deleteFolderWithHttpInfo(id, opts);
}
/**
* Execute deleteFolder 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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deleteFolderWithHttpInfo(id);
}
/**
* Execute deleteFolder request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deleteFolderWithHttpInfo(id, opts);
}
/**
* Execute deleteFolder 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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deleteFolderAsync(id, _callback);
}
/**
* Execute deleteFolder request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deleteFolderAsync(id, _callback, opts);
}
}
/**
* [EARLY ACCESS] DeleteFolder: Delete a specified folder and all subfolders
*
* @param id Unique ID of the folder (required)
* @return APIdeleteFolderRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public APIdeleteFolderRequest deleteFolder(String id) {
return new APIdeleteFolderRequest(id);
}
private okhttp3.Call getFolderCall(String id, final ApiCallback _callback) throws ApiException {
return getFolderCall(id, _callback, new ConfigurationOptions());
}
private okhttp3.Call getFolderCall(String id, final ApiCallback _callback, ConfigurationOptions opts) 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 = "/api/folders/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getFolderValidateBeforeCall(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getFolder(Async)");
}
return getFolderCall(id, _callback, opts);
}
private ApiResponse getFolderWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getFolderValidateBeforeCall(id, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getFolderWithHttpInfo(String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getFolderValidateBeforeCall(id, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getFolderAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFolderValidateBeforeCall(id, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getFolderAsync(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getFolderValidateBeforeCall(id, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetFolderRequest {
private final String id;
private APIgetFolderRequest(String id) {
this.id = id;
}
/**
* Build call for getFolder
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getFolderCall(id, _callback);
}
/**
* Execute getFolder request
* @return StorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public StorageObject execute() throws ApiException {
ApiResponse localVarResp = getFolderWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Execute getFolder request. Use any specified configuration options to override any other configuration for this request only.
* @return StorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public StorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getFolderWithHttpInfo(id, opts);
return localVarResp.getData();
}
/**
* Execute getFolder request with HTTP info returned
* @return ApiResponse<StorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getFolderWithHttpInfo(id);
}
/**
* Execute getFolder request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<StorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getFolderWithHttpInfo(id, opts);
}
/**
* Execute getFolder 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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getFolderAsync(id, _callback);
}
/**
* Execute getFolder request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getFolderAsync(id, _callback, opts);
}
}
/**
* [EARLY ACCESS] GetFolder: Get metadata of folder
*
* @param id Unique ID of the folder (required)
* @return APIgetFolderRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public APIgetFolderRequest getFolder(String id) {
return new APIgetFolderRequest(id);
}
private okhttp3.Call getFolderContentsCall(String id, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException {
return getFolderContentsCall(id, page, sortBy, start, limit, filter, _callback, new ConfigurationOptions());
}
private okhttp3.Call getFolderContentsCall(String id, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) 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 = "/api/folders/{id}/contents"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (sortBy != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy));
}
if (start != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getFolderContentsValidateBeforeCall(String id, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getFolderContents(Async)");
}
return getFolderContentsCall(id, page, sortBy, start, limit, filter, _callback, opts);
}
private ApiResponse getFolderContentsWithHttpInfo(String id, String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException {
okhttp3.Call localVarCall = getFolderContentsValidateBeforeCall(id, page, sortBy, start, limit, filter, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getFolderContentsWithHttpInfo(String id, String page, List sortBy, Integer start, Integer limit, String filter, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getFolderContentsValidateBeforeCall(id, page, sortBy, start, limit, filter, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getFolderContentsAsync(String id, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFolderContentsValidateBeforeCall(id, page, sortBy, start, limit, filter, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getFolderContentsAsync(String id, String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getFolderContentsValidateBeforeCall(id, page, sortBy, start, limit, filter, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetFolderContentsRequest {
private final String id;
private String page;
private List sortBy;
private Integer start;
private Integer limit;
private String filter;
private APIgetFolderContentsRequest(String id) {
this.id = id;
}
/**
* Set page
* @param page The pagination token to use to continue listing contents from a previous call to list contents. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional)
* @return APIgetFolderContentsRequest
*/
public APIgetFolderContentsRequest page(String page) {
this.page = page;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order. (optional)
* @return APIgetFolderContentsRequest
*/
public APIgetFolderContentsRequest sortBy(List sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set start
* @param start When paginating, skip this number of results. (optional)
* @return APIgetFolderContentsRequest
*/
public APIgetFolderContentsRequest start(Integer start) {
this.start = start;
return this;
}
/**
* Set limit
* @param limit When paginating, limit the number of returned results to this many. (optional)
* @return APIgetFolderContentsRequest
*/
public APIgetFolderContentsRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set filter
* @param filter Expression to filter the result set. (optional, default to )
* @return APIgetFolderContentsRequest
*/
public APIgetFolderContentsRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Build call for getFolderContents
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getFolderContentsCall(id, page, sortBy, start, limit, filter, _callback);
}
/**
* Execute getFolderContents request
* @return PagedResourceListOfStorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public PagedResourceListOfStorageObject execute() throws ApiException {
ApiResponse localVarResp = getFolderContentsWithHttpInfo(id, page, sortBy, start, limit, filter);
return localVarResp.getData();
}
/**
* Execute getFolderContents request. Use any specified configuration options to override any other configuration for this request only.
* @return PagedResourceListOfStorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public PagedResourceListOfStorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getFolderContentsWithHttpInfo(id, page, sortBy, start, limit, filter, opts);
return localVarResp.getData();
}
/**
* Execute getFolderContents request with HTTP info returned
* @return ApiResponse<PagedResourceListOfStorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getFolderContentsWithHttpInfo(id, page, sortBy, start, limit, filter);
}
/**
* Execute getFolderContents request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<PagedResourceListOfStorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getFolderContentsWithHttpInfo(id, page, sortBy, start, limit, filter, opts);
}
/**
* Execute getFolderContents 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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getFolderContentsAsync(id, page, sortBy, start, limit, filter, _callback);
}
/**
* Execute getFolderContents request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getFolderContentsAsync(id, page, sortBy, start, limit, filter, _callback, opts);
}
}
/**
* GetFolderContents: List contents of a folder
*
* @param id Unique ID of the folder (required)
* @return APIgetFolderContentsRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public APIgetFolderContentsRequest getFolderContents(String id) {
return new APIgetFolderContentsRequest(id);
}
private okhttp3.Call getRootFolderCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException {
return getRootFolderCall(page, sortBy, start, limit, filter, _callback, new ConfigurationOptions());
}
private okhttp3.Call getRootFolderCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) 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 = "/api/folders";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (page != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page));
}
if (sortBy != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "sortBy", sortBy));
}
if (start != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("start", start));
}
if (limit != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("limit", limit));
}
if (filter != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter", filter));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getRootFolderValidateBeforeCall(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getRootFolderCall(page, sortBy, start, limit, filter, _callback, opts);
}
private ApiResponse getRootFolderWithHttpInfo(String page, List sortBy, Integer start, Integer limit, String filter) throws ApiException {
okhttp3.Call localVarCall = getRootFolderValidateBeforeCall(page, sortBy, start, limit, filter, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getRootFolderWithHttpInfo(String page, List sortBy, Integer start, Integer limit, String filter, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getRootFolderValidateBeforeCall(page, sortBy, start, limit, filter, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getRootFolderAsync(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getRootFolderValidateBeforeCall(page, sortBy, start, limit, filter, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getRootFolderAsync(String page, List sortBy, Integer start, Integer limit, String filter, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getRootFolderValidateBeforeCall(page, sortBy, start, limit, filter, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetRootFolderRequest {
private String page;
private List sortBy;
private Integer start;
private Integer limit;
private String filter;
private APIgetRootFolderRequest() {
}
/**
* Set page
* @param page The pagination token to use to continue listing contents from a previous call to list contents. This value is returned from the previous call. If a pagination token is provided the sortBy and filter fields must not have changed since the original request. Also, if set, a start value cannot be provided. (optional)
* @return APIgetRootFolderRequest
*/
public APIgetRootFolderRequest page(String page) {
this.page = page;
return this;
}
/**
* Set sortBy
* @param sortBy Order the results by these fields. Use use the '-' sign to denote descending order. (optional)
* @return APIgetRootFolderRequest
*/
public APIgetRootFolderRequest sortBy(List sortBy) {
this.sortBy = sortBy;
return this;
}
/**
* Set start
* @param start When paginating, skip this number of results. (optional)
* @return APIgetRootFolderRequest
*/
public APIgetRootFolderRequest start(Integer start) {
this.start = start;
return this;
}
/**
* Set limit
* @param limit When paginating, limit the number of returned results to this many. (optional)
* @return APIgetRootFolderRequest
*/
public APIgetRootFolderRequest limit(Integer limit) {
this.limit = limit;
return this;
}
/**
* Set filter
* @param filter Expression to filter the result set. (optional, default to true)
* @return APIgetRootFolderRequest
*/
public APIgetRootFolderRequest filter(String filter) {
this.filter = filter;
return this;
}
/**
* Build call for getRootFolder
* @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
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getRootFolderCall(page, sortBy, start, limit, filter, _callback);
}
/**
* Execute getRootFolder request
* @return PagedResourceListOfStorageObject
* @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
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public PagedResourceListOfStorageObject execute() throws ApiException {
ApiResponse localVarResp = getRootFolderWithHttpInfo(page, sortBy, start, limit, filter);
return localVarResp.getData();
}
/**
* Execute getRootFolder request. Use any specified configuration options to override any other configuration for this request only.
* @return PagedResourceListOfStorageObject
* @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
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public PagedResourceListOfStorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getRootFolderWithHttpInfo(page, sortBy, start, limit, filter, opts);
return localVarResp.getData();
}
/**
* Execute getRootFolder request with HTTP info returned
* @return ApiResponse<PagedResourceListOfStorageObject>
* @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
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getRootFolderWithHttpInfo(page, sortBy, start, limit, filter);
}
/**
* Execute getRootFolder request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<PagedResourceListOfStorageObject>
* @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
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getRootFolderWithHttpInfo(page, sortBy, start, limit, filter, opts);
}
/**
* Execute getRootFolder 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
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return getRootFolderAsync(page, sortBy, start, limit, filter, _callback);
}
/**
* Execute getRootFolder request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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 APIgetRootFolderRequest getRootFolder() {
return new APIgetRootFolderRequest();
}
private okhttp3.Call moveFolderCall(String id, List requestBody, Boolean overwrite, Boolean deleteSource, final ApiCallback _callback) throws ApiException {
return moveFolderCall(id, requestBody, overwrite, deleteSource, _callback, new ConfigurationOptions());
}
private okhttp3.Call moveFolderCall(String id, List requestBody, Boolean overwrite, Boolean deleteSource, final ApiCallback _callback, ConfigurationOptions opts) 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 = requestBody;
// create path and map variables
String localVarPath = "/api/folders/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (overwrite != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("overwrite", overwrite));
}
if (deleteSource != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("deleteSource", deleteSource));
}
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call moveFolderValidateBeforeCall(String id, List requestBody, Boolean overwrite, Boolean deleteSource, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling moveFolder(Async)");
}
// verify the required parameter 'requestBody' is set
if (requestBody == null) {
throw new ApiException("Missing the required parameter 'requestBody' when calling moveFolder(Async)");
}
return moveFolderCall(id, requestBody, overwrite, deleteSource, _callback, opts);
}
private ApiResponse moveFolderWithHttpInfo(String id, List requestBody, Boolean overwrite, Boolean deleteSource) throws ApiException {
okhttp3.Call localVarCall = moveFolderValidateBeforeCall(id, requestBody, overwrite, deleteSource, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse moveFolderWithHttpInfo(String id, List requestBody, Boolean overwrite, Boolean deleteSource, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = moveFolderValidateBeforeCall(id, requestBody, overwrite, deleteSource, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call moveFolderAsync(String id, List requestBody, Boolean overwrite, Boolean deleteSource, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = moveFolderValidateBeforeCall(id, requestBody, overwrite, deleteSource, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call moveFolderAsync(String id, List requestBody, Boolean overwrite, Boolean deleteSource, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = moveFolderValidateBeforeCall(id, requestBody, overwrite, deleteSource, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APImoveFolderRequest {
private final String id;
private final List requestBody;
private Boolean overwrite;
private Boolean deleteSource;
private APImoveFolderRequest(String id, List requestBody) {
this.id = id;
this.requestBody = requestBody;
}
/**
* Set overwrite
* @param overwrite True if the destination has file with same name if should be overwritten (optional, default to false)
* @return APImoveFolderRequest
*/
public APImoveFolderRequest overwrite(Boolean overwrite) {
this.overwrite = overwrite;
return this;
}
/**
* Set deleteSource
* @param deleteSource If true after moving the original file is deleted (optional, default to false)
* @return APImoveFolderRequest
*/
public APImoveFolderRequest deleteSource(Boolean deleteSource) {
this.deleteSource = deleteSource;
return this;
}
/**
* Build call for moveFolder
* @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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return moveFolderCall(id, requestBody, overwrite, deleteSource, _callback);
}
/**
* Execute moveFolder request
* @return PagedResourceListOfStorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public PagedResourceListOfStorageObject execute() throws ApiException {
ApiResponse localVarResp = moveFolderWithHttpInfo(id, requestBody, overwrite, deleteSource);
return localVarResp.getData();
}
/**
* Execute moveFolder request. Use any specified configuration options to override any other configuration for this request only.
* @return PagedResourceListOfStorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public PagedResourceListOfStorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = moveFolderWithHttpInfo(id, requestBody, overwrite, deleteSource, opts);
return localVarResp.getData();
}
/**
* Execute moveFolder request with HTTP info returned
* @return ApiResponse<PagedResourceListOfStorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return moveFolderWithHttpInfo(id, requestBody, overwrite, deleteSource);
}
/**
* Execute moveFolder request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<PagedResourceListOfStorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return moveFolderWithHttpInfo(id, requestBody, overwrite, deleteSource, opts);
}
/**
* Execute moveFolder 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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return moveFolderAsync(id, requestBody, overwrite, deleteSource, _callback);
}
/**
* Execute moveFolder request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return moveFolderAsync(id, requestBody, overwrite, deleteSource, _callback, opts);
}
}
/**
* [EARLY ACCESS] MoveFolder: Move files to specified folder
*
* @param id Unique ID of the folder where the files should be moved (required)
* @param requestBody Enumerable of unique IDs of files that should be moved (required)
* @return APImoveFolderRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No folder or file with the supplied Id exists
-
409
There is already a file with the same name at this location
-
0
Error response
-
*/
public APImoveFolderRequest moveFolder(String id, List requestBody) {
return new APImoveFolderRequest(id, requestBody);
}
private okhttp3.Call updateFolderCall(String id, UpdateFolder updateFolder, final ApiCallback _callback) throws ApiException {
return updateFolderCall(id, updateFolder, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateFolderCall(String id, UpdateFolder updateFolder, final ApiCallback _callback, ConfigurationOptions opts) 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 = updateFolder;
// create path and map variables
String localVarPath = "/api/folders/{id}"
.replace("{" + "id" + "}", localVarApiClient.escapeString(id.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"text/plain",
"application/json",
"text/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[] { "oauth2" };
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback, opts);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateFolderValidateBeforeCall(String id, UpdateFolder updateFolder, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling updateFolder(Async)");
}
// verify the required parameter 'updateFolder' is set
if (updateFolder == null) {
throw new ApiException("Missing the required parameter 'updateFolder' when calling updateFolder(Async)");
}
return updateFolderCall(id, updateFolder, _callback, opts);
}
private ApiResponse updateFolderWithHttpInfo(String id, UpdateFolder updateFolder) throws ApiException {
okhttp3.Call localVarCall = updateFolderValidateBeforeCall(id, updateFolder, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateFolderWithHttpInfo(String id, UpdateFolder updateFolder, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateFolderValidateBeforeCall(id, updateFolder, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateFolderAsync(String id, UpdateFolder updateFolder, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateFolderValidateBeforeCall(id, updateFolder, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateFolderAsync(String id, UpdateFolder updateFolder, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateFolderValidateBeforeCall(id, updateFolder, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateFolderRequest {
private final String id;
private final UpdateFolder updateFolder;
private APIupdateFolderRequest(String id, UpdateFolder updateFolder) {
this.id = id;
this.updateFolder = updateFolder;
}
/**
* Build call for updateFolder
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return updateFolderCall(id, updateFolder, _callback);
}
/**
* Execute updateFolder request
* @return StorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public StorageObject execute() throws ApiException {
ApiResponse localVarResp = updateFolderWithHttpInfo(id, updateFolder);
return localVarResp.getData();
}
/**
* Execute updateFolder request. Use any specified configuration options to override any other configuration for this request only.
* @return StorageObject
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public StorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateFolderWithHttpInfo(id, updateFolder, opts);
return localVarResp.getData();
}
/**
* Execute updateFolder request with HTTP info returned
* @return ApiResponse<StorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return updateFolderWithHttpInfo(id, updateFolder);
}
/**
* Execute updateFolder request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<StorageObject>
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateFolderWithHttpInfo(id, updateFolder, opts);
}
/**
* Execute updateFolder 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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return updateFolderAsync(id, updateFolder, _callback);
}
/**
* Execute updateFolder request (asynchronously). Use any specified configuration options to override any other configuration for this request only.
* @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
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateFolderAsync(id, updateFolder, _callback, opts);
}
}
/**
* [EARLY ACCESS] UpdateFolder: Update an existing folder's name, path
*
* @param id Unique ID of the folder (required)
* @param updateFolder An UpdateFolder object that defines the new name or path of the folder (required)
* @return APIupdateFolderRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
404
No folder with this Id exists
-
0
Error response
-
*/
public APIupdateFolderRequest updateFolder(String id, UpdateFolder updateFolder) {
return new APIupdateFolderRequest(id, updateFolder);
}
}