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.ContextCommentInputV1;
import com.seeq.model.ContextCommentOutputV1;
import com.seeq.model.ContextLabelInputV1;
import com.seeq.model.ContextLabelOutputV1;
import com.seeq.model.ContextOpaqueInputV1;
import com.seeq.model.ContextOpaqueOutputV1;
import com.seeq.model.LabelCategoryInputV1;
import com.seeq.model.LabelCategoryOutputListV1;
import com.seeq.model.LabelCategoryOutputV1;
import com.seeq.model.LabelInputV1;
import com.seeq.model.LabelOutputListV1;
import com.seeq.model.LabelOutputV1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ContextApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public ContextApi() {
this(Configuration.getDefaultApiClient());
}
public ContextApi(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;
}
/**
* Create a new comment associated with an Item
*
* @param itemId ID of the item that the comment is associated with (required)
* @param body Context comment information (required)
* @return ContextCommentOutputV1
* @throws ApiException if fails to make API call
*/
public ContextCommentOutputV1 createContextComment(String itemId, ContextCommentInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createContextCommentWithHttpInfo(itemId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a new comment associated with an Item
*
* @param itemId ID of the item that the comment is associated with (required)
* @param body Context comment information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContextCommentWithHttpInfo(String itemId, ContextCommentInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createContextCommentWithHeadersAndHttpInfo(itemId, body, localVarHeaderParams);
}
/**
* Create a new comment associated with an Item
*
* @param itemId ID of the item that the comment is associated with (required)
* @param body Context comment information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContextCommentWithHeadersAndHttpInfo(String itemId, ContextCommentInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createContextCommentInternal(itemId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createContextCommentInternal(String itemId, ContextCommentInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling createContextComment");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createContextComment");
}
// create path and map variables
String localVarPath = "/context/{itemId}/comments"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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 a new label associated with an item
*
* @param itemId ID of the item that the label is associated with (required)
* @param body Context label information (required)
* @return ContextLabelOutputV1
* @throws ApiException if fails to make API call
*/
public ContextLabelOutputV1 createContextLabel(String itemId, ContextLabelInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createContextLabelWithHttpInfo(itemId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a new label associated with an item
*
* @param itemId ID of the item that the label is associated with (required)
* @param body Context label information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContextLabelWithHttpInfo(String itemId, ContextLabelInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createContextLabelWithHeadersAndHttpInfo(itemId, body, localVarHeaderParams);
}
/**
* Create a new label associated with an item
*
* @param itemId ID of the item that the label is associated with (required)
* @param body Context label information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContextLabelWithHeadersAndHttpInfo(String itemId, ContextLabelInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createContextLabelInternal(itemId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createContextLabelInternal(String itemId, ContextLabelInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling createContextLabel");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createContextLabel");
}
// create path and map variables
String localVarPath = "/context/{itemId}/labels"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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 new opaque context associated with an item
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param body Context opaque information (required)
* @return ContextOpaqueOutputV1
* @throws ApiException if fails to make API call
*/
public ContextOpaqueOutputV1 createContextOpaque(String itemId, ContextOpaqueInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createContextOpaqueWithHttpInfo(itemId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create new opaque context associated with an item
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param body Context opaque information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContextOpaqueWithHttpInfo(String itemId, ContextOpaqueInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createContextOpaqueWithHeadersAndHttpInfo(itemId, body, localVarHeaderParams);
}
/**
* Create new opaque context associated with an item
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param body Context opaque information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createContextOpaqueWithHeadersAndHttpInfo(String itemId, ContextOpaqueInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createContextOpaqueInternal(itemId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createContextOpaqueInternal(String itemId, ContextOpaqueInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling createContextOpaque");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createContextOpaque");
}
// create path and map variables
String localVarPath = "/context/{itemId}/opaque"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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 a new label
*
* @param body Label information (required)
* @return LabelOutputV1
* @throws ApiException if fails to make API call
*/
public LabelOutputV1 createLabel(LabelInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createLabelWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a new label
*
* @param body Label information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createLabelWithHttpInfo(LabelInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createLabelWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a new label
*
* @param body Label information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createLabelWithHeadersAndHttpInfo(LabelInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createLabelInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createLabelInternal(LabelInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createLabel");
}
// create path and map variables
String localVarPath = "/context/labels";
// query params
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", queryParams, localVarPostBody, headerParams, 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 a new label category
*
* @param body Label category information (required)
* @return LabelCategoryOutputV1
* @throws ApiException if fails to make API call
*/
public LabelCategoryOutputV1 createLabelCategory(LabelCategoryInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createLabelCategoryWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a new label category
*
* @param body Label category information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createLabelCategoryWithHttpInfo(LabelCategoryInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createLabelCategoryWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a new label category
*
* @param body Label category information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createLabelCategoryWithHeadersAndHttpInfo(LabelCategoryInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createLabelCategoryInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createLabelCategoryInternal(LabelCategoryInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling createLabelCategory");
}
// create path and map variables
String localVarPath = "/context/labels/categories";
// query params
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", queryParams, localVarPostBody, headerParams, 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
}
/**
* Delete or archive a comment
*
* @param itemId ID of the item that the comment is associated with (required)
* @param commentId The comment ID to be deleted (required)
* @param delete Permanently and irretrievably delete the comment (optional, default to false)
* @throws ApiException if fails to make API call
*/
public void deleteContextComment(String itemId, String commentId, Boolean delete) throws ApiException {
deleteContextCommentWithHttpInfo(itemId, commentId, delete);
}
/**
* Delete or archive a comment
*
* @param itemId ID of the item that the comment is associated with (required)
* @param commentId The comment ID to be deleted (required)
* @param delete Permanently and irretrievably delete the comment (optional, default to false)
* @throws ApiException if fails to make API call
*/
public void deleteContextCommentWithHttpInfo(String itemId, String commentId, Boolean delete) throws ApiException {
Map localVarHeaderParams = new HashMap();
deleteContextCommentWithHeadersAndHttpInfo(itemId, commentId, delete, localVarHeaderParams);
}
/**
* Delete or archive a comment
*
* @param itemId ID of the item that the comment is associated with (required)
* @param commentId The comment ID to be deleted (required)
* @param delete Permanently and irretrievably delete the comment (optional, default to false)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public void deleteContextCommentWithHeadersAndHttpInfo(String itemId, String commentId, Boolean delete, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "delete", delete));
localVarHeaderParams.putAll(customHeaders);
deleteContextCommentInternal(itemId, commentId, localVarQueryParams, localVarHeaderParams);
}
private void deleteContextCommentInternal(String itemId, String commentId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling deleteContextComment");
}
// verify the required path parameter 'commentId' is set
if (commentId == null) {
throw new ApiException(400, "Missing the required path parameter 'commentId' when calling deleteContextComment");
}
// create path and map variables
String localVarPath = "/context/{itemId}/comments/{commentId}"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()))
.replaceAll("\\{" + "commentId" + "\\}", apiClient.escapeString(commentId.toString()));
// query params
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 {
apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, 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
}
/**
* Delete or archive a label
*
* @param itemId ID of the item that the label is associated with (required)
* @param labelId The context label ID to be deleted (required)
* @throws ApiException if fails to make API call
*/
public void deleteContextLabel(String itemId, String labelId) throws ApiException {
deleteContextLabelWithHttpInfo(itemId, labelId);
}
/**
* Delete or archive a label
*
* @param itemId ID of the item that the label is associated with (required)
* @param labelId The context label ID to be deleted (required)
* @throws ApiException if fails to make API call
*/
public void deleteContextLabelWithHttpInfo(String itemId, String labelId) throws ApiException {
Map localVarHeaderParams = new HashMap();
deleteContextLabelWithHeadersAndHttpInfo(itemId, labelId, localVarHeaderParams);
}
/**
* Delete or archive a label
*
* @param itemId ID of the item that the label is associated with (required)
* @param labelId The context label ID to be deleted (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public void deleteContextLabelWithHeadersAndHttpInfo(String itemId, String labelId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
deleteContextLabelInternal(itemId, labelId, localVarQueryParams, localVarHeaderParams);
}
private void deleteContextLabelInternal(String itemId, String labelId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling deleteContextLabel");
}
// verify the required path parameter 'labelId' is set
if (labelId == null) {
throw new ApiException(400, "Missing the required path parameter 'labelId' when calling deleteContextLabel");
}
// create path and map variables
String localVarPath = "/context/{itemId}/labels/{labelId}"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()))
.replaceAll("\\{" + "labelId" + "\\}", apiClient.escapeString(labelId.toString()));
// query params
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 {
apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, 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
}
/**
* Delete or archive opaque context
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param opaqueId The opaque ID to be deleted (required)
* @param delete Permanently and irretrievably delete the opaque context (optional, default to false)
* @throws ApiException if fails to make API call
*/
public void deleteContextOpaque(String itemId, String opaqueId, Boolean delete) throws ApiException {
deleteContextOpaqueWithHttpInfo(itemId, opaqueId, delete);
}
/**
* Delete or archive opaque context
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param opaqueId The opaque ID to be deleted (required)
* @param delete Permanently and irretrievably delete the opaque context (optional, default to false)
* @throws ApiException if fails to make API call
*/
public void deleteContextOpaqueWithHttpInfo(String itemId, String opaqueId, Boolean delete) throws ApiException {
Map localVarHeaderParams = new HashMap();
deleteContextOpaqueWithHeadersAndHttpInfo(itemId, opaqueId, delete, localVarHeaderParams);
}
/**
* Delete or archive opaque context
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param opaqueId The opaque ID to be deleted (required)
* @param delete Permanently and irretrievably delete the opaque context (optional, default to false)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public void deleteContextOpaqueWithHeadersAndHttpInfo(String itemId, String opaqueId, Boolean delete, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "delete", delete));
localVarHeaderParams.putAll(customHeaders);
deleteContextOpaqueInternal(itemId, opaqueId, localVarQueryParams, localVarHeaderParams);
}
private void deleteContextOpaqueInternal(String itemId, String opaqueId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling deleteContextOpaque");
}
// verify the required path parameter 'opaqueId' is set
if (opaqueId == null) {
throw new ApiException(400, "Missing the required path parameter 'opaqueId' when calling deleteContextOpaque");
}
// create path and map variables
String localVarPath = "/context/{itemId}/opaque/{opaqueId}"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()))
.replaceAll("\\{" + "opaqueId" + "\\}", apiClient.escapeString(opaqueId.toString()));
// query params
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 {
apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, 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
}
/**
* Delete a specific label.
*
* @param labelId ID of the label (required)
* @throws ApiException if fails to make API call
*/
public void deleteLabel(String labelId) throws ApiException {
deleteLabelWithHttpInfo(labelId);
}
/**
* Delete a specific label.
*
* @param labelId ID of the label (required)
* @throws ApiException if fails to make API call
*/
public void deleteLabelWithHttpInfo(String labelId) throws ApiException {
Map localVarHeaderParams = new HashMap();
deleteLabelWithHeadersAndHttpInfo(labelId, localVarHeaderParams);
}
/**
* Delete a specific label.
*
* @param labelId ID of the label (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public void deleteLabelWithHeadersAndHttpInfo(String labelId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
deleteLabelInternal(labelId, localVarQueryParams, localVarHeaderParams);
}
private void deleteLabelInternal(String labelId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'labelId' is set
if (labelId == null) {
throw new ApiException(400, "Missing the required path parameter 'labelId' when calling deleteLabel");
}
// create path and map variables
String localVarPath = "/context/labels/{labelId}"
.replaceAll("\\{" + "labelId" + "\\}", apiClient.escapeString(labelId.toString()));
// query params
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 {
apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, 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
}
/**
* Delete a specific label category.
*
* @param categoryId ID of the category (required)
* @throws ApiException if fails to make API call
*/
public void deleteLabelCategory(String categoryId) throws ApiException {
deleteLabelCategoryWithHttpInfo(categoryId);
}
/**
* Delete a specific label category.
*
* @param categoryId ID of the category (required)
* @throws ApiException if fails to make API call
*/
public void deleteLabelCategoryWithHttpInfo(String categoryId) throws ApiException {
Map localVarHeaderParams = new HashMap();
deleteLabelCategoryWithHeadersAndHttpInfo(categoryId, localVarHeaderParams);
}
/**
* Delete a specific label category.
*
* @param categoryId ID of the category (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public void deleteLabelCategoryWithHeadersAndHttpInfo(String categoryId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
deleteLabelCategoryInternal(categoryId, localVarQueryParams, localVarHeaderParams);
}
private void deleteLabelCategoryInternal(String categoryId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'categoryId' is set
if (categoryId == null) {
throw new ApiException(400, "Missing the required path parameter 'categoryId' when calling deleteLabelCategory");
}
// create path and map variables
String localVarPath = "/context/labels/categories/{categoryId}"
.replaceAll("\\{" + "categoryId" + "\\}", apiClient.escapeString(categoryId.toString()));
// query params
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 {
apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, 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
}
/**
* Get all label categories
*
* @return LabelCategoryOutputListV1
* @throws ApiException if fails to make API call
*/
public LabelCategoryOutputListV1 findLabelCategories() throws ApiException {
ApiClient.ApiResponse localVarResponse = findLabelCategoriesWithHttpInfo();
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get all label categories
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse findLabelCategoriesWithHttpInfo() throws ApiException {
Map localVarHeaderParams = new HashMap();
return findLabelCategoriesWithHeadersAndHttpInfo(localVarHeaderParams);
}
/**
* Get all label categories
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse findLabelCategoriesWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return findLabelCategoriesInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse findLabelCategoriesInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/context/labels/categories";
// query params
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, "GET", queryParams, localVarPostBody, headerParams, 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 all labels for a given category
*
* @param categoryId ID of the category of labels to return (required)
* @param query Search for labels that contain this string in a case-insensitive manner. This is especially useful for autocomplete categories. Note that if this is specified only the first 20 results will be returned, ordered by name (optional)
* @param parentId If set to the ID of a parent label then the child labels will be returned, if set to the empty GUID (00000000-0000-0000-0000-000000000000) only top level labels will be returned, if not specified all labels will be returned (optional)
* @return LabelOutputListV1
* @throws ApiException if fails to make API call
*/
public LabelOutputListV1 findLabels(String categoryId, String query, String parentId) throws ApiException {
ApiClient.ApiResponse localVarResponse = findLabelsWithHttpInfo(categoryId, query, parentId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get all labels for a given category
*
* @param categoryId ID of the category of labels to return (required)
* @param query Search for labels that contain this string in a case-insensitive manner. This is especially useful for autocomplete categories. Note that if this is specified only the first 20 results will be returned, ordered by name (optional)
* @param parentId If set to the ID of a parent label then the child labels will be returned, if set to the empty GUID (00000000-0000-0000-0000-000000000000) only top level labels will be returned, if not specified all labels will be returned (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse findLabelsWithHttpInfo(String categoryId, String query, String parentId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return findLabelsWithHeadersAndHttpInfo(categoryId, query, parentId, localVarHeaderParams);
}
/**
* Get all labels for a given category
*
* @param categoryId ID of the category of labels to return (required)
* @param query Search for labels that contain this string in a case-insensitive manner. This is especially useful for autocomplete categories. Note that if this is specified only the first 20 results will be returned, ordered by name (optional)
* @param parentId If set to the ID of a parent label then the child labels will be returned, if set to the empty GUID (00000000-0000-0000-0000-000000000000) only top level labels will be returned, if not specified all labels will be returned (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse findLabelsWithHeadersAndHttpInfo(String categoryId, String query, String parentId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "parentId", parentId));
localVarHeaderParams.putAll(customHeaders);
return findLabelsInternal(categoryId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse findLabelsInternal(String categoryId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'categoryId' is set
if (categoryId == null) {
throw new ApiException(400, "Missing the required path parameter 'categoryId' when calling findLabels");
}
// create path and map variables
String localVarPath = "/context/labels/{categoryId}"
.replaceAll("\\{" + "categoryId" + "\\}", apiClient.escapeString(categoryId.toString()));
// query params
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, "GET", queryParams, localVarPostBody, headerParams, 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 a comment
*
* @param itemId ID of the item that the comment is associated with (required)
* @param commentId ID of the comment to update (required)
* @param body Updated comment information (required)
* @return ContextCommentOutputV1
* @throws ApiException if fails to make API call
*/
public ContextCommentOutputV1 updateContextComment(String itemId, String commentId, ContextCommentInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = updateContextCommentWithHttpInfo(itemId, commentId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update a comment
*
* @param itemId ID of the item that the comment is associated with (required)
* @param commentId ID of the comment to update (required)
* @param body Updated comment information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateContextCommentWithHttpInfo(String itemId, String commentId, ContextCommentInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return updateContextCommentWithHeadersAndHttpInfo(itemId, commentId, body, localVarHeaderParams);
}
/**
* Update a comment
*
* @param itemId ID of the item that the comment is associated with (required)
* @param commentId ID of the comment to update (required)
* @param body Updated comment information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateContextCommentWithHeadersAndHttpInfo(String itemId, String commentId, ContextCommentInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return updateContextCommentInternal(itemId, commentId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse updateContextCommentInternal(String itemId, String commentId, ContextCommentInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling updateContextComment");
}
// verify the required path parameter 'commentId' is set
if (commentId == null) {
throw new ApiException(400, "Missing the required path parameter 'commentId' when calling updateContextComment");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling updateContextComment");
}
// create path and map variables
String localVarPath = "/context/{itemId}/comments/{commentId}"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()))
.replaceAll("\\{" + "commentId" + "\\}", apiClient.escapeString(commentId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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 opaque context
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param opaqueId ID of the opaque context to update (required)
* @param body Updated opaque context information (required)
* @return ContextOpaqueOutputV1
* @throws ApiException if fails to make API call
*/
public ContextOpaqueOutputV1 updateContextOpaque(String itemId, String opaqueId, ContextOpaqueInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = updateContextOpaqueWithHttpInfo(itemId, opaqueId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update opaque context
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param opaqueId ID of the opaque context to update (required)
* @param body Updated opaque context information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateContextOpaqueWithHttpInfo(String itemId, String opaqueId, ContextOpaqueInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return updateContextOpaqueWithHeadersAndHttpInfo(itemId, opaqueId, body, localVarHeaderParams);
}
/**
* Update opaque context
*
* @param itemId ID of the item that the opaque context is associated with (required)
* @param opaqueId ID of the opaque context to update (required)
* @param body Updated opaque context information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateContextOpaqueWithHeadersAndHttpInfo(String itemId, String opaqueId, ContextOpaqueInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return updateContextOpaqueInternal(itemId, opaqueId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse updateContextOpaqueInternal(String itemId, String opaqueId, ContextOpaqueInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'itemId' is set
if (itemId == null) {
throw new ApiException(400, "Missing the required path parameter 'itemId' when calling updateContextOpaque");
}
// verify the required path parameter 'opaqueId' is set
if (opaqueId == null) {
throw new ApiException(400, "Missing the required path parameter 'opaqueId' when calling updateContextOpaque");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling updateContextOpaque");
}
// create path and map variables
String localVarPath = "/context/{itemId}/opaque/{opaqueId}"
.replaceAll("\\{" + "itemId" + "\\}", apiClient.escapeString(itemId.toString()))
.replaceAll("\\{" + "opaqueId" + "\\}", apiClient.escapeString(opaqueId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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 a label
*
* @param labelId (required)
* @param body New name for the label (required)
* @return LabelOutputV1
* @throws ApiException if fails to make API call
*/
public LabelOutputV1 updateLabel(String labelId, LabelInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = updateLabelWithHttpInfo(labelId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update a label
*
* @param labelId (required)
* @param body New name for the label (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateLabelWithHttpInfo(String labelId, LabelInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return updateLabelWithHeadersAndHttpInfo(labelId, body, localVarHeaderParams);
}
/**
* Update a label
*
* @param labelId (required)
* @param body New name for the label (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateLabelWithHeadersAndHttpInfo(String labelId, LabelInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return updateLabelInternal(labelId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse updateLabelInternal(String labelId, LabelInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'labelId' is set
if (labelId == null) {
throw new ApiException(400, "Missing the required path parameter 'labelId' when calling updateLabel");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling updateLabel");
}
// create path and map variables
String localVarPath = "/context/labels/{labelId}"
.replaceAll("\\{" + "labelId" + "\\}", apiClient.escapeString(labelId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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 a label category
*
* @param categoryId (required)
* @param body Label category information (required)
* @return LabelCategoryOutputV1
* @throws ApiException if fails to make API call
*/
public LabelCategoryOutputV1 updateLabelCategory(String categoryId, LabelCategoryInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = updateLabelCategoryWithHttpInfo(categoryId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update a label category
*
* @param categoryId (required)
* @param body Label category information (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateLabelCategoryWithHttpInfo(String categoryId, LabelCategoryInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return updateLabelCategoryWithHeadersAndHttpInfo(categoryId, body, localVarHeaderParams);
}
/**
* Update a label category
*
* @param categoryId (required)
* @param body Label category information (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateLabelCategoryWithHeadersAndHttpInfo(String categoryId, LabelCategoryInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return updateLabelCategoryInternal(categoryId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse updateLabelCategoryInternal(String categoryId, LabelCategoryInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'categoryId' is set
if (categoryId == null) {
throw new ApiException(400, "Missing the required path parameter 'categoryId' when calling updateLabelCategory");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling updateLabelCategory");
}
// create path and map variables
String localVarPath = "/context/labels/categories/{categoryId}"
.replaceAll("\\{" + "categoryId" + "\\}", apiClient.escapeString(categoryId.toString()));
// query params
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", queryParams, localVarPostBody, headerParams, 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
}
// OVERLOADS START
/**
* Get all labels for a given category
*
* @param categoryId ID of the category of labels to return (required)
* @param query Search for labels that contain this string in a case-insensitive manner. This is especially useful for autocomplete categories. Note that if this is specified only the first 20 results will be returned, ordered by name (optional)
* @return LabelOutputListV1
* @throws ApiException if fails to make API call
*/
public LabelOutputListV1 findLabels(String categoryId, String query) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "query", query));
ApiClient.ApiResponse localVarResponse = findLabelsInternal(categoryId, localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get all labels for a given category
* @param categoryId ID of the category of labels to return (required)
* @param query Search for labels that contain this string in a case-insensitive manner. This is especially useful for autocomplete categories. Note that if this is specified only the first 20 results will be returned, ordered by name (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse findLabelsWithHttpInfo(String categoryId, String query) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap