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.
/*
* TileDB Storage Platform API
* TileDB Storage Platform REST API
*
* The version of the OpenAPI document: 2.2.19
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package io.tiledb.cloud.rest_api.api;
import io.tiledb.cloud.rest_api.ApiCallback;
import io.tiledb.cloud.rest_api.model.Query;
import io.tiledb.cloud.rest_api.model.QueryJson;
import io.tiledb.cloud.rest_api.ApiClient;
import io.tiledb.cloud.rest_api.ApiException;
import io.tiledb.cloud.rest_api.ApiResponse;
import io.tiledb.cloud.rest_api.Configuration;
import io.tiledb.cloud.rest_api.Pair;
import com.google.gson.reflect.TypeToken;
import java.io.File;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class QueryApi {
private ApiClient localVarApiClient;
private int localHostIndex;
private String localCustomBaseUrl;
public QueryApi() {
this(Configuration.getDefaultApiClient());
}
public QueryApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public int getHostIndex() {
return localHostIndex;
}
public void setHostIndex(int hostIndex) {
this.localHostIndex = hostIndex;
}
public String getCustomBaseUrl() {
return localCustomBaseUrl;
}
public void setCustomBaseUrl(String customBaseUrl) {
this.localCustomBaseUrl = customBaseUrl;
}
/**
* Build call for finalizeQuery
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call finalizeQueryCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = query;
// create path and map variables
String localVarPath = "/arrays/{namespace}/{array}/query/finalize"
.replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (openAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("open_at", openAt));
}
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (xPayer != null) {
localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer));
}
final String[] localVarAccepts = {
"application/json", "application/capnp"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "application/capnp"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call finalizeQueryValidateBeforeCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling finalizeQuery(Async)");
}
// verify the required parameter 'array' is set
if (array == null) {
throw new ApiException("Missing the required parameter 'array' when calling finalizeQuery(Async)");
}
// verify the required parameter 'type' is set
if (type == null) {
throw new ApiException("Missing the required parameter 'type' when calling finalizeQuery(Async)");
}
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling finalizeQuery(Async)");
}
// verify the required parameter 'query' is set
if (query == null) {
throw new ApiException("Missing the required parameter 'query' when calling finalizeQuery(Async)");
}
okhttp3.Call localVarCall = finalizeQueryCall(namespace, array, type, contentType, query, xPayer, openAt, _callback);
return localVarCall;
}
/**
*
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @return Query
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public Query finalizeQuery(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt) throws ApiException {
ApiResponse localVarResp = finalizeQueryWithHttpInfo(namespace, array, type, contentType, query, xPayer, openAt);
return localVarResp.getData();
}
/**
*
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @return ApiResponse<Query>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public ApiResponse finalizeQueryWithHttpInfo(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt) throws ApiException {
okhttp3.Call localVarCall = finalizeQueryValidateBeforeCall(namespace, array, type, contentType, query, xPayer, openAt, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call finalizeQueryAsync(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = finalizeQueryValidateBeforeCall(namespace, array, type, contentType, query, xPayer, openAt, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getEstResultSizes
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query est result size computed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call getEstResultSizesCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = query;
// create path and map variables
String localVarPath = "/arrays/{namespace}/{array}/query/est_result_sizes"
.replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (openAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("open_at", openAt));
}
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (xPayer != null) {
localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer));
}
final String[] localVarAccepts = {
"application/json", "application/capnp"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "application/capnp"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getEstResultSizesValidateBeforeCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling getEstResultSizes(Async)");
}
// verify the required parameter 'array' is set
if (array == null) {
throw new ApiException("Missing the required parameter 'array' when calling getEstResultSizes(Async)");
}
// verify the required parameter 'type' is set
if (type == null) {
throw new ApiException("Missing the required parameter 'type' when calling getEstResultSizes(Async)");
}
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling getEstResultSizes(Async)");
}
// verify the required parameter 'query' is set
if (query == null) {
throw new ApiException("Missing the required parameter 'query' when calling getEstResultSizes(Async)");
}
okhttp3.Call localVarCall = getEstResultSizesCall(namespace, array, type, contentType, query, xPayer, openAt, _callback);
return localVarCall;
}
/**
*
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @return Query
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query est result size computed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public Query getEstResultSizes(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt) throws ApiException {
ApiResponse localVarResp = getEstResultSizesWithHttpInfo(namespace, array, type, contentType, query, xPayer, openAt);
return localVarResp.getData();
}
/**
*
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @return ApiResponse<Query>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query est result size computed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public ApiResponse getEstResultSizesWithHttpInfo(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt) throws ApiException {
okhttp3.Call localVarCall = getEstResultSizesValidateBeforeCall(namespace, array, type, contentType, query, xPayer, openAt, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query est result size computed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call getEstResultSizesAsync(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getEstResultSizesValidateBeforeCall(namespace, array, type, contentType, query, xPayer, openAt, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for getFile
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param contentType Content Type of input and return mime (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and result bytes are returned
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call getFileCall(String namespace, String array, String contentType, String xPayer, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/arrays/{namespace}/{array}/query/get_file"
.replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (xPayer != null) {
localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer));
}
final String[] localVarAccepts = {
"application/x-ipynb+json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call getFileValidateBeforeCall(String namespace, String array, String contentType, String xPayer, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling getFile(Async)");
}
// verify the required parameter 'array' is set
if (array == null) {
throw new ApiException("Missing the required parameter 'array' when calling getFile(Async)");
}
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling getFile(Async)");
}
okhttp3.Call localVarCall = getFileCall(namespace, array, contentType, xPayer, _callback);
return localVarCall;
}
/**
*
* send a query to run against a specified array/URI registered to a group/project, returns file bytes
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param contentType Content Type of input and return mime (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @return File
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and result bytes are returned
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502
Bad Gateway
-
0
error response
-
*/
public File getFile(String namespace, String array, String contentType, String xPayer) throws ApiException {
ApiResponse localVarResp = getFileWithHttpInfo(namespace, array, contentType, xPayer);
return localVarResp.getData();
}
/**
*
* send a query to run against a specified array/URI registered to a group/project, returns file bytes
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param contentType Content Type of input and return mime (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @return ApiResponse<File>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and result bytes are returned
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502
Bad Gateway
-
0
error response
-
*/
public ApiResponse getFileWithHttpInfo(String namespace, String array, String contentType, String xPayer) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(namespace, array, contentType, xPayer, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* send a query to run against a specified array/URI registered to a group/project, returns file bytes
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param contentType Content Type of input and return mime (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and result bytes are returned
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call getFileAsync(String namespace, String array, String contentType, String xPayer, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = getFileValidateBeforeCall(namespace, array, contentType, xPayer, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for submitQuery
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call submitQueryCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = query;
// create path and map variables
String localVarPath = "/arrays/{namespace}/{array}/query/submit"
.replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (type != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("type", type));
}
if (openAt != null) {
localVarQueryParams.addAll(localVarApiClient.parameterToPair("open_at", openAt));
}
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (xPayer != null) {
localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer));
}
final String[] localVarAccepts = {
"application/json", "application/capnp"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json", "application/capnp"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call submitQueryValidateBeforeCall(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling submitQuery(Async)");
}
// verify the required parameter 'array' is set
if (array == null) {
throw new ApiException("Missing the required parameter 'array' when calling submitQuery(Async)");
}
// verify the required parameter 'type' is set
if (type == null) {
throw new ApiException("Missing the required parameter 'type' when calling submitQuery(Async)");
}
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling submitQuery(Async)");
}
// verify the required parameter 'query' is set
if (query == null) {
throw new ApiException("Missing the required parameter 'query' when calling submitQuery(Async)");
}
okhttp3.Call localVarCall = submitQueryCall(namespace, array, type, contentType, query, xPayer, openAt, _callback);
return localVarCall;
}
/**
*
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @return Query
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public Query submitQuery(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt) throws ApiException {
ApiResponse localVarResp = submitQueryWithHttpInfo(namespace, array, type, contentType, query, xPayer, openAt);
return localVarResp.getData();
}
/**
*
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @return ApiResponse<Query>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public ApiResponse submitQueryWithHttpInfo(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt) throws ApiException {
okhttp3.Call localVarCall = submitQueryValidateBeforeCall(namespace, array, type, contentType, query, xPayer, openAt, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
* send a query to run against a specified array/URI registered to a group/project
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param type type of query (required)
* @param contentType Content Type of input and return mime (required)
* @param query query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param openAt open_at for array in unix epoch (optional)
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in query object
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
204
query completed successfully with no return
-
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call submitQueryAsync(String namespace, String array, String type, String contentType, Query query, String xPayer, Integer openAt, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = submitQueryValidateBeforeCall(namespace, array, type, contentType, query, xPayer, openAt, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
/**
* Build call for submitQueryJson
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param contentType Content Type of input and return mime (required)
* @param queryJson query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in JSON format
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request
502
Bad Gateway
-
0
error response
-
*/
public okhttp3.Call submitQueryJsonCall(String namespace, String array, String contentType, QueryJson queryJson, String xPayer, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
// Determine Base Path to Use
if (localCustomBaseUrl != null){
basePath = localCustomBaseUrl;
} else if ( localBasePaths.length > 0 ) {
basePath = localBasePaths[localHostIndex];
} else {
basePath = null;
}
Object localVarPostBody = queryJson;
// create path and map variables
String localVarPath = "/arrays/{namespace}/{array}/query/submit_query_json"
.replaceAll("\\{" + "namespace" + "\\}", localVarApiClient.escapeString(namespace.toString()))
.replaceAll("\\{" + "array" + "\\}", localVarApiClient.escapeString(array.toString()));
List localVarQueryParams = new ArrayList();
List localVarCollectionQueryParams = new ArrayList();
Map localVarHeaderParams = new HashMap();
Map localVarCookieParams = new HashMap();
Map localVarFormParams = new HashMap();
if (contentType != null) {
localVarHeaderParams.put("Content-Type", localVarApiClient.parameterToString(contentType));
}
if (xPayer != null) {
localVarHeaderParams.put("X-Payer", localVarApiClient.parameterToString(xPayer));
}
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
"application/json"
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
if (localVarContentType != null) {
localVarHeaderParams.put("Content-Type", localVarContentType);
}
String[] localVarAuthNames = new String[] { "ApiKeyAuth", "BasicAuth" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call submitQueryJsonValidateBeforeCall(String namespace, String array, String contentType, QueryJson queryJson, String xPayer, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'namespace' is set
if (namespace == null) {
throw new ApiException("Missing the required parameter 'namespace' when calling submitQueryJson(Async)");
}
// verify the required parameter 'array' is set
if (array == null) {
throw new ApiException("Missing the required parameter 'array' when calling submitQueryJson(Async)");
}
// verify the required parameter 'contentType' is set
if (contentType == null) {
throw new ApiException("Missing the required parameter 'contentType' when calling submitQueryJson(Async)");
}
// verify the required parameter 'queryJson' is set
if (queryJson == null) {
throw new ApiException("Missing the required parameter 'queryJson' when calling submitQueryJson(Async)");
}
okhttp3.Call localVarCall = submitQueryJsonCall(namespace, array, contentType, queryJson, xPayer, _callback);
return localVarCall;
}
/**
*
* send a query to run against a specified array/URI registered to a group/project, returns JSON results
* @param namespace namespace array is in (an organization name or user's username) (required)
* @param array name/uri of array that is url-encoded (required)
* @param contentType Content Type of input and return mime (required)
* @param queryJson query to run (required)
* @param xPayer Name of organization or user who should be charged for this request (optional)
* @return Object
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Status Code
Description
Response Headers
200
query completed and results are returned in JSON format
* X-TILEDB-CLOUD-TASK-ID - Task ID for just completed request