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

com.vertexvis.api.BatchesApi Maven / Gradle / Ivy

/*
 * 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.Batch;
import com.vertexvis.model.CreateBatchRequest;
import com.vertexvis.model.Failure;
import com.vertexvis.model.QueuedJob;
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 BatchesApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for createBatch
     * @param createBatchRequest  (required)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     
Status Code Description Response Headers
202 Accepted * content-location -
400 Bad Request -
401 Unauthorized -
415 Unsupported Media Type -
*/ public okhttp3.Call createBatchCall(CreateBatchRequest createBatchRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createBatchRequest; // create path and map variables String localVarPath = "/batches"; 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 createBatchValidateBeforeCall(CreateBatchRequest createBatchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createBatchRequest' is set if (createBatchRequest == null) { throw new ApiException("Missing the required parameter 'createBatchRequest' when calling createBatch(Async)"); } okhttp3.Call localVarCall = createBatchCall(createBatchRequest, _callback); return localVarCall; } /** * * Create a `batch`. This API is asynchronous, returning the location of a `queued-batch`. Check the status via the getQueuedBatch API. * @param createBatchRequest (required) * @return QueuedJob * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
202 Accepted * content-location -
400 Bad Request -
401 Unauthorized -
415 Unsupported Media Type -
*/ public QueuedJob createBatch(CreateBatchRequest createBatchRequest) throws ApiException { ApiResponse localVarResp = createBatchWithHttpInfo(createBatchRequest); return localVarResp.getData(); } /** * * Create a `batch`. This API is asynchronous, returning the location of a `queued-batch`. Check the status via the getQueuedBatch API. * @param createBatchRequest (required) * @return ApiResponse<QueuedJob> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
202 Accepted * content-location -
400 Bad Request -
401 Unauthorized -
415 Unsupported Media Type -
*/ public ApiResponse createBatchWithHttpInfo(CreateBatchRequest createBatchRequest) throws ApiException { okhttp3.Call localVarCall = createBatchValidateBeforeCall(createBatchRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Create a `batch`. This API is asynchronous, returning the location of a `queued-batch`. Check the status via the getQueuedBatch API. * @param createBatchRequest (required) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
202 Accepted * content-location -
400 Bad Request -
401 Unauthorized -
415 Unsupported Media Type -
*/ public okhttp3.Call createBatchAsync(CreateBatchRequest createBatchRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createBatchValidateBeforeCall(createBatchRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getBatch * @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 getBatchCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/batches/{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 getBatchValidateBeforeCall(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 getBatch(Async)"); } okhttp3.Call localVarCall = getBatchCall(id, _callback); return localVarCall; } /** * * Get a `batch` by ID. * @param id The `file` ID. (required) * @return Batch * @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 Batch getBatch(UUID id) throws ApiException { ApiResponse localVarResp = getBatchWithHttpInfo(id); return localVarResp.getData(); } /** * * Get a `batch` by ID. * @param id The `file` ID. (required) * @return ApiResponse<Batch> * @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 getBatchWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = getBatchValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Get a `batch` 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 getBatchAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getBatchValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getQueuedBatch * @param id The `queued-batch` 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 -
301 Moved Permanently -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call getQueuedBatchCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/queued-batches/{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 getQueuedBatchValidateBeforeCall(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 getQueuedBatch(Async)"); } okhttp3.Call localVarCall = getQueuedBatchCall(id, _callback); return localVarCall; } /** * * Get a `queued-batch`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `batch`. * @param id The `queued-batch` ID. (required) * @return QueuedJob * @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 -
301 Moved Permanently -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public QueuedJob getQueuedBatch(UUID id) throws ApiException { ApiResponse localVarResp = getQueuedBatchWithHttpInfo(id); return localVarResp.getData(); } /** * * Get a `queued-batch`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `batch`. * @param id The `queued-batch` ID. (required) * @return ApiResponse<QueuedJob> * @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 -
301 Moved Permanently -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public ApiResponse getQueuedBatchWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = getQueuedBatchValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Get a `queued-batch`. The response is either the status if `running` or `error` or, upon completion, redirects to the created `batch`. * @param id The `queued-batch` 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 -
301 Moved Permanently -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call getQueuedBatchAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getQueuedBatchValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy