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.
/*
* Piiano Vault REST API
* --- sidebar_position: 1 sidebar_label: Overview description: The Piiano Vault REST API enables you to access and manage collections, objects, tokens, users, policies, and other resources within Piiano Vault. slug: / --- # Introduction The Piiano Vault REST API enables you to access and manage collections, objects, tokens, users, policies, and other resources within Piiano Vault in a simple, programmatic way using conventional HTTP requests and standard HTTP response codes. The API follows RESTful conventions when possible, with most operations performed by `GET`, `POST`, `PUT`, `PATCH`, and `DELETE` requests. Request and response bodies are [JSON-encoded](https://www.json.org/json-en.html). However, for collection operations, an SQL-like [PVSchema](/guides/reference/pvschema) encoding is available. This API reference provides details for each operation available in the API. When you install a local copy of Vault, you can try each operation using **Send API request**. An OpenAPI specification is available in [YAML](@site/static/assets/openapi.yaml) and [JSON](@site/static/assets/openapi.json) formats and can be used to generate client code for the API.
*
* The version of the OpenAPI document: 1.0
*
*
* 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.piiano.vault.client.openapi;
import com.piiano.vault.client.openapi.ApiCallback;
import com.piiano.vault.client.openapi.ApiClient;
import com.piiano.vault.client.openapi.ApiException;
import com.piiano.vault.client.openapi.ApiResponse;
import com.piiano.vault.client.openapi.Configuration;
import com.piiano.vault.client.openapi.Pair;
import com.piiano.vault.client.openapi.ProgressRequestBody;
import com.piiano.vault.client.openapi.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import com.piiano.vault.client.openapi.model.Bundle;
import com.piiano.vault.client.openapi.model.PartialBundle;
import com.piiano.vault.client.openapi.model.RestHTTPError;
import java.util.Set;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.ws.rs.core.GenericType;
public class BundlesApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public BundlesApi() {
this(Configuration.getDefaultApiClient());
}
public BundlesApi(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;
}
/**
* Build call for addBundle
* @param bundle Details of the bundle including the code that defines the functions as properties of the exports object. (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
Reserved for future use.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call addBundleCall(Bundle bundle, final ApiCallback _callback) 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 = bundle;
// create path and map variables
String localVarPath = "/api/pvlt/1.0/ctl/bundles";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/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[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call addBundleValidateBeforeCall(Bundle bundle, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'bundle' is set
if (bundle == null) {
throw new ApiException("Missing the required parameter 'bundle' when calling addBundle(Async)");
}
return addBundleCall(bundle, _callback);
}
/**
* Add bundle
* Adds a bundle. The role performing this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle Details of the bundle including the code that defines the functions as properties of the exports object. (required)
* @return Bundle
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
Reserved for future use.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public Bundle addBundle(Bundle bundle) throws ApiException {
ApiResponse localVarResp = addBundleWithHttpInfo(bundle);
return localVarResp.getData();
}
/**
* Add bundle
* Adds a bundle. The role performing this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle Details of the bundle including the code that defines the functions as properties of the exports object. (required)
* @return ApiResponse<Bundle>
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
Reserved for future use.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public ApiResponse addBundleWithHttpInfo(Bundle bundle) throws ApiException {
okhttp3.Call localVarCall = addBundleValidateBeforeCall(bundle, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Add bundle (asynchronously)
* Adds a bundle. The role performing this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle Details of the bundle including the code that defines the functions as properties of the exports object. (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
Reserved for future use.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call addBundleAsync(Bundle bundle, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = addBundleValidateBeforeCall(bundle, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for deleteBundle
* @param bundle (required)
* @param options Options for the operation. Options include: - `force` – delete the bundle if there is an unused data type referencing it. An unused data type is one that is not used in any object schema. When the bundle is deleted, the data type referencing it is also deleted. (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call deleteBundleCall(String bundle, Set options, final ApiCallback _callback) 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/pvlt/1.0/ctl/bundles/{bundle}"
.replace("{" + "bundle" + "}", localVarApiClient.escapeString(bundle.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (options != null) {
localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "options", options));
}
final String[] localVarAccepts = {
"application/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[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "DELETE", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call deleteBundleValidateBeforeCall(String bundle, Set options, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'bundle' is set
if (bundle == null) {
throw new ApiException("Missing the required parameter 'bundle' when calling deleteBundle(Async)");
}
return deleteBundleCall(bundle, options, _callback);
}
/**
* Delete bundle
* Deletes a bundle. The role that performs this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @param options Options for the operation. Options include: - `force` – delete the bundle if there is an unused data type referencing it. An unused data type is one that is not used in any object schema. When the bundle is deleted, the data type referencing it is also deleted. (optional)
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public void deleteBundle(String bundle, Set options) throws ApiException {
deleteBundleWithHttpInfo(bundle, options);
}
/**
* Delete bundle
* Deletes a bundle. The role that performs this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @param options Options for the operation. Options include: - `force` – delete the bundle if there is an unused data type referencing it. An unused data type is one that is not used in any object schema. When the bundle is deleted, the data type referencing it is also deleted. (optional)
* @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
200
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public ApiResponse deleteBundleWithHttpInfo(String bundle, Set options) throws ApiException {
okhttp3.Call localVarCall = deleteBundleValidateBeforeCall(bundle, options, null);
return localVarApiClient.execute(localVarCall);
}
/**
* Delete bundle (asynchronously)
* Deletes a bundle. The role that performs this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @param options Options for the operation. Options include: - `force` – delete the bundle if there is an unused data type referencing it. An unused data type is one that is not used in any object schema. When the bundle is deleted, the data type referencing it is also deleted. (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call deleteBundleAsync(String bundle, Set options, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = deleteBundleValidateBeforeCall(bundle, options, _callback);
localVarApiClient.executeAsync(localVarCall, _callback);
return localVarCall;
}
/**
* Build call for getBundle
* @param bundle (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call getBundleCall(String bundle, final ApiCallback _callback) 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/pvlt/1.0/ctl/bundles/{bundle}"
.replace("{" + "bundle" + "}", localVarApiClient.escapeString(bundle.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/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[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getBundleValidateBeforeCall(String bundle, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'bundle' is set
if (bundle == null) {
throw new ApiException("Missing the required parameter 'bundle' when calling getBundle(Async)");
}
return getBundleCall(bundle, _callback);
}
/**
* Get bundle
* Gets a bundle. The role that performs this operation must have the `CapCodeReader` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @return Bundle
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public Bundle getBundle(String bundle) throws ApiException {
ApiResponse localVarResp = getBundleWithHttpInfo(bundle);
return localVarResp.getData();
}
/**
* Get bundle
* Gets a bundle. The role that performs this operation must have the `CapCodeReader` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @return ApiResponse<Bundle>
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public ApiResponse getBundleWithHttpInfo(String bundle) throws ApiException {
okhttp3.Call localVarCall = getBundleValidateBeforeCall(bundle, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Get bundle (asynchronously)
* Gets a bundle. The role that performs this operation must have the `CapCodeReader` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call getBundleAsync(String bundle, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getBundleValidateBeforeCall(bundle, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for listBundles
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call listBundlesCall(final ApiCallback _callback) 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/pvlt/1.0/ctl/bundles";
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/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[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call listBundlesValidateBeforeCall(final ApiCallback _callback) throws ApiException {
return listBundlesCall(_callback);
}
/**
* List bundles
* Lists the Vault bundles. The role that performs this operation must have the `CapCodeReader` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @return List<Bundle>
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public List listBundles() throws ApiException {
ApiResponse> localVarResp = listBundlesWithHttpInfo();
return localVarResp.getData();
}
/**
* List bundles
* Lists the Vault bundles. The role that performs this operation must have the `CapCodeReader` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @return ApiResponse<List<Bundle>>
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public ApiResponse> listBundlesWithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = listBundlesValidateBeforeCall(null);
Type localVarReturnType = new TypeToken>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* List bundles (asynchronously)
* Lists the Vault bundles. The role that performs this operation must have the `CapCodeReader` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The requested resource is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call listBundlesAsync(final ApiCallback> _callback) throws ApiException {
okhttp3.Call localVarCall = listBundlesValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for updateBundle
* @param bundle (required)
* @param partialBundle Details of the bundle including the code that defines the functions as properties of the exports object. Name can't be updated. (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call updateBundleCall(String bundle, PartialBundle partialBundle, final ApiCallback _callback) 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 = partialBundle;
// create path and map variables
String localVarPath = "/api/pvlt/1.0/ctl/bundles/{bundle}"
.replace("{" + "bundle" + "}", localVarApiClient.escapeString(bundle.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/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[] { "bearerAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call updateBundleValidateBeforeCall(String bundle, PartialBundle partialBundle, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'bundle' is set
if (bundle == null) {
throw new ApiException("Missing the required parameter 'bundle' when calling updateBundle(Async)");
}
// verify the required parameter 'partialBundle' is set
if (partialBundle == null) {
throw new ApiException("Missing the required parameter 'partialBundle' when calling updateBundle(Async)");
}
return updateBundleCall(bundle, partialBundle, _callback);
}
/**
* Update bundle
* Updates a bundle. An update is allowed only if the prototypes of the JavaScript functions in the request are a superset of those in the bundle. The name of the bundle can't be updated. The role performing this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @param partialBundle Details of the bundle including the code that defines the functions as properties of the exports object. Name can't be updated. (required)
* @return Bundle
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public Bundle updateBundle(String bundle, PartialBundle partialBundle) throws ApiException {
ApiResponse localVarResp = updateBundleWithHttpInfo(bundle, partialBundle);
return localVarResp.getData();
}
/**
* Update bundle
* Updates a bundle. An update is allowed only if the prototypes of the JavaScript functions in the request are a superset of those in the bundle. The name of the bundle can't be updated. The role performing this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @param partialBundle Details of the bundle including the code that defines the functions as properties of the exports object. Name can't be updated. (required)
* @return ApiResponse<Bundle>
* @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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public ApiResponse updateBundleWithHttpInfo(String bundle, PartialBundle partialBundle) throws ApiException {
okhttp3.Call localVarCall = updateBundleValidateBeforeCall(bundle, partialBundle, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* Update bundle (asynchronously)
* Updates a bundle. An update is allowed only if the prototypes of the JavaScript functions in the request are a superset of those in the bundle. The name of the bundle can't be updated. The role performing this operation must have the `CapCodeWriter` capability. See [Access control](/data-security/identity-and-access-management#access-control) for more information about how capabilities are used to control access to operations.
* @param bundle (required)
* @param partialBundle Details of the bundle including the code that defines the functions as properties of the exports object. Name can't be updated. (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
The request is successful.
-
400
The request is invalid.
-
401
Authentication credentials are incorrect or missing.
-
403
The caller doesn't have the required access rights.
-
404
The bundle is not found.
-
405
The operation is not allowed.
-
409
A conflict occurs.
-
410
Access to a resource that is no longer available occurs.
-
500
An error occurs on the server.
-
503
The service is unavailable.
-
*/
public okhttp3.Call updateBundleAsync(String bundle, PartialBundle partialBundle, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = updateBundleValidateBeforeCall(bundle, partialBundle, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}