Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v2.42.0
v2.43.0
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>ai.reveng</groupId>
<artifactId>sdk</artifactId>
<version>2.42.0</version>
<version>2.43.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -31,7 +31,7 @@ repositories {
}

dependencies {
implementation "ai.reveng:sdk:2.42.0"
implementation "ai.reveng:sdk:2.43.0"
}
```

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ apply plugin: 'java'
apply plugin: 'com.diffplug.spotless'

group = 'ai.reveng'
version = '2.42.0'
version = '2.43.0'



Expand Down Expand Up @@ -171,7 +171,7 @@ mavenPublishing {
publishToMavenCentral(true)
signAllPublications()

coordinates("ai.reveng", "sdk", "2.42.0")
coordinates("ai.reveng", "sdk", "2.43.0")

pom {
name = "sdk"
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ lazy val root = (project in file(".")).
settings(
organization := "ai.reveng",
name := "sdk",
version := "2.42.0",
version := "2.43.0",
scalaVersion := "2.11.12",
scalacOptions ++= Seq("-feature"),
compile / javacOptions ++= Seq("-Xlint:deprecation"),
Expand Down
12 changes: 8 additions & 4 deletions docs/AnalysesCoreApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ All URIs are relative to *https://api.reveng.ai*

<a id="createAnalysis"></a>
# **createAnalysis**
> BaseResponseAnalysisCreateResponse createAnalysis(analysisCreateRequest)
> BaseResponseAnalysisCreateResponse createAnalysis(analysisCreateRequest, xRevEngApplication)

Create Analysis

Expand Down Expand Up @@ -50,8 +50,9 @@ public class Example {

AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient);
AnalysisCreateRequest analysisCreateRequest = new AnalysisCreateRequest(); // AnalysisCreateRequest |
String xRevEngApplication = "xRevEngApplication_example"; // String |
try {
BaseResponseAnalysisCreateResponse result = apiInstance.createAnalysis(analysisCreateRequest);
BaseResponseAnalysisCreateResponse result = apiInstance.createAnalysis(analysisCreateRequest, xRevEngApplication);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnalysesCoreApi#createAnalysis");
Expand All @@ -69,6 +70,7 @@ public class Example {
| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **analysisCreateRequest** | [**AnalysisCreateRequest**](AnalysisCreateRequest.md)| | |
| **xRevEngApplication** | **String**| | [optional] |

### Return type

Expand Down Expand Up @@ -675,7 +677,7 @@ public class Example {

<a id="requeueAnalysis"></a>
# **requeueAnalysis**
> BaseResponseCreated requeueAnalysis(analysisId, reAnalysisForm)
> BaseResponseCreated requeueAnalysis(analysisId, reAnalysisForm, xRevEngApplication)

Requeue Analysis

Expand Down Expand Up @@ -705,8 +707,9 @@ public class Example {
AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient);
Integer analysisId = 56; // Integer |
ReAnalysisForm reAnalysisForm = new ReAnalysisForm(); // ReAnalysisForm |
String xRevEngApplication = "xRevEngApplication_example"; // String |
try {
BaseResponseCreated result = apiInstance.requeueAnalysis(analysisId, reAnalysisForm);
BaseResponseCreated result = apiInstance.requeueAnalysis(analysisId, reAnalysisForm, xRevEngApplication);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling AnalysesCoreApi#requeueAnalysis");
Expand All @@ -725,6 +728,7 @@ public class Example {
|------------- | ------------- | ------------- | -------------|
| **analysisId** | **Integer**| | |
| **reAnalysisForm** | [**ReAnalysisForm**](ReAnalysisForm.md)| | |
| **xRevEngApplication** | **String**| | [optional] |

### Return type

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>sdk</artifactId>
<packaging>jar</packaging>
<name>sdk</name>
<version>2.42.0</version>
<version>2.43.0</version>
<url>https://github.com/RevEngAI/sdk-java</url>
<description>Java SDK for the RevEng.AI API</description>
<scm>
Expand Down
54 changes: 36 additions & 18 deletions src/main/java/ai/reveng/api/AnalysesCoreApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
/**
* Build call for createAnalysis
* @param analysisCreateRequest (required)
* @param xRevEngApplication (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Expand All @@ -111,7 +112,7 @@ public void setCustomBaseUrl(String customBaseUrl) {
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public okhttp3.Call createAnalysisCall(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, final ApiCallback _callback) throws ApiException {
public okhttp3.Call createAnalysisCall(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, @javax.annotation.Nullable String xRevEngApplication, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
Expand Down Expand Up @@ -152,25 +153,31 @@ public okhttp3.Call createAnalysisCall(@javax.annotation.Nonnull AnalysisCreateR
localVarHeaderParams.put("Content-Type", localVarContentType);
}

if (xRevEngApplication != null) {
localVarHeaderParams.put("X-RevEng-Application", localVarApiClient.parameterToString(xRevEngApplication));
}


String[] localVarAuthNames = new String[] { "APIKey" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call createAnalysisValidateBeforeCall(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, final ApiCallback _callback) throws ApiException {
private okhttp3.Call createAnalysisValidateBeforeCall(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, @javax.annotation.Nullable String xRevEngApplication, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'analysisCreateRequest' is set
if (analysisCreateRequest == null) {
throw new ApiException("Missing the required parameter 'analysisCreateRequest' when calling createAnalysis(Async)");
}

return createAnalysisCall(analysisCreateRequest, _callback);
return createAnalysisCall(analysisCreateRequest, xRevEngApplication, _callback);

}

/**
* Create Analysis
* Begins an analysis
* @param analysisCreateRequest (required)
* @param xRevEngApplication (optional)
* @return BaseResponseAnalysisCreateResponse
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -183,15 +190,16 @@ private okhttp3.Call createAnalysisValidateBeforeCall(@javax.annotation.Nonnull
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public BaseResponseAnalysisCreateResponse createAnalysis(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest) throws ApiException {
ApiResponse<BaseResponseAnalysisCreateResponse> localVarResp = createAnalysisWithHttpInfo(analysisCreateRequest);
public BaseResponseAnalysisCreateResponse createAnalysis(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, @javax.annotation.Nullable String xRevEngApplication) throws ApiException {
ApiResponse<BaseResponseAnalysisCreateResponse> localVarResp = createAnalysisWithHttpInfo(analysisCreateRequest, xRevEngApplication);
return localVarResp.getData();
}

/**
* Create Analysis
* Begins an analysis
* @param analysisCreateRequest (required)
* @param xRevEngApplication (optional)
* @return ApiResponse&lt;BaseResponseAnalysisCreateResponse&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -204,8 +212,8 @@ public BaseResponseAnalysisCreateResponse createAnalysis(@javax.annotation.Nonnu
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public ApiResponse<BaseResponseAnalysisCreateResponse> createAnalysisWithHttpInfo(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest) throws ApiException {
okhttp3.Call localVarCall = createAnalysisValidateBeforeCall(analysisCreateRequest, null);
public ApiResponse<BaseResponseAnalysisCreateResponse> createAnalysisWithHttpInfo(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, @javax.annotation.Nullable String xRevEngApplication) throws ApiException {
okhttp3.Call localVarCall = createAnalysisValidateBeforeCall(analysisCreateRequest, xRevEngApplication, null);
Type localVarReturnType = new TypeToken<BaseResponseAnalysisCreateResponse>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
Expand All @@ -214,6 +222,7 @@ public ApiResponse<BaseResponseAnalysisCreateResponse> createAnalysisWithHttpInf
* Create Analysis (asynchronously)
* Begins an analysis
* @param analysisCreateRequest (required)
* @param xRevEngApplication (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
Expand All @@ -227,9 +236,9 @@ public ApiResponse<BaseResponseAnalysisCreateResponse> createAnalysisWithHttpInf
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public okhttp3.Call createAnalysisAsync(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, final ApiCallback<BaseResponseAnalysisCreateResponse> _callback) throws ApiException {
public okhttp3.Call createAnalysisAsync(@javax.annotation.Nonnull AnalysisCreateRequest analysisCreateRequest, @javax.annotation.Nullable String xRevEngApplication, final ApiCallback<BaseResponseAnalysisCreateResponse> _callback) throws ApiException {

okhttp3.Call localVarCall = createAnalysisValidateBeforeCall(analysisCreateRequest, _callback);
okhttp3.Call localVarCall = createAnalysisValidateBeforeCall(analysisCreateRequest, xRevEngApplication, _callback);
Type localVarReturnType = new TypeToken<BaseResponseAnalysisCreateResponse>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
Expand Down Expand Up @@ -1372,6 +1381,7 @@ public okhttp3.Call lookupBinaryIdAsync(@javax.annotation.Nonnull Integer binary
* Build call for requeueAnalysis
* @param analysisId (required)
* @param reAnalysisForm (required)
* @param xRevEngApplication (optional)
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
Expand All @@ -1385,7 +1395,7 @@ public okhttp3.Call lookupBinaryIdAsync(@javax.annotation.Nonnull Integer binary
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public okhttp3.Call requeueAnalysisCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, final ApiCallback _callback) throws ApiException {
public okhttp3.Call requeueAnalysisCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, @javax.annotation.Nullable String xRevEngApplication, final ApiCallback _callback) throws ApiException {
String basePath = null;
// Operation Servers
String[] localBasePaths = new String[] { };
Expand Down Expand Up @@ -1427,12 +1437,17 @@ public okhttp3.Call requeueAnalysisCall(@javax.annotation.Nonnull Integer analys
localVarHeaderParams.put("Content-Type", localVarContentType);
}

if (xRevEngApplication != null) {
localVarHeaderParams.put("X-RevEng-Application", localVarApiClient.parameterToString(xRevEngApplication));
}


String[] localVarAuthNames = new String[] { "APIKey" };
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
}

@SuppressWarnings("rawtypes")
private okhttp3.Call requeueAnalysisValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, final ApiCallback _callback) throws ApiException {
private okhttp3.Call requeueAnalysisValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, @javax.annotation.Nullable String xRevEngApplication, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'analysisId' is set
if (analysisId == null) {
throw new ApiException("Missing the required parameter 'analysisId' when calling requeueAnalysis(Async)");
Expand All @@ -1443,7 +1458,7 @@ private okhttp3.Call requeueAnalysisValidateBeforeCall(@javax.annotation.Nonnull
throw new ApiException("Missing the required parameter 'reAnalysisForm' when calling requeueAnalysis(Async)");
}

return requeueAnalysisCall(analysisId, reAnalysisForm, _callback);
return requeueAnalysisCall(analysisId, reAnalysisForm, xRevEngApplication, _callback);

}

Expand All @@ -1452,6 +1467,7 @@ private okhttp3.Call requeueAnalysisValidateBeforeCall(@javax.annotation.Nonnull
* Re-queues an already uploaded analysis
* @param analysisId (required)
* @param reAnalysisForm (required)
* @param xRevEngApplication (optional)
* @return BaseResponseCreated
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -1464,8 +1480,8 @@ private okhttp3.Call requeueAnalysisValidateBeforeCall(@javax.annotation.Nonnull
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public BaseResponseCreated requeueAnalysis(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm) throws ApiException {
ApiResponse<BaseResponseCreated> localVarResp = requeueAnalysisWithHttpInfo(analysisId, reAnalysisForm);
public BaseResponseCreated requeueAnalysis(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, @javax.annotation.Nullable String xRevEngApplication) throws ApiException {
ApiResponse<BaseResponseCreated> localVarResp = requeueAnalysisWithHttpInfo(analysisId, reAnalysisForm, xRevEngApplication);
return localVarResp.getData();
}

Expand All @@ -1474,6 +1490,7 @@ public BaseResponseCreated requeueAnalysis(@javax.annotation.Nonnull Integer ana
* Re-queues an already uploaded analysis
* @param analysisId (required)
* @param reAnalysisForm (required)
* @param xRevEngApplication (optional)
* @return ApiResponse&lt;BaseResponseCreated&gt;
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
Expand All @@ -1486,8 +1503,8 @@ public BaseResponseCreated requeueAnalysis(@javax.annotation.Nonnull Integer ana
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public ApiResponse<BaseResponseCreated> requeueAnalysisWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm) throws ApiException {
okhttp3.Call localVarCall = requeueAnalysisValidateBeforeCall(analysisId, reAnalysisForm, null);
public ApiResponse<BaseResponseCreated> requeueAnalysisWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, @javax.annotation.Nullable String xRevEngApplication) throws ApiException {
okhttp3.Call localVarCall = requeueAnalysisValidateBeforeCall(analysisId, reAnalysisForm, xRevEngApplication, null);
Type localVarReturnType = new TypeToken<BaseResponseCreated>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
Expand All @@ -1497,6 +1514,7 @@ public ApiResponse<BaseResponseCreated> requeueAnalysisWithHttpInfo(@javax.annot
* Re-queues an already uploaded analysis
* @param analysisId (required)
* @param reAnalysisForm (required)
* @param xRevEngApplication (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
Expand All @@ -1510,9 +1528,9 @@ public ApiResponse<BaseResponseCreated> requeueAnalysisWithHttpInfo(@javax.annot
<tr><td> 400 </td><td> Bad Request </td><td> - </td></tr>
</table>
*/
public okhttp3.Call requeueAnalysisAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, final ApiCallback<BaseResponseCreated> _callback) throws ApiException {
public okhttp3.Call requeueAnalysisAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nonnull ReAnalysisForm reAnalysisForm, @javax.annotation.Nullable String xRevEngApplication, final ApiCallback<BaseResponseCreated> _callback) throws ApiException {

okhttp3.Call localVarCall = requeueAnalysisValidateBeforeCall(analysisId, reAnalysisForm, _callback);
okhttp3.Call localVarCall = requeueAnalysisValidateBeforeCall(analysisId, reAnalysisForm, xRevEngApplication, _callback);
Type localVarReturnType = new TypeToken<BaseResponseCreated>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("OpenAPI-Generator/2.42.0/java");
setUserAgent("OpenAPI-Generator/2.43.0/java");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ai/reveng/invoker/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "2.42.0";
public static final String VERSION = "2.43.0";

private static final AtomicReference<ApiClient> defaultApiClient = new AtomicReference<>();
private static volatile Supplier<ApiClient> apiClientFactory = ApiClient::new;
Expand Down
6 changes: 4 additions & 2 deletions src/test/java/ai/reveng/api/AnalysesCoreApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public class AnalysesCoreApiTest {
@Test
public void createAnalysisTest() throws ApiException {
AnalysisCreateRequest analysisCreateRequest = null;
BaseResponseAnalysisCreateResponse response = api.createAnalysis(analysisCreateRequest);
String xRevEngApplication = null;
BaseResponseAnalysisCreateResponse response = api.createAnalysis(analysisCreateRequest, xRevEngApplication);
// TODO: test validations
}

Expand Down Expand Up @@ -201,7 +202,8 @@ public void lookupBinaryIdTest() throws ApiException {
public void requeueAnalysisTest() throws ApiException {
Integer analysisId = null;
ReAnalysisForm reAnalysisForm = null;
BaseResponseCreated response = api.requeueAnalysis(analysisId, reAnalysisForm);
String xRevEngApplication = null;
BaseResponseCreated response = api.requeueAnalysis(analysisId, reAnalysisForm, xRevEngApplication);
// TODO: test validations
}

Expand Down