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.
/*
* Vertex Platform API
* The Vertex distributed cloud rendering platform includes a set of APIs and SDKs, which together allow easily integrating 3D product data into your business application. See our [Developer Guides](https://developer.vertexvis.com/docs/guides/render-your-first-scene) to get started. Notes about the Postman collection and API Reference code samples, - They include all required and optional body parameters for completeness. Remove any optional parameters as desired. - They use auto-generated IDs and other values that may share the same value for ease of documentation only. In actual requests and responses, the IDs should uniquely identify their corresponding resource.
*
* The version of the OpenAPI document: 1.0
* 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.vertexvis.api;
import com.vertexvis.ApiCallback;
import com.vertexvis.ApiClient;
import com.vertexvis.ApiException;
import com.vertexvis.ApiResponse;
import com.vertexvis.Configuration;
import com.vertexvis.Pair;
import com.vertexvis.ProgressRequestBody;
import com.vertexvis.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.vertexvis.model.CreateFileRequest;
import com.vertexvis.model.Failure;
import java.io.File;
import com.vertexvis.model.FileList;
import com.vertexvis.model.FileMetadata;
import java.util.UUID;
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;
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;
}
/**
* Build call for createFile
* @param createFileRequest (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
* location -
400
Bad Request
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public okhttp3.Call createFileCall(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = createFileRequest;
// create path and map variables
String localVarPath = "/files";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.api+json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/vnd.api+json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "OAuth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call createFileValidateBeforeCall(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'createFileRequest' is set
if (createFileRequest == null) {
throw new ApiException("Missing the required parameter 'createFileRequest' when calling createFile(Async)");
}
okhttp3.Call localVarCall = createFileCall(createFileRequest, _callback);
return localVarCall;
}
/**
*
* Create a `file`. Once created, upload file content via the uploadFile API. For details including supported file formats, see our [Import data](https://developer.vertexvis.com/docs/guides/import-data-with-api) guide.
* @param createFileRequest (required)
* @return FileMetadata
* @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
* location -
400
Bad Request
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public FileMetadata createFile(CreateFileRequest createFileRequest) throws ApiException {
ApiResponse localVarResp = createFileWithHttpInfo(createFileRequest);
return localVarResp.getData();
}
/**
*
* Create a `file`. Once created, upload file content via the uploadFile API. For details including supported file formats, see our [Import data](https://developer.vertexvis.com/docs/guides/import-data-with-api) guide.
* @param createFileRequest (required)
* @return ApiResponse<FileMetadata>
* @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
* location -
400
Bad Request
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public ApiResponse createFileWithHttpInfo(CreateFileRequest createFileRequest) throws ApiException {
okhttp3.Call localVarCall = createFileValidateBeforeCall(createFileRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* Create a `file`. Once created, upload file content via the uploadFile API. For details including supported file formats, see our [Import data](https://developer.vertexvis.com/docs/guides/import-data-with-api) guide.
* @param createFileRequest (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
201
Created
* location -
400
Bad Request
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public okhttp3.Call createFileAsync(CreateFileRequest createFileRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = createFileValidateBeforeCall(createFileRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteFile
* @param id The `file` ID. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public okhttp3.Call deleteFileCall(UUID id, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/files/{id}"
.replaceAll("\\{" + "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 = {
"application/vnd.api+json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "OAuth2" };
return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteFileValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling deleteFile(Async)");
}
okhttp3.Call localVarCall = deleteFileCall(id, _callback);
return localVarCall;
}
/**
*
* Delete a `file`.
* @param id The `file` ID. (required)
* @return FileMetadata
* @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
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public FileMetadata deleteFile(UUID id) throws ApiException {
ApiResponse localVarResp = deleteFileWithHttpInfo(id);
return localVarResp.getData();
}
/**
*
* Delete a `file`.
* @param id The `file` ID. (required)
* @return ApiResponse<FileMetadata>
* @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
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public ApiResponse deleteFileWithHttpInfo(UUID id) throws ApiException {
okhttp3.Call localVarCall = deleteFileValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* Delete a `file`.
* @param id The `file` ID. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public okhttp3.Call deleteFileAsync(UUID id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteFileValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getFile
* @param id The `file` ID. (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public okhttp3.Call getFileCall(UUID id, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/files/{id}"
.replaceAll("\\{" + "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 = {
"application/vnd.api+json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "OAuth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getFileValidateBeforeCall(UUID id, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling getFile(Async)");
}
okhttp3.Call localVarCall = getFileCall(id, _callback);
return localVarCall;
}
/**
*
* Get a `file` by ID.
* @param id The `file` ID. (required)
* @return FileMetadata
* @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
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public FileMetadata getFile(UUID id) throws ApiException {
ApiResponse localVarResp = getFileWithHttpInfo(id);
return localVarResp.getData();
}
/**
*
* Get a `file` by ID.
* @param id The `file` ID. (required)
* @return ApiResponse<FileMetadata>
* @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
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public ApiResponse getFileWithHttpInfo(UUID id) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(id, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* Get a `file` by ID.
* @param id The `file` ID. (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public okhttp3.Call getFileAsync(UUID id, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(id, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getFiles
* @param pageCursor The cursor for the next page of items. (optional)
* @param pageSize The number of items to return. (optional)
* @param filterSuppliedId Comma-separated list of supplied IDs to filter on. (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public okhttp3.Call getFilesCall(String pageCursor, Integer pageSize, String filterSuppliedId, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/files";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (pageCursor != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[cursor]", pageCursor));
}
if (pageSize != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("page[size]", pageSize));
}
if (filterSuppliedId != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("filter[suppliedId]", filterSuppliedId));
}
final String[] localVarAccepts = {
"application/vnd.api+json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "OAuth2" };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getFilesValidateBeforeCall(String pageCursor, Integer pageSize, String filterSuppliedId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFilesCall(pageCursor, pageSize, filterSuppliedId, _callback);
return localVarCall;
}
/**
*
* Get `files`.
* @param pageCursor The cursor for the next page of items. (optional)
* @param pageSize The number of items to return. (optional)
* @param filterSuppliedId Comma-separated list of supplied IDs to filter on. (optional)
* @return FileList
* @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
OK
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public FileList getFiles(String pageCursor, Integer pageSize, String filterSuppliedId) throws ApiException {
ApiResponse localVarResp = getFilesWithHttpInfo(pageCursor, pageSize, filterSuppliedId);
return localVarResp.getData();
}
/**
*
* Get `files`.
* @param pageCursor The cursor for the next page of items. (optional)
* @param pageSize The number of items to return. (optional)
* @param filterSuppliedId Comma-separated list of supplied IDs to filter on. (optional)
* @return ApiResponse<FileList>
* @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
OK
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public ApiResponse getFilesWithHttpInfo(String pageCursor, Integer pageSize, String filterSuppliedId) throws ApiException {
okhttp3.Call localVarCall = getFilesValidateBeforeCall(pageCursor, pageSize, filterSuppliedId, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* Get `files`.
* @param pageCursor The cursor for the next page of items. (optional)
* @param pageSize The number of items to return. (optional)
* @param filterSuppliedId Comma-separated list of supplied IDs to filter on. (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
OK
-
401
Unauthorized
-
415
Unsupported Media Type
-
*/
public okhttp3.Call getFilesAsync(String pageCursor, Integer pageSize, String filterSuppliedId, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFilesValidateBeforeCall(pageCursor, pageSize, filterSuppliedId, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for uploadFile
* @param id The `file` ID. (required)
* @param body (required)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public okhttp3.Call uploadFileCall(UUID id, File body, final ApiCallback _callback) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/files/{id}"
.replaceAll("\\{" + "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 = {
"application/vnd.api+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);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { "OAuth2" };
return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call uploadFileValidateBeforeCall(UUID id, File body, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException("Missing the required parameter 'id' when calling uploadFile(Async)");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException("Missing the required parameter 'body' when calling uploadFile(Async)");
}
okhttp3.Call localVarCall = uploadFileCall(id, body, _callback);
return localVarCall;
}
/**
*
* Upload a `file`. Once uploaded, create either parts or geometry sets via the createPart or createGeometrySet APIs.
* @param id The `file` ID. (required)
* @param body (required)
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public void uploadFile(UUID id, File body) throws ApiException {
uploadFileWithHttpInfo(id, body);
}
/**
*
* Upload a `file`. Once uploaded, create either parts or geometry sets via the createPart or createGeometrySet APIs.
* @param id The `file` ID. (required)
* @param body (required)
* @return ApiResponse<Void>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
204
No Content
-
400
Bad Request
-
401
Unauthorized
-
404
Not Found
-
415
Unsupported Media Type
-
*/
public ApiResponse uploadFileWithHttpInfo(UUID id, File body) throws ApiException {
okhttp3.Call localVarCall = uploadFileValidateBeforeCall(id, body, null);
return localVarApiClient.execute(localVarCall);
}
/**
* (asynchronously)
* Upload a `file`. Once uploaded, create either parts or geometry sets via the createPart or createGeometrySet APIs.
* @param id The `file` ID. (required)
* @param body (required)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details