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 {
Map localVarHeaderParams = new HashMap();
return addSamplesWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
}
/**
* Save samples to a signal
*
* @param id The Seeq ID for the signal (required)
* @param body Data to be added to the signal (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addSamplesWithHeadersAndHttpInfo(String id, SamplesInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return addSamplesInternal(id, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse addSamplesInternal(String id, SamplesInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling addSamples");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling addSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return addSamplesByDataIdWithHeadersAndHttpInfo(datasourceClass, datasourceId, dataId, body, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addSamplesByDataIdWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, String dataId, SamplesInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return addSamplesByDataIdInternal(datasourceClass, datasourceId, dataId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse addSamplesByDataIdInternal(String datasourceClass, String datasourceId, String dataId, SamplesInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling addSamplesByDataId");
}
// verify the required path parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling addSamplesByDataId");
}
// verify the required path parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required path parameter 'dataId' when calling addSamplesByDataId");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body 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
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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return archiveSignalWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Archive a signal
*
* @param id The Seeq ID for the signal (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveSignalWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return archiveSignalInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse archiveSignalInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling archiveSignal");
}
// create path and map variables
String localVarPath = "/signals/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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, "DELETE", 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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return archiveSignalByDataIdWithHeadersAndHttpInfo(datasourceClass, datasourceId, dataId, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse archiveSignalByDataIdWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, String dataId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return archiveSignalByDataIdInternal(datasourceClass, datasourceId, dataId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse archiveSignalByDataIdInternal(String datasourceClass, String datasourceId, String dataId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling archiveSignalByDataId");
}
// verify the required path parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling archiveSignalByDataId");
}
// verify the required path parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required path 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
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", 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 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 {
Map localVarHeaderParams = new HashMap();
return createSignalWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a new signal, to be stored in Seeq
*
* @param body (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createSignalWithHeadersAndHttpInfo(SignalInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createSignalInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createSignalInternal(SignalInputV1 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 createSignal");
}
// create path and map variables
String localVarPath = "/signals";
// 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 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 {
Map localVarHeaderParams = new HashMap();
return deleteSamplesWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Delete all samples in a signal
*
* @param id The Seeq ID for the signal (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteSamplesWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return deleteSamplesInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse deleteSamplesInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling deleteSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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, "DELETE", 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 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 {
Map localVarHeaderParams = new HashMap();
return getSampleWithHeadersAndHttpInfo(id, key, lookup, keyUnitOfMeasure, valueUnitOfMeasure, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSampleWithHeadersAndHttpInfo(String id, String key, String lookup, String keyUnitOfMeasure, String valueUnitOfMeasure, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "lookup", lookup));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "keyUnitOfMeasure", keyUnitOfMeasure));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "valueUnitOfMeasure", valueUnitOfMeasure));
localVarHeaderParams.putAll(customHeaders);
return getSampleInternal(id, key, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSampleInternal(String id, String key, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling getSample");
}
// verify the required path parameter 'key' is set
if (key == null) {
throw new ApiException(400, "Missing the required path 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
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 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 {
Map localVarHeaderParams = new HashMap();
return getSampleByDataIdWithHeadersAndHttpInfo(datasourceClass, datasourceId, dataId, key, lookup, keyUnitOfMeasure, valueUnitOfMeasure, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSampleByDataIdWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, String dataId, String key, String lookup, String keyUnitOfMeasure, String valueUnitOfMeasure, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "lookup", lookup));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "keyUnitOfMeasure", keyUnitOfMeasure));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "valueUnitOfMeasure", valueUnitOfMeasure));
localVarHeaderParams.putAll(customHeaders);
return getSampleByDataIdInternal(datasourceClass, datasourceId, dataId, key, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSampleByDataIdInternal(String datasourceClass, String datasourceId, String dataId, String key, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling getSampleByDataId");
}
// verify the required path parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling getSampleByDataId");
}
// verify the required path parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required path parameter 'dataId' when calling getSampleByDataId");
}
// verify the required path parameter 'key' is set
if (key == null) {
throw new ApiException(400, "Missing the required path 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
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 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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (required)
* @param end The key at the end of the query interval as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @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 limit, String continuationToken) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSamplesWithHttpInfo(id, start, end, period, inflate, boundaryValues, keyUnitOfMeasure, valueUnitOfMeasure, limit, continuationToken);
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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (required)
* @param end The key at the end of the query interval as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @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 limit, String continuationToken) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getSamplesWithHeadersAndHttpInfo(id, start, end, period, inflate, boundaryValues, keyUnitOfMeasure, valueUnitOfMeasure, limit, continuationToken, localVarHeaderParams);
}
/**
* 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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (required)
* @param end The key at the end of the query interval as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSamplesWithHeadersAndHttpInfo(String id, String start, String end, String period, Boolean inflate, String boundaryValues, String keyUnitOfMeasure, String valueUnitOfMeasure, Integer limit, String continuationToken, Map customHeaders) throws ApiException {
// verify the required query parameter 'start' is set
if (start == null) {
throw new ApiException(400, "Missing the required query parameter 'start' when calling getSamples");
}
// verify the required query parameter 'end' is set
if (end == null) {
throw new ApiException(400, "Missing the required query parameter 'end' when calling getSamples");
}
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = 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("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "continuationToken", continuationToken));
localVarHeaderParams.putAll(customHeaders);
return getSamplesInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSamplesInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling getSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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
}
/**
* 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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (required)
* @param end The key at the end of the query interval as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @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 limit, String continuationToken) throws ApiException {
ApiClient.ApiResponse localVarResponse = getSamplesByDataIdWithHttpInfo(datasourceClass, datasourceId, dataId, start, end, period, inflate, boundaryValues, keyUnitOfMeasure, valueUnitOfMeasure, limit, continuationToken);
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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (required)
* @param end The key at the end of the query interval as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @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 limit, String continuationToken) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getSamplesByDataIdWithHeadersAndHttpInfo(datasourceClass, datasourceId, dataId, start, end, period, inflate, boundaryValues, keyUnitOfMeasure, valueUnitOfMeasure, limit, continuationToken, localVarHeaderParams);
}
/**
* 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 as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (required)
* @param end The key at the end of the query interval as an ISO 8601 timestamp (YYYY-MM-DDThh:mm:ss.sssssssss±hh:mm). (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 limit The pagination limit, the total number of samples that will be returned in this page of results (optional, default to 1000)
* @param continuationToken An opaque token used to query for the next page of results. Only use if returned by a previous call. (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSamplesByDataIdWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, String dataId, String start, String end, String period, Boolean inflate, String boundaryValues, String keyUnitOfMeasure, String valueUnitOfMeasure, Integer limit, String continuationToken, Map customHeaders) throws ApiException {
// verify the required query parameter 'start' is set
if (start == null) {
throw new ApiException(400, "Missing the required query parameter 'start' when calling getSamplesByDataId");
}
// verify the required query parameter 'end' is set
if (end == null) {
throw new ApiException(400, "Missing the required query parameter 'end' when calling getSamplesByDataId");
}
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = 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("", "limit", limit));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "continuationToken", continuationToken));
localVarHeaderParams.putAll(customHeaders);
return getSamplesByDataIdInternal(datasourceClass, datasourceId, dataId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSamplesByDataIdInternal(String datasourceClass, String datasourceId, String dataId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling getSamplesByDataId");
}
// verify the required path parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling getSamplesByDataId");
}
// verify the required path parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required path parameter 'dataId' 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
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 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 {
Map localVarHeaderParams = new HashMap();
return getSignalWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Get signal
*
* @param id The Seeq ID for the signal (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSignalWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getSignalInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSignalInternal(String id, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling getSignal");
}
// create path and map variables
String localVarPath = "/signals/{id}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return getSignalByDataIdWithHeadersAndHttpInfo(datasourceClass, datasourceId, dataId, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSignalByDataIdWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, String dataId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getSignalByDataIdInternal(datasourceClass, datasourceId, dataId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSignalByDataIdInternal(String datasourceClass, String datasourceId, String dataId, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// verify the required path parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling getSignalByDataId");
}
// verify the required path parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling getSignalByDataId");
}
// verify the required path parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required path 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
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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return getSignalsWithHeadersAndHttpInfo(offset, limit, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getSignalsWithHeadersAndHttpInfo(Integer offset, Integer limit, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarQueryParams.addAll(apiClient.parameterToPairs("", "limit", limit));
localVarHeaderParams.putAll(customHeaders);
return getSignalsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getSignalsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/signals";
// 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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return putSamplesWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSamplesWithHeadersAndHttpInfo(String id, SamplesOverwriteInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return putSamplesInternal(id, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse putSamplesInternal(String id, SamplesOverwriteInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'id' is set
if (id == null) {
throw new ApiException(400, "Missing the required path parameter 'id' when calling putSamples");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling putSamples");
}
// create path and map variables
String localVarPath = "/signals/{id}/samples"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.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, "PUT", 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
}
/**
* 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 {
Map localVarHeaderParams = new HashMap();
return putSamplesByDataIdWithHeadersAndHttpInfo(datasourceClass, datasourceId, dataId, body, localVarHeaderParams);
}
/**
* 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)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse putSamplesByDataIdWithHeadersAndHttpInfo(String datasourceClass, String datasourceId, String dataId, SamplesOverwriteInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return putSamplesByDataIdInternal(datasourceClass, datasourceId, dataId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse putSamplesByDataIdInternal(String datasourceClass, String datasourceId, String dataId, SamplesOverwriteInputV1 body, List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = body;
// verify the required path parameter 'datasourceClass' is set
if (datasourceClass == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceClass' when calling putSamplesByDataId");
}
// verify the required path parameter 'datasourceId' is set
if (datasourceId == null) {
throw new ApiException(400, "Missing the required path parameter 'datasourceId' when calling putSamplesByDataId");
}
// verify the required path parameter 'dataId' is set
if (dataId == null) {
throw new ApiException(400, "Missing the required path parameter 'dataId' when calling putSamplesByDataId");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body 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
Map