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.
package com.seeq.api;
import com.seeq.ApiException;
import com.seeq.ApiClient;
import com.seeq.Configuration;
import com.seeq.model.*;
import com.seeq.Pair;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.ProcessingException;
import com.seeq.model.AssetGroupInputV1;
import com.seeq.model.AssetGroupOutputV1;
import com.seeq.model.AssetTreeBatchInputV1;
import com.seeq.model.AssetTreeOutputV1;
import com.seeq.model.ItemBatchOutputV1;
import com.seeq.model.ItemIdListInputV1;
import com.seeq.model.ItemPreviewListV1;
import com.seeq.model.ScaleAcrossTreeOutputV1;
import com.seeq.model.StatusMessageBase;
import com.seeq.model.TreemapOutputV1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TreesApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public TreesApi() {
this(Configuration.getDefaultApiClient());
}
public TreesApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public void setRetryTimeout(long retryTimeout) {
this.retryTimeout = retryTimeout;
}
public long getRetryTimeout() {
return this.retryTimeout;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Add the specified items as child nodes of the specified parents within the specified tree. If an item is already a member of this tree, it will move from its current parent to the specified parent. The children of the items being moved will move with each parent.
*
* @param body (optional)
* @return ItemBatchOutputV1
* @throws ApiException if fails to make API call
*/
public ItemBatchOutputV1 batchMoveNodesToParents(AssetTreeBatchInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = batchMoveNodesToParentsWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Add the specified items as child nodes of the specified parents within the specified tree. If an item is already a member of this tree, it will move from its current parent to the specified parent. The children of the items being moved will move with each parent.
*
* @param body (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse batchMoveNodesToParentsWithHttpInfo(AssetTreeBatchInputV1 body) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/trees/assets/batch";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Create or update an asset tree
*
* @param body (optional)
* @return AssetGroupOutputV1
* @throws ApiException if fails to make API call
*/
public AssetGroupOutputV1 createTree(AssetGroupInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createTreeWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create or update an asset tree
*
* @param body (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createTreeWithHttpInfo(AssetGroupInputV1 body) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/trees/assets/createTree";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a collection of all available tree types
*
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @return ItemPreviewListV1
* @throws ApiException if fails to make API call
*/
public ItemPreviewListV1 getAllTreeTypes(Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getAllTreeTypesWithHttpInfo(offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a collection of all available tree types
*
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getAllTreeTypesWithHttpInfo(Integer offset, Integer limit) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/trees";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get the ancestors and children of the specified item within the context of this tree
*
* @param id ID of the parent asset (required)
* @param scope The IDs of the workbooks to which the items are scoped<br>If scope is set to the Empty GUID then the scoped items are excluded. (optional)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param includeDescendants If the children of the children should be retrieved (optional, default to false)
* @param excludeGloballyScoped Exclude globally scoped items. (optional, default to false)
* @return AssetTreeOutputV1
* @throws ApiException if fails to make API call
*/
public AssetTreeOutputV1 getTree(String id, List scope, Integer offset, Integer limit, Boolean includeDescendants, Boolean excludeGloballyScoped) throws ApiException {
ApiClient.ApiResponse localVarResponse = getTreeWithHttpInfo(id, scope, offset, limit, includeDescendants, excludeGloballyScoped);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get the ancestors and children of the specified item within the context of this tree
*
* @param id ID of the parent asset (required)
* @param scope The IDs of the workbooks to which the items are scoped<br>If scope is set to the Empty GUID then the scoped items are excluded. (optional)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param includeDescendants If the children of the children should be retrieved (optional, default to false)
* @param excludeGloballyScoped Exclude globally scoped items. (optional, default to false)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTreeWithHttpInfo(String id, List scope, Integer offset, Integer limit, Boolean includeDescendants, Boolean excludeGloballyScoped) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling getTree");
}
// create path and map variables
String localVarPath = "/trees/assets/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "scope", scope));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "includeDescendants", includeDescendants));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "excludeGloballyScoped", excludeGloballyScoped));
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Get a collection of root nodes for the asset tree
*
* @param scope The IDs of the workbooks to which the items are scoped<br>If the scope is set to the Empty GUID, then the scoped items are excluded. (optional)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param properties A list of property names and values to filter on. Arguments should be passed in in the following format Property=Value, with each new property-value pair on a new line. The option to filter out a node by a property can be done by using !=. (optional)
* @param excludeGloballyScoped Exclude globally scoped items. (optional, default to false)
* @return AssetTreeOutputV1
* @throws ApiException if fails to make API call
*/
public AssetTreeOutputV1 getTreeRootNodes(List scope, Integer offset, Integer limit, List properties, Boolean excludeGloballyScoped) throws ApiException {
ApiClient.ApiResponse localVarResponse = getTreeRootNodesWithHttpInfo(scope, offset, limit, properties, excludeGloballyScoped);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a collection of root nodes for the asset tree
*
* @param scope The IDs of the workbooks to which the items are scoped<br>If the scope is set to the Empty GUID, then the scoped items are excluded. (optional)
* @param offset The pagination offset, the index of the first collection item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of collection items that will be returned in this page of results (optional, default to 40)
* @param properties A list of property names and values to filter on. Arguments should be passed in in the following format Property=Value, with each new property-value pair on a new line. The option to filter out a node by a property can be done by using !=. (optional)
* @param excludeGloballyScoped Exclude globally scoped items. (optional, default to false)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTreeRootNodesWithHttpInfo(List scope, Integer offset, Integer limit, List properties, Boolean excludeGloballyScoped) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/trees/assets";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "scope", scope));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "properties", properties));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "excludeGloballyScoped", excludeGloballyScoped));
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Add the specified items as child nodes of the specified parent within the specified tree. If an item is already a member of this tree, it will move from its current parent to the specified parent. The children of the item being moved will move with it.
*
* @param parentId ID of the parent node (required)
* @param body Item list (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase moveNodesToParent(String parentId, ItemIdListInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = moveNodesToParentWithHttpInfo(parentId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Add the specified items as child nodes of the specified parent within the specified tree. If an item is already a member of this tree, it will move from its current parent to the specified parent. The children of the item being moved will move with it.
*
* @param parentId ID of the parent node (required)
* @param body Item list (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse moveNodesToParentWithHttpInfo(String parentId, ItemIdListInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'parentId' is set
if (parentId == null) {
throw new ApiException(400, "Missing the required parameter 'parentId' when calling moveNodesToParent");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling moveNodesToParent");
}
// create path and map variables
String localVarPath = "/trees/assets/{parentId}"
.replaceAll("\\{" + "parentId" + "\\}", apiClient.escapeString(parentId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Add the specified items as root nodes of the specified tree. If an item is already a member of this tree, it will move to the root and its children will move with it
*
* @param body Item list (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase moveNodesToRootOfTree(ItemIdListInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = moveNodesToRootOfTreeWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Add the specified items as root nodes of the specified tree. If an item is already a member of this tree, it will move to the root and its children will move with it
*
* @param body Item list (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse moveNodesToRootOfTreeWithHttpInfo(ItemIdListInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling moveNodesToRootOfTree");
}
// create path and map variables
String localVarPath = "/trees/assets";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Trigger a rebuild of an asset tree search index in the background, starting at the specified root asset. This can be a time consuming and resource intensive operation, especially on large trees. The reindexing is performed in the background, and the API call will return as soon as the rebuild has been triggered.
*
* @param rootAssetId ID the root asset of the tree to rebuild (required)
* @throws ApiException if fails to make API call
*/
public void rebuildSearchIndex(String rootAssetId) throws ApiException {
rebuildSearchIndexWithHttpInfo(rootAssetId);
}
/**
* Trigger a rebuild of an asset tree search index in the background, starting at the specified root asset. This can be a time consuming and resource intensive operation, especially on large trees. The reindexing is performed in the background, and the API call will return as soon as the rebuild has been triggered.
*
* @param rootAssetId ID the root asset of the tree to rebuild (required)
* @throws ApiException if fails to make API call
*/
public void rebuildSearchIndexWithHttpInfo(String rootAssetId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'rootAssetId' is set
if (rootAssetId == null) {
throw new ApiException(400, "Missing the required parameter 'rootAssetId' when calling rebuildSearchIndex");
}
// create path and map variables
String localVarPath = "/trees/assets/{rootAssetId}/rebuildSearchIndex"
.replaceAll("\\{" + "rootAssetId" + "\\}", apiClient.escapeString(rootAssetId.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
return;
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Remove an item and its children from the tree. (These items will still exist but not as part of this tree.)
*
* @param id ID of the node to remove (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase removeNodeFromTree(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = removeNodeFromTreeWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Remove an item and its children from the tree. (These items will still exist but not as part of this tree.)
*
* @param id ID of the node to remove (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse removeNodeFromTreeWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling removeNodeFromTree");
}
// create path and map variables
String localVarPath = "/trees/assets/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Scale a tree item across its asset tree. Asset-swapped copies of the item will be inserted under all assets at the same tree level as its current parent.
*
* @param id ID of the item to be scaled (required)
* @return ScaleAcrossTreeOutputV1
* @throws ApiException if fails to make API call
*/
public ScaleAcrossTreeOutputV1 scaleAcrossTree(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = scaleAcrossTreeWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Scale a tree item across its asset tree. Asset-swapped copies of the item will be inserted under all assets at the same tree level as its current parent.
*
* @param id ID of the item to be scaled (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse scaleAcrossTreeWithHttpInfo(String id) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling scaleAcrossTree");
}
// create path and map variables
String localVarPath = "/trees/assets/{id}/scale"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Build a treemap
*
* @param start The start time under which to compute conditions for the treemap. (required)
* @param end The end time under which to compute conditions for the treemap. (required)
* @param conditionIds The IDs of the conditions that will be used to create the treemap; must be in order of priority, where the first condition is the highest priority item. (required)
* @param swapId The ID of the asset to swap each treemap leaf node with. (required)
* @param parentId The ID of the parent asset to build the treemap from. (required)
* @param parameters Parameters for the display formulas. Each parameter should have a format of 'name=id' where 'name' is the variable identifier, without the leading $ sign, and 'id' is the ID of the item referenced by the variable (optional)
* @param formulas A list of display scalar formulas (optional)
* @return TreemapOutputV1
* @throws ApiException if fails to make API call
*/
public TreemapOutputV1 treemap(String start, String end, List conditionIds, String swapId, String parentId, List parameters, List formulas) throws ApiException {
ApiClient.ApiResponse localVarResponse = treemapWithHttpInfo(start, end, conditionIds, swapId, parentId, parameters, formulas);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Build a treemap
*
* @param start The start time under which to compute conditions for the treemap. (required)
* @param end The end time under which to compute conditions for the treemap. (required)
* @param conditionIds The IDs of the conditions that will be used to create the treemap; must be in order of priority, where the first condition is the highest priority item. (required)
* @param swapId The ID of the asset to swap each treemap leaf node with. (required)
* @param parentId The ID of the parent asset to build the treemap from. (required)
* @param parameters Parameters for the display formulas. Each parameter should have a format of 'name=id' where 'name' is the variable identifier, without the leading $ sign, and 'id' is the ID of the item referenced by the variable (optional)
* @param formulas A list of display scalar formulas (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse treemapWithHttpInfo(String start, String end, List conditionIds, String swapId, String parentId, List parameters, List formulas) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'start' is set
if (start == null) {
throw new ApiException(400, "Missing the required parameter 'start' when calling treemap");
}
// verify the required parameter 'end' is set
if (end == null) {
throw new ApiException(400, "Missing the required parameter 'end' when calling treemap");
}
// verify the required parameter 'conditionIds' is set
if (conditionIds == null) {
throw new ApiException(400, "Missing the required parameter 'conditionIds' when calling treemap");
}
// verify the required parameter 'swapId' is set
if (swapId == null) {
throw new ApiException(400, "Missing the required parameter 'swapId' when calling treemap");
}
// verify the required parameter 'parentId' is set
if (parentId == null) {
throw new ApiException(400, "Missing the required parameter 'parentId' when calling treemap");
}
// create path and map variables
String localVarPath = "/trees/treemap";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "start", start));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "end", end));
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "conditionIds", conditionIds));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "swapId", swapId));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "parentId", parentId));
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "parameters", parameters));
localVarQueryParams.addAll(apiClient.parameterToPairs("multi", "formulas", formulas));
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "GET", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Update an asset tree
*
* @param body (optional)
* @return AssetGroupOutputV1
* @throws ApiException if fails to make API call
*/
public AssetGroupOutputV1 updateTree(AssetGroupInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = updateTreeWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update an asset tree
*
* @param body (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateTreeWithHttpInfo(AssetGroupInputV1 body) throws ApiException {
Object localVarPostBody = body;
// create path and map variables
String localVarPath = "/trees/assets/updateTree";
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", localVarQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
}