Skip to content

Commit

Permalink
regenerate java client (#55)
Browse files Browse the repository at this point in the history
Regenerates the java client based on latest Swagger files.

Picked up many changes: Sources Api, Commits API, etc.
  • Loading branch information
notnoop authored Aug 9, 2023
1 parent afdf17b commit 9ef6a1c
Show file tree
Hide file tree
Showing 198 changed files with 8,828 additions and 4,955 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/rockset/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

package com.rockset.client;

import com.fasterxml.jackson.databind.DeserializationFeature;
import com.rockset.client.model.ErrorModel;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.squareup.okhttp.*;
import com.squareup.okhttp.internal.http.HttpMethod;
import com.squareup.okhttp.logging.HttpLoggingInterceptor;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rockset/client/ApiException.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import java.util.Map;
import java.util.List;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-22T11:16:43.952-05:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-08-08T22:21:01.705Z")
public class ApiException extends Exception {
private int code = 0;
private Map<String, List<String>> responseHeaders = null;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rockset/client/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package com.rockset.client;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-22T11:16:43.952-05:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-08-08T22:21:01.705Z")
public class Configuration {
private static ApiClient defaultApiClient = new ApiClient();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rockset/client/Pair.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package com.rockset.client;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-22T11:16:43.952-05:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-08-08T22:21:01.705Z")
public class Pair {
private String name = "";
private String value = "";
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/rockset/client/StringUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

package com.rockset.client;

@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2022-11-22T11:16:43.952-05:00")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2023-08-08T22:21:01.705Z")
public class StringUtil {
/**
* Check if the given array contains the given value (with case-insensitive comparison).
Expand Down
287 changes: 287 additions & 0 deletions src/main/java/com/rockset/client/api/CollectionsApi.java

Large diffs are not rendered by default.

24 changes: 15 additions & 9 deletions src/main/java/com/rockset/client/api/QueriesApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,13 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
* @param queryId (required)
* @param cursor Cursor to current page. If unset, will default to the first page. (optional)
* @param docs Number of documents to fetch. (optional)
* @param offset Offset from the cursor of the first document to be returned (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws Exception If fail to serialize the request body object
*/
public com.squareup.okhttp.Call get_0Call(String queryId, String cursor, Integer docs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {
public com.squareup.okhttp.Call get_0Call(String queryId, String cursor, Integer docs, Integer offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {
Object localVarPostBody = null;

// create path and map variables
Expand All @@ -329,6 +330,8 @@ public com.squareup.okhttp.Call get_0Call(String queryId, String cursor, Integer
localVarQueryParams.addAll(apiClient.parameterToPair("cursor", cursor));
if (docs != null)
localVarQueryParams.addAll(apiClient.parameterToPair("docs", docs));
if (offset != null)
localVarQueryParams.addAll(apiClient.parameterToPair("offset", offset));

Map<String, String> localVarHeaderParams = new HashMap<String, String>();

Expand Down Expand Up @@ -363,15 +366,15 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}

@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call get_0ValidateBeforeCall(String queryId, String cursor, Integer docs, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {
private com.squareup.okhttp.Call get_0ValidateBeforeCall(String queryId, String cursor, Integer docs, Integer offset, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {

// verify the required parameter 'queryId' is set
if (queryId == null) {
throw new Exception("Missing the required parameter 'queryId' when calling get_0(Async)");
}


com.squareup.okhttp.Call call = get_0Call(queryId, cursor, docs, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = get_0Call(queryId, cursor, docs, offset, progressListener, progressRequestListener);
return call;

}
Expand All @@ -382,11 +385,12 @@ private com.squareup.okhttp.Call get_0ValidateBeforeCall(String queryId, String
* @param queryId (required)
* @param cursor Cursor to current page. If unset, will default to the first page. (optional)
* @param docs Number of documents to fetch. (optional)
* @param offset Offset from the cursor of the first document to be returned (optional)
* @return QueryPaginationResponse
* @throws Exception If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public QueryPaginationResponse get_0(String queryId, String cursor, Integer docs) throws Exception {
ApiResponse<QueryPaginationResponse> resp = get_0WithHttpInfo(queryId, cursor, docs);
public QueryPaginationResponse get_0(String queryId, String cursor, Integer docs, Integer offset) throws Exception {
ApiResponse<QueryPaginationResponse> resp = get_0WithHttpInfo(queryId, cursor, docs, offset);
return resp.getData();
}

Expand All @@ -396,11 +400,12 @@ public QueryPaginationResponse get_0(String queryId, String cursor, Integer docs
* @param queryId (required)
* @param cursor Cursor to current page. If unset, will default to the first page. (optional)
* @param docs Number of documents to fetch. (optional)
* @param offset Offset from the cursor of the first document to be returned (optional)
* @return ApiResponse&lt;QueryPaginationResponse&gt;
* @throws Exception If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<QueryPaginationResponse> get_0WithHttpInfo(String queryId, String cursor, Integer docs) throws Exception {
com.squareup.okhttp.Call call = get_0ValidateBeforeCall(queryId, cursor, docs, null, null);
public ApiResponse<QueryPaginationResponse> get_0WithHttpInfo(String queryId, String cursor, Integer docs, Integer offset) throws Exception {
com.squareup.okhttp.Call call = get_0ValidateBeforeCall(queryId, cursor, docs, offset, null, null);
Type localVarReturnType = new TypeToken<QueryPaginationResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}
Expand All @@ -411,11 +416,12 @@ public ApiResponse<QueryPaginationResponse> get_0WithHttpInfo(String queryId, St
* @param queryId (required)
* @param cursor Cursor to current page. If unset, will default to the first page. (optional)
* @param docs Number of documents to fetch. (optional)
* @param offset Offset from the cursor of the first document to be returned (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws Exception If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call get_0Async(String queryId, String cursor, Integer docs, final ApiCallback<QueryPaginationResponse> callback) throws Exception {
public com.squareup.okhttp.Call get_0Async(String queryId, String cursor, Integer docs, Integer offset, final ApiCallback<QueryPaginationResponse> callback) throws Exception {

ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
Expand All @@ -436,7 +442,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}

com.squareup.okhttp.Call call = get_0ValidateBeforeCall(queryId, cursor, docs, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = get_0ValidateBeforeCall(queryId, cursor, docs, offset, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<QueryPaginationResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
Expand Down
33 changes: 19 additions & 14 deletions src/main/java/com/rockset/client/api/SharedLambdasApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@


import com.rockset.client.model.ErrorModel;
import com.rockset.client.model.ExecutePublicQueryLambdaRequest;
import com.rockset.client.model.QueryResponse;

import java.lang.reflect.Type;
Expand Down Expand Up @@ -57,13 +58,14 @@ public void setApiClient(ApiClient apiClient) {
/**
* Build call for execute
* @param publicAccessId public access ID of the query lambda (required)
* @param body JSON object (optional)
* @param progressListener Progress listener
* @param progressRequestListener Progress request listener
* @return Call to execute
* @throws Exception If fail to serialize the request body object
*/
public com.squareup.okhttp.Call executeCall(String publicAccessId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {
Object localVarPostBody = null;
public com.squareup.okhttp.Call executeCall(String publicAccessId, ExecutePublicQueryLambdaRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {
Object localVarPostBody = body;

// create path and map variables
String localVarPath = "/v1/public/shared_lambdas/{public_access_id}"
Expand Down Expand Up @@ -101,57 +103,60 @@ public com.squareup.okhttp.Response intercept(com.squareup.okhttp.Interceptor.Ch
}

String[] localVarAuthNames = new String[] { };
return apiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
return apiClient.buildCall(localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, progressRequestListener);
}

@SuppressWarnings("rawtypes")
private com.squareup.okhttp.Call executeValidateBeforeCall(String publicAccessId, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {
private com.squareup.okhttp.Call executeValidateBeforeCall(String publicAccessId, ExecutePublicQueryLambdaRequest body, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws Exception {

// verify the required parameter 'publicAccessId' is set
if (publicAccessId == null) {
throw new Exception("Missing the required parameter 'publicAccessId' when calling execute(Async)");
}


com.squareup.okhttp.Call call = executeCall(publicAccessId, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = executeCall(publicAccessId, body, progressListener, progressRequestListener);
return call;

}

/**
* Execute a Public Query Lambda
* Execute a public query lambda.
* Execute a public query lambda (full version).
* @param publicAccessId public access ID of the query lambda (required)
* @param body JSON object (optional)
* @return QueryResponse
* @throws Exception If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public QueryResponse execute(String publicAccessId) throws Exception {
ApiResponse<QueryResponse> resp = executeWithHttpInfo(publicAccessId);
public QueryResponse execute(String publicAccessId, ExecutePublicQueryLambdaRequest body) throws Exception {
ApiResponse<QueryResponse> resp = executeWithHttpInfo(publicAccessId, body);
return resp.getData();
}

/**
* Execute a Public Query Lambda
* Execute a public query lambda.
* Execute a public query lambda (full version).
* @param publicAccessId public access ID of the query lambda (required)
* @param body JSON object (optional)
* @return ApiResponse&lt;QueryResponse&gt;
* @throws Exception If fail to call the API, e.g. server error or cannot deserialize the response body
*/
public ApiResponse<QueryResponse> executeWithHttpInfo(String publicAccessId) throws Exception {
com.squareup.okhttp.Call call = executeValidateBeforeCall(publicAccessId, null, null);
public ApiResponse<QueryResponse> executeWithHttpInfo(String publicAccessId, ExecutePublicQueryLambdaRequest body) throws Exception {
com.squareup.okhttp.Call call = executeValidateBeforeCall(publicAccessId, body, null, null);
Type localVarReturnType = new TypeToken<QueryResponse>(){}.getType();
return apiClient.execute(call, localVarReturnType);
}

/**
* Execute a Public Query Lambda (asynchronously)
* Execute a public query lambda.
* Execute a public query lambda (full version).
* @param publicAccessId public access ID of the query lambda (required)
* @param body JSON object (optional)
* @param callback The callback to be executed when the API call finishes
* @return The request call
* @throws Exception If fail to process the API call, e.g. serializing the request body object
*/
public com.squareup.okhttp.Call executeAsync(String publicAccessId, final ApiCallback<QueryResponse> callback) throws Exception {
public com.squareup.okhttp.Call executeAsync(String publicAccessId, ExecutePublicQueryLambdaRequest body, final ApiCallback<QueryResponse> callback) throws Exception {

ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener progressRequestListener = null;
Expand All @@ -172,7 +177,7 @@ public void onRequestProgress(long bytesWritten, long contentLength, boolean don
};
}

com.squareup.okhttp.Call call = executeValidateBeforeCall(publicAccessId, progressListener, progressRequestListener);
com.squareup.okhttp.Call call = executeValidateBeforeCall(publicAccessId, body, progressListener, progressRequestListener);
Type localVarReturnType = new TypeToken<QueryResponse>(){}.getType();
apiClient.executeAsync(call, localVarReturnType, callback);
return call;
Expand Down
Loading

0 comments on commit 9ef6a1c

Please sign in to comment.