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 java.io.File;
import com.finbourne.drive.model.LusidProblemDetails;
import com.finbourne.drive.model.LusidValidationProblemDetails;
import com.finbourne.drive.model.StorageObject;
import com.finbourne.drive.model.UpdateFile;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class FilesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public FilesApi() {
this(Configuration.getDefaultApiClient());
}
public FilesApi(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 createFileCall(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body, final ApiCallback _callback) throws ApiException {
return createFileCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback, new ConfigurationOptions());
}
private okhttp3.Call createFileCall(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body, 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 = body;
// create path and map variables
String localVarPath = "/api/files";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (xLusidDriveFilename != null) {
localVarHeaderParams.put("x-lusid-drive-filename", localVarApiClient.parameterToString(xLusidDriveFilename));
}
if (xLusidDrivePath != null) {
localVarHeaderParams.put("x-lusid-drive-path", localVarApiClient.parameterToString(xLusidDrivePath));
}
if (contentLength != null) {
localVarHeaderParams.put("Content-Length", localVarApiClient.parameterToString(contentLength));
}
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/octet-stream"
};
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 createFileValidateBeforeCall(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
// verify the required parameter 'xLusidDriveFilename' is set
if (xLusidDriveFilename == null) {
throw new ApiException("Missing the required parameter 'xLusidDriveFilename' when calling createFile(Async)");
}
// verify the required parameter 'xLusidDrivePath' is set
if (xLusidDrivePath == null) {
throw new ApiException("Missing the required parameter 'xLusidDrivePath' when calling createFile(Async)");
}
// verify the required parameter 'contentLength' is set
if (contentLength == null) {
throw new ApiException("Missing the required parameter 'contentLength' when calling createFile(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling createFile(Async)");
}
return createFileCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback, opts);
}
private ApiResponse createFileWithHttpInfo(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body) throws ApiException {
okhttp3.Call localVarCall = createFileValidateBeforeCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse createFileWithHttpInfo(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createFileValidateBeforeCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call createFileAsync(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createFileValidateBeforeCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call createFileAsync(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = createFileValidateBeforeCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIcreateFileRequest {
private final String xLusidDriveFilename;
private final String xLusidDrivePath;
private final Integer contentLength;
private final byte[] body;
private APIcreateFileRequest(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body) {
this.xLusidDriveFilename = xLusidDriveFilename;
this.xLusidDrivePath = xLusidDrivePath;
this.contentLength = contentLength;
this.body = body;
}
/**
* Build call for createFile
* @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 createFileCall(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback);
}
/**
* Execute createFile 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 = createFileWithHttpInfo(xLusidDriveFilename, xLusidDrivePath, contentLength, body);
return localVarResp.getData();
}
/**
* Execute createFile 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 = createFileWithHttpInfo(xLusidDriveFilename, xLusidDrivePath, contentLength, body, opts);
return localVarResp.getData();
}
/**
* Execute createFile 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 createFileWithHttpInfo(xLusidDriveFilename, xLusidDrivePath, contentLength, body);
}
/**
* Execute createFile 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 createFileWithHttpInfo(xLusidDriveFilename, xLusidDrivePath, contentLength, body, opts);
}
/**
* Execute createFile 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 createFileAsync(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback);
}
/**
* Execute createFile 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 createFileAsync(xLusidDriveFilename, xLusidDrivePath, contentLength, body, _callback, opts);
}
}
/**
* CreateFile: Uploads a file to Lusid Drive. If using an SDK, consider using the UploadAsStreamAsync function for larger files instead.
*
* @param xLusidDriveFilename File name. (required)
* @param xLusidDrivePath File path. (required)
* @param contentLength The size in bytes of the file to be uploaded (required)
* @param body (required)
* @return APIcreateFileRequest
* @http.response.details
Status Code
Description
Response Headers
201
Created
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIcreateFileRequest createFile(String xLusidDriveFilename, String xLusidDrivePath, Integer contentLength, byte[] body) {
return new APIcreateFileRequest(xLusidDriveFilename, xLusidDrivePath, contentLength, body);
}
private okhttp3.Call deleteFileCall(String id, final ApiCallback _callback) throws ApiException {
return deleteFileCall(id, _callback, new ConfigurationOptions());
}
private okhttp3.Call deleteFileCall(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/files/{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 deleteFileValidateBeforeCall(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 deleteFile(Async)");
}
return deleteFileCall(id, _callback, opts);
}
private ApiResponse deleteFileWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = deleteFileValidateBeforeCall(id, null, new ConfigurationOptions());
return localVarApiClient.execute(localVarCall);
}
private ApiResponse deleteFileWithHttpInfo(String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteFileValidateBeforeCall(id, null, opts);
return localVarApiClient.execute(localVarCall);
}
private okhttp3.Call deleteFileAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteFileValidateBeforeCall(id, _callback, new ConfigurationOptions());
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
private okhttp3.Call deleteFileAsync(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = deleteFileValidateBeforeCall(id, _callback, opts);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
public class APIdeleteFileRequest {
private final String id;
private APIdeleteFileRequest(String id) {
this.id = id;
}
/**
* Build call for deleteFile
* @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
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return deleteFileCall(id, _callback);
}
/**
* Execute deleteFile 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
-
0
Error response
-
*/
public void execute() throws ApiException {
deleteFileWithHttpInfo(id);
}
/**
* Execute deleteFile 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
-
0
Error response
-
*/
public void execute(ConfigurationOptions opts) throws ApiException {
deleteFileWithHttpInfo(id, opts);
}
/**
* Execute deleteFile 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return deleteFileWithHttpInfo(id);
}
/**
* Execute deleteFile 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return deleteFileWithHttpInfo(id, opts);
}
/**
* Execute deleteFile 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
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return deleteFileAsync(id, _callback);
}
/**
* Execute deleteFile 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
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return deleteFileAsync(id, _callback, opts);
}
}
/**
* [EARLY ACCESS] DeleteFile: Deletes a file from Drive.
*
* @param id Identifier of the file to be deleted. (required)
* @return APIdeleteFileRequest
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIdeleteFileRequest deleteFile(String id) {
return new APIdeleteFileRequest(id);
}
private okhttp3.Call downloadFileCall(String id, final ApiCallback _callback) throws ApiException {
return downloadFileCall(id, _callback, new ConfigurationOptions());
}
private okhttp3.Call downloadFileCall(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/files/{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();
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 downloadFileValidateBeforeCall(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 downloadFile(Async)");
}
return downloadFileCall(id, _callback, opts);
}
private ApiResponse downloadFileWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = downloadFileValidateBeforeCall(id, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse downloadFileWithHttpInfo(String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = downloadFileValidateBeforeCall(id, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call downloadFileAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = downloadFileValidateBeforeCall(id, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call downloadFileAsync(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = downloadFileValidateBeforeCall(id, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIdownloadFileRequest {
private final String id;
private APIdownloadFileRequest(String id) {
this.id = id;
}
/**
* Build call for downloadFile
* @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
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return downloadFileCall(id, _callback);
}
/**
* Execute downloadFile request
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public File execute() throws ApiException {
ApiResponse localVarResp = downloadFileWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Execute downloadFile request. Use any specified configuration options to override any other configuration for this request only.
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public File execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = downloadFileWithHttpInfo(id, opts);
return localVarResp.getData();
}
/**
* Execute downloadFile request with HTTP info returned
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return downloadFileWithHttpInfo(id);
}
/**
* Execute downloadFile request with HTTP info returned. Use any specified configuration options to override any other configuration for this request only.
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return downloadFileWithHttpInfo(id, opts);
}
/**
* Execute downloadFile 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
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException {
return downloadFileAsync(id, _callback);
}
/**
* Execute downloadFile 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
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return downloadFileAsync(id, _callback, opts);
}
}
/**
* DownloadFile: Download the file from Drive.
*
* @param id Identifier of the file to be downloaded. (required)
* @return APIdownloadFileRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
410
Malware detected, restricted from downloading file.
-
423
Virus scan in progress, restricted from downloading file.
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIdownloadFileRequest downloadFile(String id) {
return new APIdownloadFileRequest(id);
}
private okhttp3.Call getFileCall(String id, final ApiCallback _callback) throws ApiException {
return getFileCall(id, _callback, new ConfigurationOptions());
}
private okhttp3.Call getFileCall(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/files/{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 getFileValidateBeforeCall(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 getFile(Async)");
}
return getFileCall(id, _callback, opts);
}
private ApiResponse getFileWithHttpInfo(String id) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(id, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse getFileWithHttpInfo(String id, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(id, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call getFileAsync(String id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(id, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call getFileAsync(String id, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(id, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIgetFileRequest {
private final String id;
private APIgetFileRequest(String id) {
this.id = id;
}
/**
* Build call for getFile
* @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 getFileCall(id, _callback);
}
/**
* Execute getFile 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
-
0
Error response
-
*/
public StorageObject execute() throws ApiException {
ApiResponse localVarResp = getFileWithHttpInfo(id);
return localVarResp.getData();
}
/**
* Execute getFile 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
-
0
Error response
-
*/
public StorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = getFileWithHttpInfo(id, opts);
return localVarResp.getData();
}
/**
* Execute getFile 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return getFileWithHttpInfo(id);
}
/**
* Execute getFile 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return getFileWithHttpInfo(id, opts);
}
/**
* Execute getFile 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 getFileAsync(id, _callback);
}
/**
* Execute getFile 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
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return getFileAsync(id, _callback, opts);
}
}
/**
* [EARLY ACCESS] GetFile: Get a file stored in Drive.
*
* @param id Identifier of the file to be retrieved. (required)
* @return APIgetFileRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIgetFileRequest getFile(String id) {
return new APIgetFileRequest(id);
}
private okhttp3.Call updateFileContentsCall(String id, Integer contentLength, byte[] body, final ApiCallback _callback) throws ApiException {
return updateFileContentsCall(id, contentLength, body, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateFileContentsCall(String id, Integer contentLength, byte[] body, 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 = body;
// create path and map variables
String localVarPath = "/api/files/{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 (contentLength != null) {
localVarHeaderParams.put("Content-Length", localVarApiClient.parameterToString(contentLength));
}
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/octet-stream"
};
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 updateFileContentsValidateBeforeCall(String id, Integer contentLength, byte[] body, 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 updateFileContents(Async)");
}
// verify the required parameter 'contentLength' is set
if (contentLength == null) {
throw new ApiException("Missing the required parameter 'contentLength' when calling updateFileContents(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling updateFileContents(Async)");
}
return updateFileContentsCall(id, contentLength, body, _callback, opts);
}
private ApiResponse updateFileContentsWithHttpInfo(String id, Integer contentLength, byte[] body) throws ApiException {
okhttp3.Call localVarCall = updateFileContentsValidateBeforeCall(id, contentLength, body, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateFileContentsWithHttpInfo(String id, Integer contentLength, byte[] body, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateFileContentsValidateBeforeCall(id, contentLength, body, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateFileContentsAsync(String id, Integer contentLength, byte[] body, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateFileContentsValidateBeforeCall(id, contentLength, body, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateFileContentsAsync(String id, Integer contentLength, byte[] body, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateFileContentsValidateBeforeCall(id, contentLength, body, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateFileContentsRequest {
private final String id;
private final Integer contentLength;
private final byte[] body;
private APIupdateFileContentsRequest(String id, Integer contentLength, byte[] body) {
this.id = id;
this.contentLength = contentLength;
this.body = body;
}
/**
* Build call for updateFileContents
* @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 updateFileContentsCall(id, contentLength, body, _callback);
}
/**
* Execute updateFileContents 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
-
0
Error response
-
*/
public StorageObject execute() throws ApiException {
ApiResponse localVarResp = updateFileContentsWithHttpInfo(id, contentLength, body);
return localVarResp.getData();
}
/**
* Execute updateFileContents 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
-
0
Error response
-
*/
public StorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateFileContentsWithHttpInfo(id, contentLength, body, opts);
return localVarResp.getData();
}
/**
* Execute updateFileContents 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return updateFileContentsWithHttpInfo(id, contentLength, body);
}
/**
* Execute updateFileContents 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateFileContentsWithHttpInfo(id, contentLength, body, opts);
}
/**
* Execute updateFileContents 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 updateFileContentsAsync(id, contentLength, body, _callback);
}
/**
* Execute updateFileContents 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
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateFileContentsAsync(id, contentLength, body, _callback, opts);
}
}
/**
* [EARLY ACCESS] UpdateFileContents: Updates contents of a file in Drive.
*
* @param id The unique file identifier (required)
* @param contentLength The size in bytes of the file to be uploaded (required)
* @param body (required)
* @return APIupdateFileContentsRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIupdateFileContentsRequest updateFileContents(String id, Integer contentLength, byte[] body) {
return new APIupdateFileContentsRequest(id, contentLength, body);
}
private okhttp3.Call updateFileMetadataCall(String id, UpdateFile updateFile, final ApiCallback _callback) throws ApiException {
return updateFileMetadataCall(id, updateFile, _callback, new ConfigurationOptions());
}
private okhttp3.Call updateFileMetadataCall(String id, UpdateFile updateFile, 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 = updateFile;
// create path and map variables
String localVarPath = "/api/files/{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 updateFileMetadataValidateBeforeCall(String id, UpdateFile updateFile, 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 updateFileMetadata(Async)");
}
// verify the required parameter 'updateFile' is set
if (updateFile == null) {
throw new ApiException("Missing the required parameter 'updateFile' when calling updateFileMetadata(Async)");
}
return updateFileMetadataCall(id, updateFile, _callback, opts);
}
private ApiResponse updateFileMetadataWithHttpInfo(String id, UpdateFile updateFile) throws ApiException {
okhttp3.Call localVarCall = updateFileMetadataValidateBeforeCall(id, updateFile, null, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private ApiResponse updateFileMetadataWithHttpInfo(String id, UpdateFile updateFile, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateFileMetadataValidateBeforeCall(id, updateFile, null, opts);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call updateFileMetadataAsync(String id, UpdateFile updateFile, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateFileMetadataValidateBeforeCall(id, updateFile, _callback, new ConfigurationOptions());
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
private okhttp3.Call updateFileMetadataAsync(String id, UpdateFile updateFile, final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
okhttp3.Call localVarCall = updateFileMetadataValidateBeforeCall(id, updateFile, _callback, opts);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public class APIupdateFileMetadataRequest {
private final String id;
private final UpdateFile updateFile;
private APIupdateFileMetadataRequest(String id, UpdateFile updateFile) {
this.id = id;
this.updateFile = updateFile;
}
/**
* Build call for updateFileMetadata
* @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 updateFileMetadataCall(id, updateFile, _callback);
}
/**
* Execute updateFileMetadata 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
-
0
Error response
-
*/
public StorageObject execute() throws ApiException {
ApiResponse localVarResp = updateFileMetadataWithHttpInfo(id, updateFile);
return localVarResp.getData();
}
/**
* Execute updateFileMetadata 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
-
0
Error response
-
*/
public StorageObject execute(ConfigurationOptions opts) throws ApiException {
ApiResponse localVarResp = updateFileMetadataWithHttpInfo(id, updateFile, opts);
return localVarResp.getData();
}
/**
* Execute updateFileMetadata 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo() throws ApiException {
return updateFileMetadataWithHttpInfo(id, updateFile);
}
/**
* Execute updateFileMetadata 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
-
0
Error response
-
*/
public ApiResponse executeWithHttpInfo(ConfigurationOptions opts) throws ApiException {
return updateFileMetadataWithHttpInfo(id, updateFile, opts);
}
/**
* Execute updateFileMetadata 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 updateFileMetadataAsync(id, updateFile, _callback);
}
/**
* Execute updateFileMetadata 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
-
0
Error response
-
*/
public okhttp3.Call executeAsync(final ApiCallback _callback, ConfigurationOptions opts) throws ApiException {
return updateFileMetadataAsync(id, updateFile, _callback, opts);
}
}
/**
* [EARLY ACCESS] UpdateFileMetadata: Updates metadata for a file in Drive.
*
* @param id Identifier of the file to be updated (required)
* @param updateFile Update to be applied to file (required)
* @return APIupdateFileMetadataRequest
* @http.response.details
Status Code
Description
Response Headers
200
Success
-
400
The details of the input related failure
-
0
Error response
-
*/
public APIupdateFileMetadataRequest updateFileMetadata(String id, UpdateFile updateFile) {
return new APIupdateFileMetadataRequest(id, updateFile);
}
}