diff --git a/.sdk-version b/.sdk-version index 1d0f469..800e0bc 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.70.2 +v3.72.0 diff --git a/README.md b/README.md index c5a48a5..19b726a 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.70.2 + 3.72.0 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.70.2" + implementation "ai.reveng:sdk:3.72.0" } ``` @@ -456,6 +456,7 @@ Class | Method | HTTP request | Description - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) + - [RegenerateTarget](docs/RegenerateTarget.md) - [Registry](docs/Registry.md) - [RelativeBinaryResponse](docs/RelativeBinaryResponse.md) - [ReportAnalysisResponse](docs/ReportAnalysisResponse.md) diff --git a/build.gradle b/build.gradle index b2d1372..002ebbe 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.70.2' +version = '3.72.0' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.70.2") + coordinates("ai.reveng", "sdk", "3.72.0") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index 0b49255..ae38278 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.70.2", + version := "3.72.0", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 5f8eedf..77c6bf3 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -1178,7 +1178,7 @@ public class Example { AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); UploadFileType uploadFileType = UploadFileType.fromValue("BINARY"); // UploadFileType | - File _file = new File("/path/to/file"); // File | + String _file = "_file_example"; // String | String packedPassword = "packedPassword_example"; // String | String endpointUrl = "endpointUrl_example"; // String | String localCacheDir = "localCacheDir_example"; // String | @@ -1206,7 +1206,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| | **uploadFileType** | [**UploadFileType**](UploadFileType.md)| | [enum: BINARY, DEBUG, PACKED, FIRMWARE] | -| **_file** | **File**| | | +| **_file** | **String**| | | | **packedPassword** | **String**| | [optional] | | **endpointUrl** | **String**| | [optional] | | **localCacheDir** | **String**| | [optional] | diff --git a/docs/FirmwareApi.md b/docs/FirmwareApi.md index 0e8e757..03f3858 100644 --- a/docs/FirmwareApi.md +++ b/docs/FirmwareApi.md @@ -108,7 +108,7 @@ public class Example { //APIKey.setApiKeyPrefix("Token"); FirmwareApi apiInstance = new FirmwareApi(defaultClient); - File _file = new File("/path/to/file"); // File | + String _file = "_file_example"; // String | String endpointUrl = "endpointUrl_example"; // String | String localCacheDir = "localCacheDir_example"; // String | Integer localCacheMaxSizeMb = 56; // Integer | @@ -134,7 +134,7 @@ public class Example { | Name | Type | Description | Notes | |------------- | ------------- | ------------- | -------------| -| **_file** | **File**| | | +| **_file** | **String**| | | | **endpointUrl** | **String**| | [optional] | | **localCacheDir** | **String**| | [optional] | | **localCacheMaxSizeMb** | **Integer**| | [optional] | diff --git a/docs/FunctionMappingFull.md b/docs/FunctionMappingFull.md index fecc4ab..6949a49 100644 --- a/docs/FunctionMappingFull.md +++ b/docs/FunctionMappingFull.md @@ -20,6 +20,7 @@ |**unmatchedGlobalVars** | [**Map<String, InverseValue>**](InverseValue.md) | | | |**fields** | **Map<String, Map<String, InverseValue>>** | | | |**unmatchedExternalVars** | [**Map<String, InverseValue>**](InverseValue.md) | No longer provided. | [optional] | +|**userOverrideMappings** | **Map<String, String>** | | [optional] | diff --git a/docs/FunctionsAiDecompilationApi.md b/docs/FunctionsAiDecompilationApi.md index 5c0306e..c4aeee5 100644 --- a/docs/FunctionsAiDecompilationApi.md +++ b/docs/FunctionsAiDecompilationApi.md @@ -412,7 +412,7 @@ public class Example { # **getAiDecompilationTaskResult** -> BaseResponseGetAiDecompilationTask getAiDecompilationTaskResult(functionId, summarise, generateInlineComments) +> BaseResponseGetAiDecompilationTask getAiDecompilationTaskResult(functionId, summarise, generateInlineComments, forceRegenerate) Polls AI Decompilation Process @@ -443,8 +443,9 @@ public class Example { Long functionId = 56L; // Long | The ID of the function being decompiled Boolean summarise = true; // Boolean | Generate a summary for the decompilation Boolean generateInlineComments = true; // Boolean | Generate inline comments for the decompilation + List forceRegenerate = Arrays.asList(); // List | Force regeneration of summary and/or comments. try { - BaseResponseGetAiDecompilationTask result = apiInstance.getAiDecompilationTaskResult(functionId, summarise, generateInlineComments); + BaseResponseGetAiDecompilationTask result = apiInstance.getAiDecompilationTaskResult(functionId, summarise, generateInlineComments, forceRegenerate); System.out.println(result); } catch (ApiException e) { System.err.println("Exception when calling FunctionsAiDecompilationApi#getAiDecompilationTaskResult"); @@ -464,6 +465,7 @@ public class Example { | **functionId** | **Long**| The ID of the function being decompiled | | | **summarise** | **Boolean**| Generate a summary for the decompilation | [optional] [default to true] | | **generateInlineComments** | **Boolean**| Generate inline comments for the decompilation | [optional] [default to true] | +| **forceRegenerate** | [**List<RegenerateTarget>**](RegenerateTarget.md)| Force regeneration of summary and/or comments. | [optional] | ### Return type diff --git a/docs/RegenerateTarget.md b/docs/RegenerateTarget.md new file mode 100644 index 0000000..1c061de --- /dev/null +++ b/docs/RegenerateTarget.md @@ -0,0 +1,13 @@ + + +# RegenerateTarget + +## Enum + + +* `SUMMARY` (value: `"summary"`) + +* `COMMENTS` (value: `"comments"`) + + + diff --git a/pom.xml b/pom.xml index 6f43e24..0cb5fef 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.70.2 + 3.72.0 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/AnalysesCoreApi.java b/src/main/java/ai/reveng/api/AnalysesCoreApi.java index 7fc5007..f054dff 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -44,7 +44,6 @@ import ai.reveng.model.BaseResponseStatus; import ai.reveng.model.BaseResponseUploadResponse; import ai.reveng.model.DynamicExecutionStatusInput; -import java.io.File; import ai.reveng.model.InsertAnalysisLogRequest; import ai.reveng.model.ModelName; import ai.reveng.model.Order; @@ -2556,7 +2555,7 @@ public okhttp3.Call updateAnalysisTagsAsync(@javax.annotation.Nonnull Integer an 422 Invalid request parameters - */ - public okhttp3.Call uploadFileCall(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull File _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadFileCall(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull String _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -2642,7 +2641,7 @@ public okhttp3.Call uploadFileCall(@javax.annotation.Nonnull UploadFileType uplo } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadFileValidateBeforeCall(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull File _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadFileValidateBeforeCall(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull String _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite, final ApiCallback _callback) throws ApiException { // verify the required parameter 'uploadFileType' is set if (uploadFileType == null) { throw new ApiException("Missing the required parameter 'uploadFileType' when calling uploadFile(Async)"); @@ -2680,7 +2679,7 @@ private okhttp3.Call uploadFileValidateBeforeCall(@javax.annotation.Nonnull Uplo 422 Invalid request parameters - */ - public BaseResponseUploadResponse uploadFile(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull File _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite) throws ApiException { + public BaseResponseUploadResponse uploadFile(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull String _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite) throws ApiException { ApiResponse localVarResp = uploadFileWithHttpInfo(uploadFileType, _file, packedPassword, endpointUrl, localCacheDir, localCacheMaxSizeMb, customerSamplesBucket, firmwareSamplesBucket, maxRetryAttempts, forceOverwrite); return localVarResp.getData(); } @@ -2708,7 +2707,7 @@ public BaseResponseUploadResponse uploadFile(@javax.annotation.Nonnull UploadFil 422 Invalid request parameters - */ - public ApiResponse uploadFileWithHttpInfo(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull File _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite) throws ApiException { + public ApiResponse uploadFileWithHttpInfo(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull String _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite) throws ApiException { okhttp3.Call localVarCall = uploadFileValidateBeforeCall(uploadFileType, _file, packedPassword, endpointUrl, localCacheDir, localCacheMaxSizeMb, customerSamplesBucket, firmwareSamplesBucket, maxRetryAttempts, forceOverwrite, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -2738,7 +2737,7 @@ public ApiResponse uploadFileWithHttpInfo(@javax.ann 422 Invalid request parameters - */ - public okhttp3.Call uploadFileAsync(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull File _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadFileAsync(@javax.annotation.Nonnull UploadFileType uploadFileType, @javax.annotation.Nonnull String _file, @javax.annotation.Nullable String packedPassword, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable Boolean forceOverwrite, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadFileValidateBeforeCall(uploadFileType, _file, packedPassword, endpointUrl, localCacheDir, localCacheMaxSizeMb, customerSamplesBucket, firmwareSamplesBucket, maxRetryAttempts, forceOverwrite, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/ai/reveng/api/FirmwareApi.java b/src/main/java/ai/reveng/api/FirmwareApi.java index d7353f7..f2eb594 100644 --- a/src/main/java/ai/reveng/api/FirmwareApi.java +++ b/src/main/java/ai/reveng/api/FirmwareApi.java @@ -27,7 +27,6 @@ import ai.reveng.model.BaseResponse; -import java.io.File; import java.lang.reflect.Type; import java.util.ArrayList; @@ -225,7 +224,7 @@ public okhttp3.Call getBinariesForFirmwareTaskAsync(@javax.annotation.Nonnull St 500 Internal Server Error - */ - public okhttp3.Call uploadFirmwareCall(@javax.annotation.Nonnull File _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadFirmwareCall(@javax.annotation.Nonnull String _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -303,7 +302,7 @@ public okhttp3.Call uploadFirmwareCall(@javax.annotation.Nonnull File _file, @ja } @SuppressWarnings("rawtypes") - private okhttp3.Call uploadFirmwareValidateBeforeCall(@javax.annotation.Nonnull File _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password, final ApiCallback _callback) throws ApiException { + private okhttp3.Call uploadFirmwareValidateBeforeCall(@javax.annotation.Nonnull String _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password, final ApiCallback _callback) throws ApiException { // verify the required parameter '_file' is set if (_file == null) { throw new ApiException("Missing the required parameter '_file' when calling uploadFirmware(Async)"); @@ -335,7 +334,7 @@ private okhttp3.Call uploadFirmwareValidateBeforeCall(@javax.annotation.Nonnull 500 Internal Server Error - */ - public Object uploadFirmware(@javax.annotation.Nonnull File _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password) throws ApiException { + public Object uploadFirmware(@javax.annotation.Nonnull String _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password) throws ApiException { ApiResponse localVarResp = uploadFirmwareWithHttpInfo(_file, endpointUrl, localCacheDir, localCacheMaxSizeMb, customerSamplesBucket, firmwareSamplesBucket, maxRetryAttempts, password); return localVarResp.getData(); } @@ -362,7 +361,7 @@ public Object uploadFirmware(@javax.annotation.Nonnull File _file, @javax.annota 500 Internal Server Error - */ - public ApiResponse uploadFirmwareWithHttpInfo(@javax.annotation.Nonnull File _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password) throws ApiException { + public ApiResponse uploadFirmwareWithHttpInfo(@javax.annotation.Nonnull String _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password) throws ApiException { okhttp3.Call localVarCall = uploadFirmwareValidateBeforeCall(_file, endpointUrl, localCacheDir, localCacheMaxSizeMb, customerSamplesBucket, firmwareSamplesBucket, maxRetryAttempts, password, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); @@ -391,7 +390,7 @@ public ApiResponse uploadFirmwareWithHttpInfo(@javax.annotation.Nonnull 500 Internal Server Error - */ - public okhttp3.Call uploadFirmwareAsync(@javax.annotation.Nonnull File _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password, final ApiCallback _callback) throws ApiException { + public okhttp3.Call uploadFirmwareAsync(@javax.annotation.Nonnull String _file, @javax.annotation.Nullable String endpointUrl, @javax.annotation.Nullable String localCacheDir, @javax.annotation.Nullable Integer localCacheMaxSizeMb, @javax.annotation.Nullable String customerSamplesBucket, @javax.annotation.Nullable String firmwareSamplesBucket, @javax.annotation.Nullable Integer maxRetryAttempts, @javax.annotation.Nullable String password, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = uploadFirmwareValidateBeforeCall(_file, endpointUrl, localCacheDir, localCacheMaxSizeMb, customerSamplesBucket, firmwareSamplesBucket, maxRetryAttempts, password, _callback); Type localVarReturnType = new TypeToken(){}.getType(); diff --git a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java index 5f0b35e..b174332 100644 --- a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java +++ b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java @@ -35,6 +35,7 @@ import ai.reveng.model.BaseResponseUnionGetAiDecompilationRatingResponseNoneType; import ai.reveng.model.CommentUpdateRequest; import ai.reveng.model.FunctionCommentCreateRequest; +import ai.reveng.model.RegenerateTarget; import ai.reveng.model.UpsertAiDecomplationRatingRequest; import java.lang.reflect.Type; @@ -932,6 +933,7 @@ public okhttp3.Call getAiDecompilationRatingAsync(@javax.annotation.Nonnull Long * @param functionId The ID of the function being decompiled (required) * @param summarise Generate a summary for the decompilation (optional, default to true) * @param generateInlineComments Generate inline comments for the decompilation (optional, default to true) + * @param forceRegenerate Force regeneration of summary and/or comments. (optional) * @param _callback Callback for upload/download progress * @return Call to execute * @throws ApiException If fail to serialize the request body object @@ -944,7 +946,7 @@ public okhttp3.Call getAiDecompilationRatingAsync(@javax.annotation.Nonnull Long 403 Forbidden - */ - public okhttp3.Call getAiDecompilationTaskResultCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAiDecompilationTaskResultCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, @javax.annotation.Nullable List forceRegenerate, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; @@ -978,6 +980,10 @@ public okhttp3.Call getAiDecompilationTaskResultCall(@javax.annotation.Nonnull L localVarQueryParams.addAll(localVarApiClient.parameterToPair("generate_inline_comments", generateInlineComments)); } + if (forceRegenerate != null) { + localVarCollectionQueryParams.addAll(localVarApiClient.parameterToPairs("multi", "force_regenerate", forceRegenerate)); + } + final String[] localVarAccepts = { "application/json" }; @@ -998,13 +1004,13 @@ public okhttp3.Call getAiDecompilationTaskResultCall(@javax.annotation.Nonnull L } @SuppressWarnings("rawtypes") - private okhttp3.Call getAiDecompilationTaskResultValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, final ApiCallback _callback) throws ApiException { + private okhttp3.Call getAiDecompilationTaskResultValidateBeforeCall(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, @javax.annotation.Nullable List forceRegenerate, final ApiCallback _callback) throws ApiException { // verify the required parameter 'functionId' is set if (functionId == null) { throw new ApiException("Missing the required parameter 'functionId' when calling getAiDecompilationTaskResult(Async)"); } - return getAiDecompilationTaskResultCall(functionId, summarise, generateInlineComments, _callback); + return getAiDecompilationTaskResultCall(functionId, summarise, generateInlineComments, forceRegenerate, _callback); } @@ -1014,6 +1020,7 @@ private okhttp3.Call getAiDecompilationTaskResultValidateBeforeCall(@javax.annot * @param functionId The ID of the function being decompiled (required) * @param summarise Generate a summary for the decompilation (optional, default to true) * @param generateInlineComments Generate inline comments for the decompilation (optional, default to true) + * @param forceRegenerate Force regeneration of summary and/or comments. (optional) * @return BaseResponseGetAiDecompilationTask * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1025,8 +1032,8 @@ private okhttp3.Call getAiDecompilationTaskResultValidateBeforeCall(@javax.annot 403 Forbidden - */ - public BaseResponseGetAiDecompilationTask getAiDecompilationTaskResult(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments) throws ApiException { - ApiResponse localVarResp = getAiDecompilationTaskResultWithHttpInfo(functionId, summarise, generateInlineComments); + public BaseResponseGetAiDecompilationTask getAiDecompilationTaskResult(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, @javax.annotation.Nullable List forceRegenerate) throws ApiException { + ApiResponse localVarResp = getAiDecompilationTaskResultWithHttpInfo(functionId, summarise, generateInlineComments, forceRegenerate); return localVarResp.getData(); } @@ -1036,6 +1043,7 @@ public BaseResponseGetAiDecompilationTask getAiDecompilationTaskResult(@javax.an * @param functionId The ID of the function being decompiled (required) * @param summarise Generate a summary for the decompilation (optional, default to true) * @param generateInlineComments Generate inline comments for the decompilation (optional, default to true) + * @param forceRegenerate Force regeneration of summary and/or comments. (optional) * @return ApiResponse<BaseResponseGetAiDecompilationTask> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details @@ -1047,8 +1055,8 @@ public BaseResponseGetAiDecompilationTask getAiDecompilationTaskResult(@javax.an 403 Forbidden - */ - public ApiResponse getAiDecompilationTaskResultWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments) throws ApiException { - okhttp3.Call localVarCall = getAiDecompilationTaskResultValidateBeforeCall(functionId, summarise, generateInlineComments, null); + public ApiResponse getAiDecompilationTaskResultWithHttpInfo(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, @javax.annotation.Nullable List forceRegenerate) throws ApiException { + okhttp3.Call localVarCall = getAiDecompilationTaskResultValidateBeforeCall(functionId, summarise, generateInlineComments, forceRegenerate, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } @@ -1059,6 +1067,7 @@ public ApiResponse getAiDecompilationTaskRes * @param functionId The ID of the function being decompiled (required) * @param summarise Generate a summary for the decompilation (optional, default to true) * @param generateInlineComments Generate inline comments for the decompilation (optional, default to true) + * @param forceRegenerate Force regeneration of summary and/or comments. (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 @@ -1071,9 +1080,9 @@ public ApiResponse getAiDecompilationTaskRes 403 Forbidden - */ - public okhttp3.Call getAiDecompilationTaskResultAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, final ApiCallback _callback) throws ApiException { + public okhttp3.Call getAiDecompilationTaskResultAsync(@javax.annotation.Nonnull Long functionId, @javax.annotation.Nullable Boolean summarise, @javax.annotation.Nullable Boolean generateInlineComments, @javax.annotation.Nullable List forceRegenerate, final ApiCallback _callback) throws ApiException { - okhttp3.Call localVarCall = getAiDecompilationTaskResultValidateBeforeCall(functionId, summarise, generateInlineComments, _callback); + okhttp3.Call localVarCall = getAiDecompilationTaskResultValidateBeforeCall(functionId, summarise, generateInlineComments, forceRegenerate, _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 f199113..199fa6c 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.70.2/java"); + setUserAgent("OpenAPI-Generator/3.72.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 2cb6eae..fd6fed2 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.70.2"; + public static final String VERSION = "3.72.0"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/model/FunctionMappingFull.java b/src/main/java/ai/reveng/model/FunctionMappingFull.java index 0a5ab68..ae2ad15 100644 --- a/src/main/java/ai/reveng/model/FunctionMappingFull.java +++ b/src/main/java/ai/reveng/model/FunctionMappingFull.java @@ -122,6 +122,11 @@ public class FunctionMappingFull { @javax.annotation.Nullable private Map unmatchedExternalVars = new HashMap<>(); + public static final String SERIALIZED_NAME_USER_OVERRIDE_MAPPINGS = "user_override_mappings"; + @SerializedName(SERIALIZED_NAME_USER_OVERRIDE_MAPPINGS) + @javax.annotation.Nullable + private Map userOverrideMappings = new HashMap<>(); + public FunctionMappingFull() { } @@ -479,6 +484,33 @@ public void setUnmatchedExternalVars(@javax.annotation.Nullable Map userOverrideMappings) { + this.userOverrideMappings = userOverrideMappings; + return this; + } + + public FunctionMappingFull putUserOverrideMappingsItem(String key, String userOverrideMappingsItem) { + if (this.userOverrideMappings == null) { + this.userOverrideMappings = new HashMap<>(); + } + this.userOverrideMappings.put(key, userOverrideMappingsItem); + return this; + } + + /** + * Get userOverrideMappings + * @return userOverrideMappings + */ + @javax.annotation.Nullable + public Map getUserOverrideMappings() { + return userOverrideMappings; + } + + public void setUserOverrideMappings(@javax.annotation.Nullable Map userOverrideMappings) { + this.userOverrideMappings = userOverrideMappings; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -546,13 +578,14 @@ public boolean equals(Object o) { Objects.equals(this.unmatchedEnums, functionMappingFull.unmatchedEnums) && Objects.equals(this.unmatchedGlobalVars, functionMappingFull.unmatchedGlobalVars) && Objects.equals(this.fields, functionMappingFull.fields) && - Objects.equals(this.unmatchedExternalVars, functionMappingFull.unmatchedExternalVars)&& + Objects.equals(this.unmatchedExternalVars, functionMappingFull.unmatchedExternalVars) && + Objects.equals(this.userOverrideMappings, functionMappingFull.userOverrideMappings)&& Objects.equals(this.additionalProperties, functionMappingFull.additionalProperties); } @Override public int hashCode() { - return Objects.hash(inverseStringMap, inverseFunctionMap, unmatchedFunctions, unmatchedCustomTypes, unmatchedStrings, unmatchedVars, unmatchedGoToLabels, unmatchedCustomFunctionPointers, unmatchedVariadicLists, unmatchedEnums, unmatchedGlobalVars, fields, unmatchedExternalVars, additionalProperties); + return Objects.hash(inverseStringMap, inverseFunctionMap, unmatchedFunctions, unmatchedCustomTypes, unmatchedStrings, unmatchedVars, unmatchedGoToLabels, unmatchedCustomFunctionPointers, unmatchedVariadicLists, unmatchedEnums, unmatchedGlobalVars, fields, unmatchedExternalVars, userOverrideMappings, additionalProperties); } @Override @@ -572,6 +605,7 @@ public String toString() { sb.append(" unmatchedGlobalVars: ").append(toIndentedString(unmatchedGlobalVars)).append("\n"); sb.append(" fields: ").append(toIndentedString(fields)).append("\n"); sb.append(" unmatchedExternalVars: ").append(toIndentedString(unmatchedExternalVars)).append("\n"); + sb.append(" userOverrideMappings: ").append(toIndentedString(userOverrideMappings)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -594,7 +628,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "unmatched_enums", "unmatched_global_vars", "fields", "unmatched_external_vars")); + openapiFields = new HashSet(Arrays.asList("inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "unmatched_enums", "unmatched_global_vars", "fields", "unmatched_external_vars", "user_override_mappings")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("inverse_string_map", "inverse_function_map", "unmatched_functions", "unmatched_custom_types", "unmatched_strings", "unmatched_vars", "unmatched_go_to_labels", "unmatched_custom_function_pointers", "unmatched_variadic_lists", "unmatched_enums", "unmatched_global_vars", "fields")); diff --git a/src/main/java/ai/reveng/model/RegenerateTarget.java b/src/main/java/ai/reveng/model/RegenerateTarget.java new file mode 100644 index 0000000..d3310ae --- /dev/null +++ b/src/main/java/ai/reveng/model/RegenerateTarget.java @@ -0,0 +1,79 @@ +/* + * RevEng.AI API + * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +package ai.reveng.model; + +import java.util.Objects; +import java.util.Locale; +import com.google.gson.annotations.SerializedName; + +import java.io.IOException; +import java.util.Locale; +import com.google.gson.TypeAdapter; +import com.google.gson.JsonElement; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; + +/** + * Gets or Sets RegenerateTarget + */ +@JsonAdapter(RegenerateTarget.Adapter.class) +public enum RegenerateTarget { + + SUMMARY("summary"), + + COMMENTS("comments"); + + private String value; + + RegenerateTarget(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static RegenerateTarget fromValue(String value) { + for (RegenerateTarget b : RegenerateTarget.values()) { + if (b.value.equals(value)) { + return b; + } + } + throw new IllegalArgumentException("Unexpected value '" + value + "'"); + } + + public static class Adapter extends TypeAdapter { + @Override + public void write(final JsonWriter jsonWriter, final RegenerateTarget enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public RegenerateTarget read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return RegenerateTarget.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + RegenerateTarget.fromValue(value); + } +} +