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.ColumnDefinitionInputListV1;
import com.seeq.model.ColumnDefinitionInputV1;
import com.seeq.model.TableDefinitionInputV1;
import com.seeq.model.TableDefinitionOutputListV1;
import com.seeq.model.TableDefinitionOutputV1;
import com.seeq.model.TableDefinitionUpdateInputV1;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class TableDefinitionsApi {
private ApiClient apiClient;
private long retryTimeout = 5_000; // Default of 5 seconds
public TableDefinitionsApi() {
this(Configuration.getDefaultApiClient());
}
public TableDefinitionsApi(ApiClient apiClient) {
this.apiClient = apiClient;
}
public void setRetryTimeout(long retryTimeout) {
this.retryTimeout = retryTimeout;
}
public long getRetryTimeout() {
return this.retryTimeout;
}
public ApiClient getApiClient() {
return apiClient;
}
public void setApiClient(ApiClient apiClient) {
this.apiClient = apiClient;
}
/**
* Add one or more columns to a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param body (required)
* @return TableDefinitionOutputV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputV1 addColumnsToTableDefinition(String id, ColumnDefinitionInputListV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = addColumnsToTableDefinitionWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Add one or more columns to a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse addColumnsToTableDefinitionWithHttpInfo(String id, ColumnDefinitionInputListV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return addColumnsToTableDefinitionWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
}
/**
* Add one or more columns to a table definition
*
* @param id The Seeq ID for the table definition (required)
* @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 addColumnsToTableDefinitionWithHeadersAndHttpInfo(String id, ColumnDefinitionInputListV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return addColumnsToTableDefinitionInternal(id, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse addColumnsToTableDefinitionInternal(String id, ColumnDefinitionInputListV1 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 addColumnsToTableDefinition");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling addColumnsToTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions/{id}/columns"
.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
}
/**
* Archive a table definition
*
* @param id ID of the table definition to archive (required)
* @throws ApiException if fails to make API call
*/
public void archiveTableDefinition(String id) throws ApiException {
archiveTableDefinitionWithHttpInfo(id);
}
/**
* Archive a table definition
*
* @param id ID of the table definition to archive (required)
* @throws ApiException if fails to make API call
*/
public void archiveTableDefinitionWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
archiveTableDefinitionWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Archive a table definition
*
* @param id ID of the table definition to archive (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public void archiveTableDefinitionWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
archiveTableDefinitionInternal(id, localVarQueryParams, localVarHeaderParams);
}
private void archiveTableDefinitionInternal(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 archiveTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions/{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 {
apiClient.invokeAPIWithHttpInfo(localVarPath, "DELETE", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, null);
return;
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Create a new table definition
*
* @param body (required)
* @return TableDefinitionOutputV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputV1 createTableDefinition(TableDefinitionInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = createTableDefinitionWithHttpInfo(body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Create a new table definition
*
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse createTableDefinitionWithHttpInfo(TableDefinitionInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return createTableDefinitionWithHeadersAndHttpInfo(body, localVarHeaderParams);
}
/**
* Create a new table definition
*
* @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 createTableDefinitionWithHeadersAndHttpInfo(TableDefinitionInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return createTableDefinitionInternal(body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse createTableDefinitionInternal(TableDefinitionInputV1 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 createTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions";
// 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 a column from a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param columnId The column ID to be deleted (required)
* @return TableDefinitionOutputV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputV1 deleteColumnFromTableDefinition(String id, String columnId) throws ApiException {
ApiClient.ApiResponse localVarResponse = deleteColumnFromTableDefinitionWithHttpInfo(id, columnId);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Delete a column from a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param columnId The column ID to be deleted (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteColumnFromTableDefinitionWithHttpInfo(String id, String columnId) throws ApiException {
Map localVarHeaderParams = new HashMap();
return deleteColumnFromTableDefinitionWithHeadersAndHttpInfo(id, columnId, localVarHeaderParams);
}
/**
* Delete a column from a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param columnId The column ID to be deleted (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse deleteColumnFromTableDefinitionWithHeadersAndHttpInfo(String id, String columnId, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return deleteColumnFromTableDefinitionInternal(id, columnId, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse deleteColumnFromTableDefinitionInternal(String id, String columnId, 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 deleteColumnFromTableDefinition");
}
// verify the required path parameter 'columnId' is set
if (columnId == null) {
throw new ApiException(400, "Missing the required path parameter 'columnId' when calling deleteColumnFromTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions/{id}/columns/{columnId}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "columnId" + "\\}", apiClient.escapeString(columnId.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 table definition
*
* @param id The ID of the table definition (required)
* @return TableDefinitionOutputV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputV1 getTableDefinition(String id) throws ApiException {
ApiClient.ApiResponse localVarResponse = getTableDefinitionWithHttpInfo(id);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a table definition
*
* @param id The ID of the table definition (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionWithHttpInfo(String id) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getTableDefinitionWithHeadersAndHttpInfo(id, localVarHeaderParams);
}
/**
* Get a table definition
*
* @param id The ID of the table definition (required)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionWithHeadersAndHttpInfo(String id, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getTableDefinitionInternal(id, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getTableDefinitionInternal(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 getTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions/{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 list of table definitions
*
* @param offset The pagination offset, the index of the first item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of table definitions that will be returned in this page of results (optional, default to 40)
* @return TableDefinitionOutputListV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputListV1 getTableDefinitions(Integer offset, Integer limit) throws ApiException {
ApiClient.ApiResponse localVarResponse = getTableDefinitionsWithHttpInfo(offset, limit);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a list of table definitions
*
* @param offset The pagination offset, the index of the first item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of table definitions that will be returned in this page of results (optional, default to 40)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionsWithHttpInfo(Integer offset, Integer limit) throws ApiException {
Map localVarHeaderParams = new HashMap();
return getTableDefinitionsWithHeadersAndHttpInfo(offset, limit, localVarHeaderParams);
}
/**
* Get a list of table definitions
*
* @param offset The pagination offset, the index of the first item that will be returned in this page of results (optional, default to 0)
* @param limit The pagination limit, the total number of table definitions 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 getTableDefinitionsWithHeadersAndHttpInfo(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 getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse getTableDefinitionsInternal(List queryParams, Map headerParams) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/table-definitions";
// 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
}
/**
* Modify a column in a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param columnId The column ID to be modified. Possible modifications are: changing the column's index, renaming the column, changing the column's type, and updating the column's unit of measure. For type conversions:- Boolean to Numeric: False values get converted to 0. True values get converted to 1.- Numeric to Boolean: Non-zero values get converted to true. Otherwise, they get converted to false.- UUID to String: The UUID gets directly converted into string format.- TIMESTAMPTZ to String: The value will be converted to a string in the Postgres date time format (ex. 2023-11-28 14:43:35.170579-08).- Boolean to String: false becomes 'false' and true becomes 'true'.- Numeric to String: The values get converted directly to a string. Long numeric values do not have special formatting and just get represented as they are in string format.- Any non-string type to UUID: Values get converted to a UUID value with only zeros.- String to UUID: If the string value is in the correct UUID format, it will be directly converted to ite UUID equivalent. Otherwise, it'll be cast to a UUID with all zeros.- UUID to Numeric: The UUID values get converted to numeric by only using the numeric parts of the UUID and excluding hyphens and any non-numeric characters.- Any non-string type to TIMESTAMPTZ: All values get converted to the current time.- String to TIMESTAMPTZ: If the string value is in ISO8601 format, it gets directly cast to a timestamp with the same information. If not, then it gets cast to the epoch timestamp.- TIMESTAMPTZ to Numeric: The conversion retrieves the number of seconds between the timestamp and epoch.- String to Numeric: The string values will get directly converted into their numeric equivalent. So, '1' becomes 1, '1.5' becomes 1.5, 1e10 becomes 10000000000. So integers, decimals, and scientific notation is handled. If a string cannot become converted, it will be cast as null.- String to Boolean: If 'false', 'f', or '0', convert to false. If 'true', 't', or '1', convert to true. The string to boolean conversion is case-insensitive.- Any non-numeric and non-string type to Boolean: If the value is not null, then true. Otherwise, convert to false. (required)
* @param body (required)
* @return TableDefinitionOutputV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputV1 modifyColumnInTableDefinition(String id, String columnId, ColumnDefinitionInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = modifyColumnInTableDefinitionWithHttpInfo(id, columnId, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Modify a column in a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param columnId The column ID to be modified. Possible modifications are: changing the column's index, renaming the column, changing the column's type, and updating the column's unit of measure. For type conversions:- Boolean to Numeric: False values get converted to 0. True values get converted to 1.- Numeric to Boolean: Non-zero values get converted to true. Otherwise, they get converted to false.- UUID to String: The UUID gets directly converted into string format.- TIMESTAMPTZ to String: The value will be converted to a string in the Postgres date time format (ex. 2023-11-28 14:43:35.170579-08).- Boolean to String: false becomes 'false' and true becomes 'true'.- Numeric to String: The values get converted directly to a string. Long numeric values do not have special formatting and just get represented as they are in string format.- Any non-string type to UUID: Values get converted to a UUID value with only zeros.- String to UUID: If the string value is in the correct UUID format, it will be directly converted to ite UUID equivalent. Otherwise, it'll be cast to a UUID with all zeros.- UUID to Numeric: The UUID values get converted to numeric by only using the numeric parts of the UUID and excluding hyphens and any non-numeric characters.- Any non-string type to TIMESTAMPTZ: All values get converted to the current time.- String to TIMESTAMPTZ: If the string value is in ISO8601 format, it gets directly cast to a timestamp with the same information. If not, then it gets cast to the epoch timestamp.- TIMESTAMPTZ to Numeric: The conversion retrieves the number of seconds between the timestamp and epoch.- String to Numeric: The string values will get directly converted into their numeric equivalent. So, '1' becomes 1, '1.5' becomes 1.5, 1e10 becomes 10000000000. So integers, decimals, and scientific notation is handled. If a string cannot become converted, it will be cast as null.- String to Boolean: If 'false', 'f', or '0', convert to false. If 'true', 't', or '1', convert to true. The string to boolean conversion is case-insensitive.- Any non-numeric and non-string type to Boolean: If the value is not null, then true. Otherwise, convert to false. (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse modifyColumnInTableDefinitionWithHttpInfo(String id, String columnId, ColumnDefinitionInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return modifyColumnInTableDefinitionWithHeadersAndHttpInfo(id, columnId, body, localVarHeaderParams);
}
/**
* Modify a column in a table definition
*
* @param id The Seeq ID for the table definition (required)
* @param columnId The column ID to be modified. Possible modifications are: changing the column's index, renaming the column, changing the column's type, and updating the column's unit of measure. For type conversions:- Boolean to Numeric: False values get converted to 0. True values get converted to 1.- Numeric to Boolean: Non-zero values get converted to true. Otherwise, they get converted to false.- UUID to String: The UUID gets directly converted into string format.- TIMESTAMPTZ to String: The value will be converted to a string in the Postgres date time format (ex. 2023-11-28 14:43:35.170579-08).- Boolean to String: false becomes 'false' and true becomes 'true'.- Numeric to String: The values get converted directly to a string. Long numeric values do not have special formatting and just get represented as they are in string format.- Any non-string type to UUID: Values get converted to a UUID value with only zeros.- String to UUID: If the string value is in the correct UUID format, it will be directly converted to ite UUID equivalent. Otherwise, it'll be cast to a UUID with all zeros.- UUID to Numeric: The UUID values get converted to numeric by only using the numeric parts of the UUID and excluding hyphens and any non-numeric characters.- Any non-string type to TIMESTAMPTZ: All values get converted to the current time.- String to TIMESTAMPTZ: If the string value is in ISO8601 format, it gets directly cast to a timestamp with the same information. If not, then it gets cast to the epoch timestamp.- TIMESTAMPTZ to Numeric: The conversion retrieves the number of seconds between the timestamp and epoch.- String to Numeric: The string values will get directly converted into their numeric equivalent. So, '1' becomes 1, '1.5' becomes 1.5, 1e10 becomes 10000000000. So integers, decimals, and scientific notation is handled. If a string cannot become converted, it will be cast as null.- String to Boolean: If 'false', 'f', or '0', convert to false. If 'true', 't', or '1', convert to true. The string to boolean conversion is case-insensitive.- Any non-numeric and non-string type to Boolean: If the value is not null, then true. Otherwise, convert to false. (required)
* @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 modifyColumnInTableDefinitionWithHeadersAndHttpInfo(String id, String columnId, ColumnDefinitionInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return modifyColumnInTableDefinitionInternal(id, columnId, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse modifyColumnInTableDefinitionInternal(String id, String columnId, ColumnDefinitionInputV1 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 modifyColumnInTableDefinition");
}
// verify the required path parameter 'columnId' is set
if (columnId == null) {
throw new ApiException(400, "Missing the required path parameter 'columnId' when calling modifyColumnInTableDefinition");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling modifyColumnInTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions/{id}/columns/{columnId}"
.replaceAll("\\{" + "id" + "\\}", apiClient.escapeString(id.toString()))
.replaceAll("\\{" + "columnId" + "\\}", apiClient.escapeString(columnId.toString()));
// query params
Map localVarFormParams = new HashMap();
final String[] localVarAccepts = {
"application/vnd.seeq.v1+json"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
/**
* Update a table definition's name and optionally its description and subscription
*
* @param id The Seeq ID for the table definition (required)
* @param body (required)
* @return TableDefinitionOutputV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputV1 updateTableDefinition(String id, TableDefinitionUpdateInputV1 body) throws ApiException {
ApiClient.ApiResponse localVarResponse = updateTableDefinitionWithHttpInfo(id, body);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Update a table definition's name and optionally its description and subscription
*
* @param id The Seeq ID for the table definition (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse updateTableDefinitionWithHttpInfo(String id, TableDefinitionUpdateInputV1 body) throws ApiException {
Map localVarHeaderParams = new HashMap();
return updateTableDefinitionWithHeadersAndHttpInfo(id, body, localVarHeaderParams);
}
/**
* Update a table definition's name and optionally its description and subscription
*
* @param id The Seeq ID for the table definition (required)
* @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 updateTableDefinitionWithHeadersAndHttpInfo(String id, TableDefinitionUpdateInputV1 body, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return updateTableDefinitionInternal(id, body, localVarQueryParams, localVarHeaderParams);
}
private ApiClient.ApiResponse updateTableDefinitionInternal(String id, TableDefinitionUpdateInputV1 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 updateTableDefinition");
}
// verify the required body parameter 'body' is set
if (body == null) {
throw new ApiException(400, "Missing the required body parameter 'body' when calling updateTableDefinition");
}
// create path and map variables
String localVarPath = "/table-definitions/{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 = {
"application/vnd.seeq.v1+json"
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { "api_key" };
long apiClientInvocationTime = System.currentTimeMillis();
while(true) {
try {
GenericType localVarReturnType = new GenericType() {};
return apiClient.invokeAPIWithHttpInfo(localVarPath, "POST", queryParams, localVarPostBody, headerParams, localVarFormParams, localVarAccept, localVarContentType, localVarAuthNames, localVarReturnType);
// Possible exceptions:
// ===================
// * ResponseProcessingException - in case processing of a received HTTP response fails (e.g. in a filter or
// during conversion of the response entity data to an instance of a particular Java type).
// * ProcessingException - in case the request processing or subsequent I/O operation fails.
// * WebApplicationException - in case the response status code of the response returned by the server is not
// successful and the specified response type is not Response.
// * ApiException for exceptions wrapped by ApiClient. Most likely all WebApplicationException are wrapped
// in ApiException(s)
} catch (ApiException | ProcessingException e) {
if (e instanceof ProcessingException || e instanceof ApiException && ((ApiException) e).getCode() == 504) {
long elapsedTime = System.currentTimeMillis() - apiClientInvocationTime;
if (elapsedTime <= this.retryTimeout && this.retryTimeout != 0) {
continue;
}
}
throw e;
}
} // while
}
// OVERLOADS START
/**
* Get a list of table definitions
*
* @param offset The pagination offset, the index of the first item that will be returned in this page of results (optional)
* @return TableDefinitionOutputListV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputListV1 getTableDefinitions(Integer offset) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
ApiClient.ApiResponse localVarResponse = getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a list of table definitions
* @param offset The pagination offset, the index of the first item that will be returned in this page of results (optional)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionsWithHttpInfo(Integer offset) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
return getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Get a list of table definitions
*
* @param offset The pagination offset, the index of the first item that will be returned in this page of results (optional)
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionsWithHeadersAndHttpInfo(Integer offset, Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarQueryParams.addAll(apiClient.parameterToPairs("", "offset", offset));
localVarHeaderParams.putAll(customHeaders);
return getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Get a list of table definitions
*
*
* @return TableDefinitionOutputListV1
* @throws ApiException if fails to make API call
*/
public TableDefinitionOutputListV1 getTableDefinitions() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
ApiClient.ApiResponse localVarResponse = getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
return localVarResponse != null ? localVarResponse.getData() : null;
}
/**
* Get a list of table definitions
*
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionsWithHttpInfo() throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
return getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
}
/**
* Get a list of table definitions
*
*
* @param customHeaders a map with custom headers for the HTTP request (required)
* @throws ApiException if fails to make API call
*/
public ApiClient.ApiResponse getTableDefinitionsWithHeadersAndHttpInfo(Map customHeaders) throws ApiException {
List localVarQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
localVarHeaderParams.putAll(customHeaders);
return getTableDefinitionsInternal(localVarQueryParams, localVarHeaderParams);
}
// OVERLOADS END
}