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

com.vertexvis.api.AccountsApi 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.Account;
import com.vertexvis.model.AdminCreateApplicationRequest;
import com.vertexvis.model.CreateAccountRequest;
import com.vertexvis.model.CreatedApplication;
import com.vertexvis.model.Failure;
import java.util.UUID;
import com.vertexvis.model.UpdateAccountRequest;

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

public class AccountsApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for createAccount
     * @param createAccountRequest  (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 createAccountCall(CreateAccountRequest createAccountRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createAccountRequest; // create path and map variables String localVarPath = "/accounts"; 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[] { "OAuth2Internal" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createAccountValidateBeforeCall(CreateAccountRequest createAccountRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createAccountRequest' is set if (createAccountRequest == null) { throw new ApiException("Missing the required parameter 'createAccountRequest' when calling createAccount(Async)"); } okhttp3.Call localVarCall = createAccountCall(createAccountRequest, _callback); return localVarCall; } /** * * Create an `account`. * @param createAccountRequest (required) * @return Account * @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 Account createAccount(CreateAccountRequest createAccountRequest) throws ApiException { ApiResponse localVarResp = createAccountWithHttpInfo(createAccountRequest); return localVarResp.getData(); } /** * * Create an `account`. * @param createAccountRequest (required) * @return ApiResponse<Account> * @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 createAccountWithHttpInfo(CreateAccountRequest createAccountRequest) throws ApiException { okhttp3.Call localVarCall = createAccountValidateBeforeCall(createAccountRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Create an `account`. * @param createAccountRequest (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 createAccountAsync(CreateAccountRequest createAccountRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createAccountValidateBeforeCall(createAccountRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for createApplicationForAccount * @param id The `account` ID. (required) * @param adminCreateApplicationRequest (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 -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call createApplicationForAccountCall(UUID id, AdminCreateApplicationRequest adminCreateApplicationRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = adminCreateApplicationRequest; // create path and map variables String localVarPath = "/accounts/{id}/applications" .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/vnd.api+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "OAuth2Internal" }; return localVarApiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call createApplicationForAccountValidateBeforeCall(UUID id, AdminCreateApplicationRequest adminCreateApplicationRequest, 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 createApplicationForAccount(Async)"); } // verify the required parameter 'adminCreateApplicationRequest' is set if (adminCreateApplicationRequest == null) { throw new ApiException("Missing the required parameter 'adminCreateApplicationRequest' when calling createApplicationForAccount(Async)"); } okhttp3.Call localVarCall = createApplicationForAccountCall(id, adminCreateApplicationRequest, _callback); return localVarCall; } /** * * Create an `application` for an `account`. * @param id The `account` ID. (required) * @param adminCreateApplicationRequest (required) * @return CreatedApplication * @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 -
404 Not Found -
415 Unsupported Media Type -
*/ public CreatedApplication createApplicationForAccount(UUID id, AdminCreateApplicationRequest adminCreateApplicationRequest) throws ApiException { ApiResponse localVarResp = createApplicationForAccountWithHttpInfo(id, adminCreateApplicationRequest); return localVarResp.getData(); } /** * * Create an `application` for an `account`. * @param id The `account` ID. (required) * @param adminCreateApplicationRequest (required) * @return ApiResponse<CreatedApplication> * @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 -
404 Not Found -
415 Unsupported Media Type -
*/ public ApiResponse createApplicationForAccountWithHttpInfo(UUID id, AdminCreateApplicationRequest adminCreateApplicationRequest) throws ApiException { okhttp3.Call localVarCall = createApplicationForAccountValidateBeforeCall(id, adminCreateApplicationRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Create an `application` for an `account`. * @param id The `account` ID. (required) * @param adminCreateApplicationRequest (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 -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call createApplicationForAccountAsync(UUID id, AdminCreateApplicationRequest adminCreateApplicationRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createApplicationForAccountValidateBeforeCall(id, adminCreateApplicationRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteAccount * @param id The `account` 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
204 No Content -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call deleteAccountCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/accounts/{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[] { "OAuth2Internal" }; return localVarApiClient.buildCall(localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call deleteAccountValidateBeforeCall(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 deleteAccount(Async)"); } okhttp3.Call localVarCall = deleteAccountCall(id, _callback); return localVarCall; } /** * * Delete an `account`. * @param id The `account` ID. (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 -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public void deleteAccount(UUID id) throws ApiException { deleteAccountWithHttpInfo(id); } /** * * Delete an `account`. * @param id The `account` ID. (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 -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public ApiResponse deleteAccountWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = deleteAccountValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * Delete an `account`. * @param id The `account` 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
204 No Content -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call deleteAccountAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteAccountValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getAccount * @param id The `account` 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 getAccountCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/accounts/{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[] { "OAuth2Internal" }; return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getAccountValidateBeforeCall(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 getAccount(Async)"); } okhttp3.Call localVarCall = getAccountCall(id, _callback); return localVarCall; } /** * * Get an `account`. * @param id The `account` ID. (required) * @return Account * @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 Account getAccount(UUID id) throws ApiException { ApiResponse localVarResp = getAccountWithHttpInfo(id); return localVarResp.getData(); } /** * * Get an `account`. * @param id The `account` ID. (required) * @return ApiResponse<Account> * @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 getAccountWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = getAccountValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Get an `account`. * @param id The `account` 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 getAccountAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getAccountValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateAccount * @param id The `account` ID. (required) * @param updateAccountRequest (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 -
400 Bad Request -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call updateAccountCall(UUID id, UpdateAccountRequest updateAccountRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = updateAccountRequest; // create path and map variables String localVarPath = "/accounts/{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/vnd.api+json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); localVarHeaderParams.put("Content-Type", localVarContentType); String[] localVarAuthNames = new String[] { "OAuth2Internal" }; return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateAccountValidateBeforeCall(UUID id, UpdateAccountRequest updateAccountRequest, 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 updateAccount(Async)"); } // verify the required parameter 'updateAccountRequest' is set if (updateAccountRequest == null) { throw new ApiException("Missing the required parameter 'updateAccountRequest' when calling updateAccount(Async)"); } okhttp3.Call localVarCall = updateAccountCall(id, updateAccountRequest, _callback); return localVarCall; } /** * * Update an `account`. * @param id The `account` ID. (required) * @param updateAccountRequest (required) * @return Account * @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 -
400 Bad Request -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public Account updateAccount(UUID id, UpdateAccountRequest updateAccountRequest) throws ApiException { ApiResponse localVarResp = updateAccountWithHttpInfo(id, updateAccountRequest); return localVarResp.getData(); } /** * * Update an `account`. * @param id The `account` ID. (required) * @param updateAccountRequest (required) * @return ApiResponse<Account> * @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 -
400 Bad Request -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public ApiResponse updateAccountWithHttpInfo(UUID id, UpdateAccountRequest updateAccountRequest) throws ApiException { okhttp3.Call localVarCall = updateAccountValidateBeforeCall(id, updateAccountRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Update an `account`. * @param id The `account` ID. (required) * @param updateAccountRequest (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 -
400 Bad Request -
401 Unauthorized -
404 Not Found -
415 Unsupported Media Type -
*/ public okhttp3.Call updateAccountAsync(UUID id, UpdateAccountRequest updateAccountRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateAccountValidateBeforeCall(id, updateAccountRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy