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.ArchiveOutputV1;
import com.seeq.model.GetSampleOutputV1;
import com.seeq.model.GetSamplesOutputV1;
import com.seeq.model.GetSignalsOutputV1;
import com.seeq.model.ItemBatchOutputV1;
import com.seeq.model.PutSignalsInputV1;
import com.seeq.model.SamplesInputV1;
import com.seeq.model.SamplesOutputV1;
import com.seeq.model.SamplesOverwriteInputV1;
import com.seeq.model.SignalInputV1;
import com.seeq.model.SignalOutputV1;
import com.seeq.model.StatusMessageBase;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class SignalsApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public SignalsApi() {
this(Configuration.getDefaultApiClient());
}
public SignalsApi(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;
}
/**
* Save samples to a signal
*
* @param id The Seeq ID for the signal (required)
* @param body Data to be added to the signal (required)
* @return SamplesOutputV1
* @throws ApiException if fails to make API call
*/
public SamplesOutputV1 addSamples(String id, SamplesInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = addSamplesWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Save samples to a signal
*
* @param id The Seeq ID for the signal (required)
* @param body Data to be added to the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addSamplesWithHttpInfo(String id, SamplesInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling addSamples");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling addSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.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
}
/**
* Save samples to a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param body Data to be added to the signal (required)
* @return SamplesOutputV1
* @throws ApiException if fails to make API call
*/
public SamplesOutputV1 addSamplesByDataId(String datasourceClass, String datasourceId, String dataId, SamplesInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = addSamplesByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Save samples to a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param body Data to be added to the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addSamplesByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId, SamplesInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling addSamplesByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling addSamplesByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling addSamplesByDataId");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling addSamplesByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}/samples"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.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
}
/**
* Archive a signal
*
* @param id The Seeq ID for the signal (required)
* @return ArchiveOutputV1
* @throws ApiException if fails to make API call
*/
public ArchiveOutputV1 archiveSignal(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = archiveSignalWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive a signal
*
* @param id The Seeq ID for the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveSignalWithHttpInfo(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 archiveSignal");
}
// create path and map variables
String localVarPath = "/signals/{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
}
/**
* Archive a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @return ArchiveOutputV1
* @throws ApiException if fails to make API call
*/
public ArchiveOutputV1 archiveSignalByDataId(String datasourceClass, String datasourceId, String dataId) throws ApiException {
ApiClient.ApiResponse localVarResponse = archiveSignalByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Archive a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveSignalByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling archiveSignalByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling archiveSignalByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling archiveSignalByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.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
}
/**
* Create a new signal, to be stored in Seeq
*
* @param body (required)
* @return SignalOutputV1
* @throws ApiException if fails to make API call
*/
public SignalOutputV1 createSignal(SignalInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createSignalWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a new signal, to be stored in Seeq
*
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createSignalWithHttpInfo(SignalInputV1 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 createSignal");
}
// create path and map variables
String localVarPath = "/signals";
// 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
}
/**
* Delete all samples in a signal
*
* @param id The Seeq ID for the signal (required)
* @return StatusMessageBase
* @throws ApiException if fails to make API call
*/
public StatusMessageBase deleteSamples(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = deleteSamplesWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Delete all samples in a signal
*
* @param id The Seeq ID for the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteSamplesWithHttpInfo(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 deleteSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.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
}
/**
* Get a sample from a signal
*
* @param id The Seeq ID for the signal (required)
* @param key The key in the signal where the sample should be retrieved (required)
* @param lookup Where to look for a sample relative to the specified key. The options are Interpolate, Before, AtOrBefore, At, AtOrAfter, After (optional, default to Interpolate)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @return GetSampleOutputV1
* @throws ApiException if fails to make API call
*/
public GetSampleOutputV1 getSample(String id, String key, String lookup, String keyUnitOfMeasure, String valueUnitOfMeasure) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSampleWithHttpInfo(id, key, lookup, keyUnitOfMeasure, valueUnitOfMeasure);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a sample from a signal
*
* @param id The Seeq ID for the signal (required)
* @param key The key in the signal where the sample should be retrieved (required)
* @param lookup Where to look for a sample relative to the specified key. The options are Interpolate, Before, AtOrBefore, At, AtOrAfter, After (optional, default to Interpolate)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSampleWithHttpInfo(String id, String key, String lookup, String keyUnitOfMeasure, String valueUnitOfMeasure) 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 getSample");
}
// verify the required parameter 'key' is set
if (key == null) {
throw new ApiException(400, "Missing the required parameter 'key' when calling getSample");
}
// create path and map variables
String localVarPath = "/signals/{id}/sample/{key}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "lookup", lookup));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "keyUnitOfMeasure", keyUnitOfMeasure));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "valueUnitOfMeasure", valueUnitOfMeasure));
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 sample from a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param key The key in the signal where the sample should be retrieved (required)
* @param lookup Where to look for a sample relative to the specified key. The options are Interpolate, Before, AtOrBefore, At, AtOrAfter, After (optional, default to Interpolate)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @return GetSampleOutputV1
* @throws ApiException if fails to make API call
*/
public GetSampleOutputV1 getSampleByDataId(String datasourceClass, String datasourceId, String dataId, String key, String lookup, String keyUnitOfMeasure, String valueUnitOfMeasure) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSampleByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId, key, lookup, keyUnitOfMeasure, valueUnitOfMeasure);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a sample from a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param key The key in the signal where the sample should be retrieved (required)
* @param lookup Where to look for a sample relative to the specified key. The options are Interpolate, Before, AtOrBefore, At, AtOrAfter, After (optional, default to Interpolate)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSampleByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId, String key, String lookup, String keyUnitOfMeasure, String valueUnitOfMeasure) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling getSampleByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling getSampleByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling getSampleByDataId");
}
// verify the required parameter 'key' is set
if (key == null) {
throw new ApiException(400, "Missing the required parameter 'key' when calling getSampleByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}/sample/{key}"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.toString()))
.replaceAll("\\{" + "key" + "\\}", apiClient.escapeString(key.toString()));
// query params
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarFormParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "lookup", lookup));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "keyUnitOfMeasure", keyUnitOfMeasure));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "valueUnitOfMeasure", valueUnitOfMeasure));
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 samples from a signal over an interval
*
* @param id The Seeq ID for the signal (required)
* @param start The key at the start of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param end The key at the end of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param period To resample the signal to an evenly-spaced grid, provide the desired resampling period. The default does not perform resampling. (optional, default to 0)
* @param inflate Whether to inflate the resulting signal. Inflation adds samples that may not be present in the source historian in two cases. Signals with step discontinuities will have an extra sample at each discontinuity. Also, gaps wider than Max Interpolation will be marked explicitly by invalid values. An inflated signal can be plotted by connecting adjacent samples with straight lines, without needing to consider the signal's interpolation method. (optional, default to false)
* @param boundaryValues Choice for handling samples near the start and end of the query interval. The options are Outside, Inclusive, and Interpolate. (optional, default to Outside)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @param offset The pagination offset, the index of the first sample that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @return GetSamplesOutputV1
* @throws ApiException if fails to make API call
*/
public GetSamplesOutputV1 getSamples(String id, String start, String end, String period, Boolean inflate, String boundaryValues, String keyUnitOfMeasure, String valueUnitOfMeasure, Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSamplesWithHttpInfo(id, start, end, period, inflate, boundaryValues, keyUnitOfMeasure, valueUnitOfMeasure, offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get samples from a signal over an interval
*
* @param id The Seeq ID for the signal (required)
* @param start The key at the start of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param end The key at the end of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param period To resample the signal to an evenly-spaced grid, provide the desired resampling period. The default does not perform resampling. (optional, default to 0)
* @param inflate Whether to inflate the resulting signal. Inflation adds samples that may not be present in the source historian in two cases. Signals with step discontinuities will have an extra sample at each discontinuity. Also, gaps wider than Max Interpolation will be marked explicitly by invalid values. An inflated signal can be plotted by connecting adjacent samples with straight lines, without needing to consider the signal's interpolation method. (optional, default to false)
* @param boundaryValues Choice for handling samples near the start and end of the query interval. The options are Outside, Inclusive, and Interpolate. (optional, default to Outside)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @param offset The pagination offset, the index of the first sample that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSamplesWithHttpInfo(String id, String start, String end, String period, Boolean inflate, String boundaryValues, String keyUnitOfMeasure, String valueUnitOfMeasure, Integer offset, Integer limit) 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 getSamples");
}
// verify the required parameter 'start' is set
if (start == null) {
throw new ApiException(400, "Missing the required parameter 'start' when calling getSamples");
}
// verify the required parameter 'end' is set
if (end == null) {
throw new ApiException(400, "Missing the required parameter 'end' when calling getSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()));
// 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("", "period", period));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "inflate", inflate));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "boundaryValues", boundaryValues));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "keyUnitOfMeasure", keyUnitOfMeasure));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "valueUnitOfMeasure", valueUnitOfMeasure));
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 samples from a signal over an interval, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param start The key at the start of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param end The key at the end of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param period To resample the signal to an evenly-spaced grid, provide the desired resampling period. The default does not perform resampling. (optional, default to 0)
* @param inflate Whether to inflate the resulting signal. Inflation adds samples that may not be present in the source historian in two cases. Signals with step discontinuities will have an extra sample at each discontinuity. Also, gaps wider than Max Interpolation will be marked explicitly by invalid values. An inflated signal can be plotted by connecting adjacent samples with straight lines, without needing to consider the signal's interpolation method. (optional, default to false)
* @param boundaryValues Choice for handling samples near the start and end of the query interval. The options are Outside, Inclusive, and Interpolate. (optional, default to Outside)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @param offset The pagination offset, the index of the first sample that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @return GetSamplesOutputV1
* @throws ApiException if fails to make API call
*/
public GetSamplesOutputV1 getSamplesByDataId(String datasourceClass, String datasourceId, String dataId, String start, String end, String period, Boolean inflate, String boundaryValues, String keyUnitOfMeasure, String valueUnitOfMeasure, Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSamplesByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId, start, end, period, inflate, boundaryValues, keyUnitOfMeasure, valueUnitOfMeasure, offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get samples from a signal over an interval, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param start The key at the start of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param end The key at the end of the query interval. The contents vary based on the series type. For time series: a ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). For numeric (non-time) series: a double-precision number, optionally including units. For example: \"2.5ft\" or \"10 °C\". (required)
* @param period To resample the signal to an evenly-spaced grid, provide the desired resampling period. The default does not perform resampling. (optional, default to 0)
* @param inflate Whether to inflate the resulting signal. Inflation adds samples that may not be present in the source historian in two cases. Signals with step discontinuities will have an extra sample at each discontinuity. Also, gaps wider than Max Interpolation will be marked explicitly by invalid values. An inflated signal can be plotted by connecting adjacent samples with straight lines, without needing to consider the signal's interpolation method. (optional, default to false)
* @param boundaryValues Choice for handling samples near the start and end of the query interval. The options are Outside, Inclusive, and Interpolate. (optional, default to Outside)
* @param keyUnitOfMeasure Units to use for the key of each sample. The default does no unit conversion. For time-series, the default is ISO 8601 timestamps, e.g. '2016-01-01T19:51:32.490Z'. (optional)
* @param valueUnitOfMeasure Units to use for the value of each sample. The default does no unit conversion. (optional)
* @param offset The pagination offset, the index of the first sample that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSamplesByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId, String start, String end, String period, Boolean inflate, String boundaryValues, String keyUnitOfMeasure, String valueUnitOfMeasure, Integer offset, Integer limit) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling getSamplesByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling getSamplesByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling getSamplesByDataId");
}
// verify the required parameter 'start' is set
if (start == null) {
throw new ApiException(400, "Missing the required parameter 'start' when calling getSamplesByDataId");
}
// verify the required parameter 'end' is set
if (end == null) {
throw new ApiException(400, "Missing the required parameter 'end' when calling getSamplesByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}/samples"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.toString()));
// 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("", "period", period));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "inflate", inflate));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "boundaryValues", boundaryValues));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "keyUnitOfMeasure", keyUnitOfMeasure));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "valueUnitOfMeasure", valueUnitOfMeasure));
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 signal
*
* @param id The Seeq ID for the signal (required)
* @return SignalOutputV1
* @throws ApiException if fails to make API call
*/
public SignalOutputV1 getSignal(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSignalWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get signal
*
* @param id The Seeq ID for the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSignalWithHttpInfo(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 getSignal");
}
// create path and map variables
String localVarPath = "/signals/{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, "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 signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @return SignalOutputV1
* @throws ApiException if fails to make API call
*/
public SignalOutputV1 getSignalByDataId(String datasourceClass, String datasourceId, String dataId) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSignalByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSignalByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId) throws ApiException {
Object localVarPostBody = null;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling getSignalByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling getSignalByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling getSignalByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.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, "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
}
/**
* List signals
*
* @param offset The pagination offset, the index of the first signal that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of signals that will be returned in this page of results (optional, default to 40)
* @return GetSignalsOutputV1
* @throws ApiException if fails to make API call
*/
public GetSignalsOutputV1 getSignals(Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSignalsWithHttpInfo(offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* List signals
*
* @param offset The pagination offset, the index of the first signal that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of signals that will be returned in this page of results (optional, default to 40)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSignalsWithHttpInfo(Integer offset, Integer limit) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/signals";
// 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
}
/**
* Replace any samples to a signal in the same time range
*
* @param id The Seeq ID for the signal (required)
* @param body Data to be added to the signal (required)
* @return SamplesOutputV1
* @throws ApiException if fails to make API call
*/
public SamplesOutputV1 putSamples(String id, SamplesOverwriteInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putSamplesWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Replace any samples to a signal in the same time range
*
* @param id The Seeq ID for the signal (required)
* @param body Data to be added to the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSamplesWithHttpInfo(String id, SamplesOverwriteInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling putSamples");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling putSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.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, "PUT", 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
}
/**
* Replace any samples to a signal in the same time range, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param body Data to be added to the signal (required)
* @return SamplesOutputV1
* @throws ApiException if fails to make API call
*/
public SamplesOutputV1 putSamplesByDataId(String datasourceClass, String datasourceId, String dataId, SamplesOverwriteInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putSamplesByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Replace any samples to a signal in the same time range, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param body Data to be added to the signal (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSamplesByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId, SamplesOverwriteInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling putSamplesByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling putSamplesByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling putSamplesByDataId");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling putSamplesByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}/samples"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.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, "PUT", 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 a signal
*
* @param id The Seeq ID for the signal (required)
* @param body (required)
* @return SignalOutputV1
* @throws ApiException if fails to make API call
*/
public SignalOutputV1 putSignal(String id, SignalInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putSignalWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update a signal
*
* @param id The Seeq ID for the signal (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSignalWithHttpInfo(String id, SignalInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required parameter 'id' when calling putSignal");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling putSignal");
}
// create path and map variables
String localVarPath = "/signals/{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 = {
"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 a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param body (required)
* @return SignalOutputV1
* @throws ApiException if fails to make API call
*/
public SignalOutputV1 putSignalByDataId(String datasourceClass, String datasourceId, String dataId, SignalInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putSignalByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create or update a signal, using the source system's identifier
*
* @param datasourceClass The class of the datasource containing the signal (required)
* @param datasourceId The ID of the datasource containing the signal (required)
* @param dataId The Data ID for the signal (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSignalByDataIdWithHttpInfo(String datasourceClass, String datasourceId, String dataId, SignalInputV1 body) throws ApiException {
Object localVarPostBody = body;
// verify the required parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceClass' when calling putSignalByDataId");
}
// verify the required parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required parameter 'datasourceId' when calling putSignalByDataId");
}
// verify the required parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required parameter 'dataId' when calling putSignalByDataId");
}
// verify the required parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required parameter 'body' when calling putSignalByDataId");
}
// create path and map variables
String localVarPath = "/signals/{datasourceClass}/{datasourceId}/{dataId}"
.replaceAll("\\{" + "datasourceClass" + "\\}", apiClient.escapeString(datasourceClass.toString()))
.replaceAll("\\{" + "datasourceId" + "\\}", apiClient.escapeString(datasourceId.toString()))
.replaceAll("\\{" + "dataId" + "\\}", apiClient.escapeString(dataId.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
}
/**
* Create or update multiple signals
*
* @param body (required)
* @return ItemBatchOutputV1
* @throws ApiException if fails to make API call
*/
public ItemBatchOutputV1 putSignals(PutSignalsInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = putSignalsWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create or update multiple signals
*
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSignalsWithHttpInfo(PutSignalsInputV1 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 putSignals");
}
// create path and map variables
String localVarPath = "/signals/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
}
}