diff --git a/.sdk-version b/.sdk-version index c219f72..130165b 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.4.0 +v3.6.0 diff --git a/README.md b/README.md index 7feff33..15995f8 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.4.0 + 3.6.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.4.0" + implementation "ai.reveng:sdk:3.6.0" } ``` diff --git a/build.gradle b/build.gradle index af1b96f..4f69009 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.4.0' +version = '3.6.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.4.0") + coordinates("ai.reveng", "sdk", "3.6.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index f37bdb8..878f88b 100644 --- a/build.sbt +++ b/build.sbt @@ -2,7 +2,7 @@ lazy val root = (project in file(".")). settings( organization := "ai.reveng", name := "sdk", - version := "3.4.0", + version := "3.6.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AnalysesResultsMetadataApi.md b/docs/AnalysesResultsMetadataApi.md index 8c063e0..79e8809 100644 --- a/docs/AnalysesResultsMetadataApi.md +++ b/docs/AnalysesResultsMetadataApi.md @@ -228,7 +228,7 @@ public class Example { # **getFunctionsList** -> BaseResponseAnalysisFunctions getFunctionsList(analysisId, searchTerm, minVAddr, maxVAddr) +> BaseResponseAnalysisFunctions getFunctionsList(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize) Gets functions from analysis @@ -260,8 +260,11 @@ public class Example { String searchTerm = "searchTerm_example"; // String | Integer minVAddr = 56; // Integer | Integer maxVAddr = 56; // Integer | + Boolean includeEmbeddings = true; // Boolean | + Integer page = 1; // Integer | The page number to retrieve. + Integer pageSize = 1000; // Integer | Number of items per page. try { - BaseResponseAnalysisFunctions result = apiInstance.getFunctionsList(analysisId, searchTerm, minVAddr, maxVAddr); + BaseResponseAnalysisFunctions result = apiInstance.getFunctionsList(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling AnalysesResultsMetadataApi#getFunctionsList"); @@ -282,6 +285,9 @@ public class Example { | **searchTerm** | **String**| | [optional] | | **minVAddr** | **Integer**| | [optional] | | **maxVAddr** | **Integer**| | [optional] | +| **includeEmbeddings** | **Boolean**| | [optional] [default to true] | +| **page** | **Integer**| The page number to retrieve. | [optional] [default to 1] | +| **pageSize** | **Integer**| Number of items per page. | [optional] [default to 1000] | ### Return type diff --git a/pom.xml b/pom.xml index bd92544..1e9aac2 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.4.0 + 3.6.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java b/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java index 6b9a23b..a0a8863 100644 --- a/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java +++ b/src/main/java/ai/reveng/api/AnalysesResultsMetadataApi.java @@ -501,6 +501,9 @@ public okhttp3.Call getCommunitiesAsync(@javax.annotation.Nonnull Integer analys * @param searchTerm (optional) * @param minVAddr (optional) * @param maxVAddr (optional) + * @param includeEmbeddings (optional, default to true) + * @param page The page number to retrieve. (optional, default to 1) + * @param pageSize Number of items per page. (optional, default to 1000) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -514,7 +517,7 @@ public okhttp3.Call getCommunitiesAsync(@javax.annotation.Nonnull Integer analys * @deprecated */ @Deprecated - public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, @javax.annotation.Nullable Boolean includeEmbeddings, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -552,6 +555,18 @@ public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analy localVarQueryParams.addAll(localVarApiClient.parameterToPair("max_v_addr", maxVAddr)); } + if (includeEmbeddings != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_embeddings", includeEmbeddings)); + } + + if (page != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); + } + + if (pageSize != null) { + localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); + } + final String[] localVarAccepts = { "application/json" }; @@ -573,13 +588,13 @@ public okhttp3.Call getFunctionsListCall(@javax.annotation.Nonnull Integer analy @Deprecated @SuppressWarnings("rawtypes") - private okhttp3.Call getFunctionsListValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getFunctionsListValidateBeforeCall(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, @javax.annotation.Nullable Boolean includeEmbeddings, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, 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 getFunctionsList(Async)"); } - return getFunctionsListCall(analysisId, searchTerm, minVAddr, maxVAddr, _callback); + return getFunctionsListCall(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize, _callback); } @@ -590,6 +605,9 @@ private okhttp3.Call getFunctionsListValidateBeforeCall(@javax.annotation.Nonnul * @param searchTerm (optional) * @param minVAddr (optional) * @param maxVAddr (optional) + * @param includeEmbeddings (optional, default to true) + * @param page The page number to retrieve. (optional, default to 1) + * @param pageSize Number of items per page. (optional, default to 1000) * @return BaseResponseAnalysisFunctions * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -602,8 +620,8 @@ private okhttp3.Call getFunctionsListValidateBeforeCall(@javax.annotation.Nonnul * @deprecated */ @Deprecated - public BaseResponseAnalysisFunctions getFunctionsList(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr) throws ApiException { - ApiResponse localVarResp = getFunctionsListWithHttpInfo(analysisId, searchTerm, minVAddr, maxVAddr); + public BaseResponseAnalysisFunctions getFunctionsList(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, @javax.annotation.Nullable Boolean includeEmbeddings, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize) throws ApiException { + ApiResponse localVarResp = getFunctionsListWithHttpInfo(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize); return localVarResp.getData(); } @@ -614,6 +632,9 @@ public BaseResponseAnalysisFunctions getFunctionsList(@javax.annotation.Nonnull * @param searchTerm (optional) * @param minVAddr (optional) * @param maxVAddr (optional) + * @param includeEmbeddings (optional, default to true) + * @param page The page number to retrieve. (optional, default to 1) + * @param pageSize Number of items per page. (optional, default to 1000) * @return ApiResponse<BaseResponseAnalysisFunctions> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -626,8 +647,8 @@ public BaseResponseAnalysisFunctions getFunctionsList(@javax.annotation.Nonnull * @deprecated */ @Deprecated - public ApiResponse getFunctionsListWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr) throws ApiException { - okhttp3.Call localVarCall = getFunctionsListValidateBeforeCall(analysisId, searchTerm, minVAddr, maxVAddr, null); + public ApiResponse getFunctionsListWithHttpInfo(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, @javax.annotation.Nullable Boolean includeEmbeddings, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize) throws ApiException { + okhttp3.Call localVarCall = getFunctionsListValidateBeforeCall(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -639,6 +660,9 @@ public ApiResponse getFunctionsListWithHttpInfo(@ * @param searchTerm (optional) * @param minVAddr (optional) * @param maxVAddr (optional) + * @param includeEmbeddings (optional, default to true) + * @param page The page number to retrieve. (optional, default to 1) + * @param pageSize Number of items per page. (optional, default to 1000) * @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 @@ -652,9 +676,9 @@ public ApiResponse getFunctionsListWithHttpInfo(@ * @deprecated */ @Deprecated - public okhttp3.Call getFunctionsListAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getFunctionsListAsync(@javax.annotation.Nonnull Integer analysisId, @javax.annotation.Nullable String searchTerm, @javax.annotation.Nullable Integer minVAddr, @javax.annotation.Nullable Integer maxVAddr, @javax.annotation.Nullable Boolean includeEmbeddings, @javax.annotation.Nullable Integer page, @javax.annotation.Nullable Integer pageSize, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getFunctionsListValidateBeforeCall(analysisId, searchTerm, minVAddr, maxVAddr, _callback); + okhttp3.Call localVarCall = getFunctionsListValidateBeforeCall(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index 1cd7c6d..863d0a3 100644 --- a/src/main/java/ai/reveng/invoker/ApiClient.java +++ b/src/main/java/ai/reveng/invoker/ApiClient.java @@ -146,7 +146,7 @@ protected void init() { json = new JSON(); // Set default User-Agent. - setUserAgent("OpenAPI-Generator/3.4.0/java"); + setUserAgent("OpenAPI-Generator/3.6.0/java"); authentications = new HashMap(); } diff --git a/src/main/java/ai/reveng/invoker/Configuration.java b/src/main/java/ai/reveng/invoker/Configuration.java index 99d0cea..7a3101d 100644 --- a/src/main/java/ai/reveng/invoker/Configuration.java +++ b/src/main/java/ai/reveng/invoker/Configuration.java @@ -18,7 +18,7 @@ @javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") public class Configuration { - public static final String VERSION = "3.4.0"; + public static final String VERSION = "3.6.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/test/java/ai/reveng/api/AnalysesResultsMetadataApiTest.java b/src/test/java/ai/reveng/api/AnalysesResultsMetadataApiTest.java index 6cfb30a..fcd3766 100644 --- a/src/test/java/ai/reveng/api/AnalysesResultsMetadataApiTest.java +++ b/src/test/java/ai/reveng/api/AnalysesResultsMetadataApiTest.java @@ -91,7 +91,10 @@ public void getFunctionsListTest() throws ApiException { String searchTerm = null; Integer minVAddr = null; Integer maxVAddr = null; - BaseResponseAnalysisFunctions response = api.getFunctionsList(analysisId, searchTerm, minVAddr, maxVAddr); + Boolean includeEmbeddings = null; + Integer page = null; + Integer pageSize = null; + BaseResponseAnalysisFunctions response = api.getFunctionsList(analysisId, searchTerm, minVAddr, maxVAddr, includeEmbeddings, page, pageSize); // TODO: test validations }