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

com.vertexvis.api.WebhookSubscriptionsApi 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.CreateWebhookSubscriptionRequest;
import com.vertexvis.model.Failure;
import java.util.UUID;
import com.vertexvis.model.UpdateWebhookSubscriptionRequest;
import com.vertexvis.model.WebhookSubscription;
import com.vertexvis.model.WebhookSubscriptionList;

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

public class WebhookSubscriptionsApi {
    private ApiClient localVarApiClient;

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

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

    public ApiClient getApiClient() {
        return localVarApiClient;
    }

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

    /**
     * Build call for createWebhookSubscription
     * @param createWebhookSubscriptionRequest  (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 -
401 Unauthorized -
415 Unsupported Media Type -
*/ public okhttp3.Call createWebhookSubscriptionCall(CreateWebhookSubscriptionRequest createWebhookSubscriptionRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = createWebhookSubscriptionRequest; // create path and map variables String localVarPath = "/webhook-subscriptions"; 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 createWebhookSubscriptionValidateBeforeCall(CreateWebhookSubscriptionRequest createWebhookSubscriptionRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'createWebhookSubscriptionRequest' is set if (createWebhookSubscriptionRequest == null) { throw new ApiException("Missing the required parameter 'createWebhookSubscriptionRequest' when calling createWebhookSubscription(Async)"); } okhttp3.Call localVarCall = createWebhookSubscriptionCall(createWebhookSubscriptionRequest, _callback); return localVarCall; } /** * * Create a `webhook-subscription` * @param createWebhookSubscriptionRequest (required) * @return WebhookSubscription * @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 -
401 Unauthorized -
415 Unsupported Media Type -
*/ public WebhookSubscription createWebhookSubscription(CreateWebhookSubscriptionRequest createWebhookSubscriptionRequest) throws ApiException { ApiResponse localVarResp = createWebhookSubscriptionWithHttpInfo(createWebhookSubscriptionRequest); return localVarResp.getData(); } /** * * Create a `webhook-subscription` * @param createWebhookSubscriptionRequest (required) * @return ApiResponse<WebhookSubscription> * @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 -
401 Unauthorized -
415 Unsupported Media Type -
*/ public ApiResponse createWebhookSubscriptionWithHttpInfo(CreateWebhookSubscriptionRequest createWebhookSubscriptionRequest) throws ApiException { okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(createWebhookSubscriptionRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Create a `webhook-subscription` * @param createWebhookSubscriptionRequest (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 -
401 Unauthorized -
415 Unsupported Media Type -
*/ public okhttp3.Call createWebhookSubscriptionAsync(CreateWebhookSubscriptionRequest createWebhookSubscriptionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = createWebhookSubscriptionValidateBeforeCall(createWebhookSubscriptionRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for deleteWebhookSubscription * @param id The `webhook-subscription` 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 deleteWebhookSubscriptionCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/webhook-subscriptions/{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 deleteWebhookSubscriptionValidateBeforeCall(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 deleteWebhookSubscription(Async)"); } okhttp3.Call localVarCall = deleteWebhookSubscriptionCall(id, _callback); return localVarCall; } /** * * Delete a `webhook-subscription`. * @param id The `webhook-subscription` 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 deleteWebhookSubscription(UUID id) throws ApiException { deleteWebhookSubscriptionWithHttpInfo(id); } /** * * Delete a `webhook-subscription`. * @param id The `webhook-subscription` 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 deleteWebhookSubscriptionWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(id, null); return localVarApiClient.execute(localVarCall); } /** * (asynchronously) * Delete a `webhook-subscription`. * @param id The `webhook-subscription` 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 deleteWebhookSubscriptionAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = deleteWebhookSubscriptionValidateBeforeCall(id, _callback); localVarApiClient.executeAsync(localVarCall, _callback); return localVarCall; } /** * Build call for getWebhookSubscription * @param id The `webhook-subscription` 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 getWebhookSubscriptionCall(UUID id, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/webhook-subscriptions/{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 getWebhookSubscriptionValidateBeforeCall(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 getWebhookSubscription(Async)"); } okhttp3.Call localVarCall = getWebhookSubscriptionCall(id, _callback); return localVarCall; } /** * * Get a `webhook-subscription`. * @param id The `webhook-subscription` ID. (required) * @return WebhookSubscription * @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 WebhookSubscription getWebhookSubscription(UUID id) throws ApiException { ApiResponse localVarResp = getWebhookSubscriptionWithHttpInfo(id); return localVarResp.getData(); } /** * * Get a `webhook-subscription`. * @param id The `webhook-subscription` ID. (required) * @return ApiResponse<WebhookSubscription> * @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 getWebhookSubscriptionWithHttpInfo(UUID id) throws ApiException { okhttp3.Call localVarCall = getWebhookSubscriptionValidateBeforeCall(id, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Get a `webhook-subscription`. * @param id The `webhook-subscription` 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 getWebhookSubscriptionAsync(UUID id, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWebhookSubscriptionValidateBeforeCall(id, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for getWebhookSubscriptions * @param pageCursor The cursor for the next page of items. (optional) * @param pageSize The number of items to return. (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 getWebhookSubscriptionsCall(String pageCursor, Integer pageSize, final ApiCallback _callback) throws ApiException { Object localVarPostBody = null; // create path and map variables String localVarPath = "/webhook-subscriptions"; 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)); } 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 getWebhookSubscriptionsValidateBeforeCall(String pageCursor, Integer pageSize, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWebhookSubscriptionsCall(pageCursor, pageSize, _callback); return localVarCall; } /** * * Get `webhook-subscription`s. * @param pageCursor The cursor for the next page of items. (optional) * @param pageSize The number of items to return. (optional) * @return WebhookSubscriptionList * @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 WebhookSubscriptionList getWebhookSubscriptions(String pageCursor, Integer pageSize) throws ApiException { ApiResponse localVarResp = getWebhookSubscriptionsWithHttpInfo(pageCursor, pageSize); return localVarResp.getData(); } /** * * Get `webhook-subscription`s. * @param pageCursor The cursor for the next page of items. (optional) * @param pageSize The number of items to return. (optional) * @return ApiResponse<WebhookSubscriptionList> * @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 getWebhookSubscriptionsWithHttpInfo(String pageCursor, Integer pageSize) throws ApiException { okhttp3.Call localVarCall = getWebhookSubscriptionsValidateBeforeCall(pageCursor, pageSize, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Get `webhook-subscription`s. * @param pageCursor The cursor for the next page of items. (optional) * @param pageSize The number of items to return. (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 getWebhookSubscriptionsAsync(String pageCursor, Integer pageSize, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getWebhookSubscriptionsValidateBeforeCall(pageCursor, pageSize, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } /** * Build call for updateWebhookSubscription * @param id The `webhook-subscription` ID. (required) * @param updateWebhookSubscriptionRequest (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 updateWebhookSubscriptionCall(UUID id, UpdateWebhookSubscriptionRequest updateWebhookSubscriptionRequest, final ApiCallback _callback) throws ApiException { Object localVarPostBody = updateWebhookSubscriptionRequest; // create path and map variables String localVarPath = "/webhook-subscriptions/{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[] { "OAuth2" }; return localVarApiClient.buildCall(localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call updateWebhookSubscriptionValidateBeforeCall(UUID id, UpdateWebhookSubscriptionRequest updateWebhookSubscriptionRequest, 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 updateWebhookSubscription(Async)"); } // verify the required parameter 'updateWebhookSubscriptionRequest' is set if (updateWebhookSubscriptionRequest == null) { throw new ApiException("Missing the required parameter 'updateWebhookSubscriptionRequest' when calling updateWebhookSubscription(Async)"); } okhttp3.Call localVarCall = updateWebhookSubscriptionCall(id, updateWebhookSubscriptionRequest, _callback); return localVarCall; } /** * * Update a `webhook-subscription`. * @param id The `webhook-subscription` ID. (required) * @param updateWebhookSubscriptionRequest (required) * @return WebhookSubscription * @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 WebhookSubscription updateWebhookSubscription(UUID id, UpdateWebhookSubscriptionRequest updateWebhookSubscriptionRequest) throws ApiException { ApiResponse localVarResp = updateWebhookSubscriptionWithHttpInfo(id, updateWebhookSubscriptionRequest); return localVarResp.getData(); } /** * * Update a `webhook-subscription`. * @param id The `webhook-subscription` ID. (required) * @param updateWebhookSubscriptionRequest (required) * @return ApiResponse<WebhookSubscription> * @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 updateWebhookSubscriptionWithHttpInfo(UUID id, UpdateWebhookSubscriptionRequest updateWebhookSubscriptionRequest) throws ApiException { okhttp3.Call localVarCall = updateWebhookSubscriptionValidateBeforeCall(id, updateWebhookSubscriptionRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } /** * (asynchronously) * Update a `webhook-subscription`. * @param id The `webhook-subscription` ID. (required) * @param updateWebhookSubscriptionRequest (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 updateWebhookSubscriptionAsync(UUID id, UpdateWebhookSubscriptionRequest updateWebhookSubscriptionRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = updateWebhookSubscriptionValidateBeforeCall(id, updateWebhookSubscriptionRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy