diff --git a/.sdk-version b/.sdk-version index 4fa0b58..6aee6ff 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.24.0 +v3.28.2 diff --git a/README.md b/README.md index e552481..6deeaa4 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.24.0 + 3.28.2 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.24.0" + implementation "ai.reveng:sdk:3.28.2" } ``` @@ -80,6 +80,7 @@ Class | Method | HTTP request | Description *AnalysesCommentsApi* | [**deleteAnalysisComment**](docs/AnalysesCommentsApi.md#deleteAnalysisComment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment *AnalysesCommentsApi* | [**getAnalysisComments**](docs/AnalysesCommentsApi.md#getAnalysisComments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis *AnalysesCommentsApi* | [**updateAnalysisComment**](docs/AnalysesCommentsApi.md#updateAnalysisComment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment +*AnalysesCoreApi* | [**bulkAddAnalysisTags**](docs/AnalysesCoreApi.md#bulkAddAnalysisTags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags *AnalysesCoreApi* | [**createAnalysis**](docs/AnalysesCoreApi.md#createAnalysis) | **POST** /v2/analyses | Create Analysis *AnalysesCoreApi* | [**deleteAnalysis**](docs/AnalysesCoreApi.md#deleteAnalysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis *AnalysesCoreApi* | [**getAnalysisBasicInfo**](docs/AnalysesCoreApi.md#getAnalysisBasicInfo) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information @@ -189,8 +190,12 @@ Class | Method | HTTP request | Description - [AdditionalDetailsStatusResponse](docs/AdditionalDetailsStatusResponse.md) - [Addr](docs/Addr.md) - [AiDecompilationRating](docs/AiDecompilationRating.md) + - [AiDecompilationTaskStatus](docs/AiDecompilationTaskStatus.md) - [AiUnstripRequest](docs/AiUnstripRequest.md) - [AnalysisAccessInfo](docs/AnalysisAccessInfo.md) + - [AnalysisBulkAddTagsRequest](docs/AnalysisBulkAddTagsRequest.md) + - [AnalysisBulkAddTagsResponse](docs/AnalysisBulkAddTagsResponse.md) + - [AnalysisBulkAddTagsResponseItem](docs/AnalysisBulkAddTagsResponseItem.md) - [AnalysisConfig](docs/AnalysisConfig.md) - [AnalysisCreateRequest](docs/AnalysisCreateRequest.md) - [AnalysisCreateResponse](docs/AnalysisCreateResponse.md) @@ -218,6 +223,7 @@ Class | Method | HTTP request | Description - [AutoUnstripResponse](docs/AutoUnstripResponse.md) - [BaseResponse](docs/BaseResponse.md) - [BaseResponseAdditionalDetailsStatusResponse](docs/BaseResponseAdditionalDetailsStatusResponse.md) + - [BaseResponseAnalysisBulkAddTagsResponse](docs/BaseResponseAnalysisBulkAddTagsResponse.md) - [BaseResponseAnalysisCreateResponse](docs/BaseResponseAnalysisCreateResponse.md) - [BaseResponseAnalysisDetailResponse](docs/BaseResponseAnalysisDetailResponse.md) - [BaseResponseAnalysisFunctionMapping](docs/BaseResponseAnalysisFunctionMapping.md) diff --git a/build.gradle b/build.gradle index de08f02..7c738e0 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.24.0' +version = '3.28.2' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.24.0") + coordinates("ai.reveng", "sdk", "3.28.2") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index a29d178..0ed6178 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.24.0", + version := "3.28.2", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AiDecompilationTaskStatus.md b/docs/AiDecompilationTaskStatus.md new file mode 100644 index 0000000..5d4cdcb --- /dev/null +++ b/docs/AiDecompilationTaskStatus.md @@ -0,0 +1,17 @@ + + +# AiDecompilationTaskStatus + +## Enum + + +* `UNINITIALISED` (value: `"uninitialised"`) + +* `ERROR` (value: `"error"`) + +* `PENDING` (value: `"pending"`) + +* `SUCCESS` (value: `"success"`) + + + diff --git a/docs/AnalysesCoreApi.md b/docs/AnalysesCoreApi.md index 48b18b0..4efd09e 100644 --- a/docs/AnalysesCoreApi.md +++ b/docs/AnalysesCoreApi.md @@ -4,6 +4,7 @@ All URIs are relative to *https://api.reveng.ai* | Method | HTTP request | Description | |------------- | ------------- | -------------| +| [**bulkAddAnalysisTags**](AnalysesCoreApi.md#bulkAddAnalysisTags) | **PATCH** /v2/analyses/tags/add | Bulk Add Analysis Tags | | [**createAnalysis**](AnalysesCoreApi.md#createAnalysis) | **POST** /v2/analyses | Create Analysis | | [**deleteAnalysis**](AnalysesCoreApi.md#deleteAnalysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis | | [**getAnalysisBasicInfo**](AnalysesCoreApi.md#getAnalysisBasicInfo) | **GET** /v2/analyses/{analysis_id}/basic | Gets basic analysis information | @@ -20,6 +21,76 @@ All URIs are relative to *https://api.reveng.ai* | [**uploadFile**](AnalysesCoreApi.md#uploadFile) | **POST** /v2/upload | Upload File | + +# **bulkAddAnalysisTags** +> BaseResponseAnalysisBulkAddTagsResponse bulkAddAnalysisTags(analysisBulkAddTagsRequest) + +Bulk Add Analysis Tags + +Updates analysis tags for multiple analyses. User must be the owner. + +### Example +```java +// Import classes: +import ai.reveng.invoker.ApiClient; +import ai.reveng.invoker.ApiException; +import ai.reveng.invoker.Configuration; +import ai.reveng.invoker.auth.*; +import ai.reveng.invoker.models.*; +import ai.reveng.api.AnalysesCoreApi; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = Configuration.getDefaultApiClient(); + defaultClient.setBasePath("https://api.reveng.ai"); + + // Configure API key authorization: APIKey + ApiKeyAuth APIKey = (ApiKeyAuth) defaultClient.getAuthentication("APIKey"); + APIKey.setApiKey("YOUR API KEY"); + // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null) + //APIKey.setApiKeyPrefix("Token"); + + AnalysesCoreApi apiInstance = new AnalysesCoreApi(defaultClient); + AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest = new AnalysisBulkAddTagsRequest(); // AnalysisBulkAddTagsRequest | + try { + BaseResponseAnalysisBulkAddTagsResponse result = apiInstance.bulkAddAnalysisTags(analysisBulkAddTagsRequest); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling AnalysesCoreApi#bulkAddAnalysisTags"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} +``` + +### Parameters + +| Name | Type | Description | Notes | +|------------- | ------------- | ------------- | -------------| +| **analysisBulkAddTagsRequest** | [**AnalysisBulkAddTagsRequest**](AnalysisBulkAddTagsRequest.md)| | | + +### Return type + +[**BaseResponseAnalysisBulkAddTagsResponse**](BaseResponseAnalysisBulkAddTagsResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details +| Status code | Description | Response headers | +|-------------|-------------|------------------| +| **200** | Successful Response | - | +| **422** | Invalid request parameters | - | + # **createAnalysis** > BaseResponseAnalysisCreateResponse createAnalysis(analysisCreateRequest, xRevEngApplication) diff --git a/docs/AnalysisBulkAddTagsRequest.md b/docs/AnalysisBulkAddTagsRequest.md new file mode 100644 index 0000000..9a62fda --- /dev/null +++ b/docs/AnalysisBulkAddTagsRequest.md @@ -0,0 +1,14 @@ + + +# AnalysisBulkAddTagsRequest + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**tags** | **List<String>** | | | +|**analysisIds** | **List<Integer>** | | | + + + diff --git a/docs/AnalysisBulkAddTagsResponse.md b/docs/AnalysisBulkAddTagsResponse.md new file mode 100644 index 0000000..eaf3b6b --- /dev/null +++ b/docs/AnalysisBulkAddTagsResponse.md @@ -0,0 +1,13 @@ + + +# AnalysisBulkAddTagsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**results** | [**List<AnalysisBulkAddTagsResponseItem>**](AnalysisBulkAddTagsResponseItem.md) | | | + + + diff --git a/docs/AnalysisBulkAddTagsResponseItem.md b/docs/AnalysisBulkAddTagsResponseItem.md new file mode 100644 index 0000000..595418f --- /dev/null +++ b/docs/AnalysisBulkAddTagsResponseItem.md @@ -0,0 +1,15 @@ + + +# AnalysisBulkAddTagsResponseItem + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**analysisId** | **Integer** | | | +|**message** | **String** | | | +|**error** | **String** | | [optional] | + + + diff --git a/docs/AnalysisRecord.md b/docs/AnalysisRecord.md index c21dbb2..591d99a 100644 --- a/docs/AnalysisRecord.md +++ b/docs/AnalysisRecord.md @@ -23,6 +23,7 @@ |**dynamicExecutionStatus** | **AppApiRestV2AnalysesEnumsDynamicExecutionStatus** | | [optional] | |**dynamicExecutionTaskId** | **Integer** | | [optional] | |**baseAddress** | **BigInteger** | The base address of the binary | | +|**tags** | [**List<TagItem>**](TagItem.md) | List of tags associated with the analysis | [optional] | diff --git a/docs/BaseResponseAnalysisBulkAddTagsResponse.md b/docs/BaseResponseAnalysisBulkAddTagsResponse.md new file mode 100644 index 0000000..82af94f --- /dev/null +++ b/docs/BaseResponseAnalysisBulkAddTagsResponse.md @@ -0,0 +1,17 @@ + + +# BaseResponseAnalysisBulkAddTagsResponse + + +## Properties + +| Name | Type | Description | Notes | +|------------ | ------------- | ------------- | -------------| +|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | +|**data** | [**AnalysisBulkAddTagsResponse**](AnalysisBulkAddTagsResponse.md) | | [optional] | +|**message** | **String** | | [optional] | +|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | +|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | + + + diff --git a/docs/GetAiDecompilationTask.md b/docs/GetAiDecompilationTask.md index 683cb46..bda4b10 100644 --- a/docs/GetAiDecompilationTask.md +++ b/docs/GetAiDecompilationTask.md @@ -7,7 +7,7 @@ | Name | Type | Description | Notes | |------------ | ------------- | ------------- | -------------| -|**status** | **String** | | | +|**status** | **AiDecompilationTaskStatus** | The status of the AI decompilation task | | |**decompilation** | **String** | | | |**rawDecompilation** | **String** | | | |**functionMapping** | [**Map<String, InverseFunctionMapItem>**](InverseFunctionMapItem.md) | | | diff --git a/pom.xml b/pom.xml index 0bbeb74..f39f2ab 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.24.0 + 3.28.2 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 8a1206a..ce8cabe 100644 --- a/src/main/java/ai/reveng/api/AnalysesCoreApi.java +++ b/src/main/java/ai/reveng/api/AnalysesCoreApi.java @@ -26,11 +26,13 @@ import java.io.IOException; +import ai.reveng.model.AnalysisBulkAddTagsRequest; import ai.reveng.model.AnalysisCreateRequest; import ai.reveng.model.AnalysisUpdateRequest; import ai.reveng.model.AnalysisUpdateTagsRequest; import ai.reveng.model.AppApiRestV2AnalysesEnumsOrderBy; import ai.reveng.model.BaseResponse; +import ai.reveng.model.BaseResponseAnalysisBulkAddTagsResponse; import ai.reveng.model.BaseResponseAnalysisCreateResponse; import ai.reveng.model.BaseResponseAnalysisDetailResponse; import ai.reveng.model.BaseResponseAnalysisFunctionMapping; @@ -96,6 +98,137 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } + /** + * Build call for bulkAddAnalysisTags + * @param analysisBulkAddTagsRequest (required) + * @param _callback Callback for upload/download progress + * @return Call to execute + * @throws ApiException If fail to serialize the request body object + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public okhttp3.Call bulkAddAnalysisTagsCall(@javax.annotation.Nonnull AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest, 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 = analysisBulkAddTagsRequest; + + // create path and map variables + String localVarPath = "/v2/analyses/tags/add"; + + List localVarQueryParams = new ArrayList(); + List localVarCollectionQueryParams = new ArrayList(); + Map localVarHeaderParams = new HashMap(); + Map localVarCookieParams = new HashMap(); + Map localVarFormParams = new HashMap(); + + 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[] { "APIKey" }; + return localVarApiClient.buildCall(basePath, localVarPath, "PATCH", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); + } + + @SuppressWarnings("rawtypes") + private okhttp3.Call bulkAddAnalysisTagsValidateBeforeCall(@javax.annotation.Nonnull AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest, final ApiCallback _callback) throws ApiException { + // verify the required parameter 'analysisBulkAddTagsRequest' is set + if (analysisBulkAddTagsRequest == null) { + throw new ApiException("Missing the required parameter 'analysisBulkAddTagsRequest' when calling bulkAddAnalysisTags(Async)"); + } + + return bulkAddAnalysisTagsCall(analysisBulkAddTagsRequest, _callback); + + } + + /** + * Bulk Add Analysis Tags + * Updates analysis tags for multiple analyses. User must be the owner. + * @param analysisBulkAddTagsRequest (required) + * @return BaseResponseAnalysisBulkAddTagsResponse + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public BaseResponseAnalysisBulkAddTagsResponse bulkAddAnalysisTags(@javax.annotation.Nonnull AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest) throws ApiException { + ApiResponse localVarResp = bulkAddAnalysisTagsWithHttpInfo(analysisBulkAddTagsRequest); + return localVarResp.getData(); + } + + /** + * Bulk Add Analysis Tags + * Updates analysis tags for multiple analyses. User must be the owner. + * @param analysisBulkAddTagsRequest (required) + * @return ApiResponse<BaseResponseAnalysisBulkAddTagsResponse> + * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body + * @http.response.details + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public ApiResponse bulkAddAnalysisTagsWithHttpInfo(@javax.annotation.Nonnull AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest) throws ApiException { + okhttp3.Call localVarCall = bulkAddAnalysisTagsValidateBeforeCall(analysisBulkAddTagsRequest, null); + Type localVarReturnType = new TypeToken(){}.getType(); + return localVarApiClient.execute(localVarCall, localVarReturnType); + } + + /** + * Bulk Add Analysis Tags (asynchronously) + * Updates analysis tags for multiple analyses. User must be the owner. + * @param analysisBulkAddTagsRequest (required) + * @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 + + + + + +
Response Details
Status Code Description Response Headers
200 Successful Response -
422 Invalid request parameters -
+ */ + public okhttp3.Call bulkAddAnalysisTagsAsync(@javax.annotation.Nonnull AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest, final ApiCallback _callback) throws ApiException { + + okhttp3.Call localVarCall = bulkAddAnalysisTagsValidateBeforeCall(analysisBulkAddTagsRequest, _callback); + Type localVarReturnType = new TypeToken(){}.getType(); + localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); + return localVarCall; + } /** * Build call for createAnalysis * @param analysisCreateRequest (required) diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index a9adf38..aea342e 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.24.0/java"); + setUserAgent("OpenAPI-Generator/3.28.2/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 6715db3..3e21ca4 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.24.0"; + public static final String VERSION = "3.28.2"; private static final AtomicReference defaultApiClient = new AtomicReference<>(); private static volatile Supplier apiClientFactory = ApiClient::new; diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java index 85569c5..b7f3573 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -102,6 +102,9 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Addr.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AiUnstripRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisAccessInfo.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisBulkAddTagsRequest.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisBulkAddTagsResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisBulkAddTagsResponseItem.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisConfig.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisCreateRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AnalysisCreateResponse.CustomTypeAdapterFactory()); @@ -125,6 +128,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AutoUnstripResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAdditionalDetailsStatusResponse.CustomTypeAdapterFactory()); + gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisBulkAddTagsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisCreateResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisDetailResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseAnalysisFunctionMapping.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/AiDecompilationTaskStatus.java b/src/main/java/ai/reveng/model/AiDecompilationTaskStatus.java new file mode 100644 index 0000000..b81a41e --- /dev/null +++ b/src/main/java/ai/reveng/model/AiDecompilationTaskStatus.java @@ -0,0 +1,83 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 AiDecompilationTaskStatus + */ +@JsonAdapter(AiDecompilationTaskStatus.Adapter.class) +public enum AiDecompilationTaskStatus { + + UNINITIALISED("uninitialised"), + + ERROR("error"), + + PENDING("pending"), + + SUCCESS("success"); + + private String value; + + AiDecompilationTaskStatus(String value) { + this.value = value; + } + + public String getValue() { + return value; + } + + @Override + public String toString() { + return String.valueOf(value); + } + + public static AiDecompilationTaskStatus fromValue(String value) { + for (AiDecompilationTaskStatus b : AiDecompilationTaskStatus.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 AiDecompilationTaskStatus enumeration) throws IOException { + jsonWriter.value(enumeration.getValue()); + } + + @Override + public AiDecompilationTaskStatus read(final JsonReader jsonReader) throws IOException { + String value = jsonReader.nextString(); + return AiDecompilationTaskStatus.fromValue(value); + } + } + + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + String value = jsonElement.getAsString(); + AiDecompilationTaskStatus.fromValue(value); + } +} + diff --git a/src/main/java/ai/reveng/model/AnalysisBulkAddTagsRequest.java b/src/main/java/ai/reveng/model/AnalysisBulkAddTagsRequest.java new file mode 100644 index 0000000..28118af --- /dev/null +++ b/src/main/java/ai/reveng/model/AnalysisBulkAddTagsRequest.java @@ -0,0 +1,347 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import ai.reveng.invoker.JSON; + +/** + * AnalysisBulkAddTagsRequest + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AnalysisBulkAddTagsRequest { + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nonnull + private List tags = new ArrayList<>(); + + public static final String SERIALIZED_NAME_ANALYSIS_IDS = "analysis_ids"; + @SerializedName(SERIALIZED_NAME_ANALYSIS_IDS) + @javax.annotation.Nonnull + private List analysisIds = new ArrayList<>(); + + public AnalysisBulkAddTagsRequest() { + } + + public AnalysisBulkAddTagsRequest tags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + return this; + } + + public AnalysisBulkAddTagsRequest addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Get tags + * @return tags + */ + @javax.annotation.Nonnull + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nonnull List tags) { + this.tags = tags; + } + + + public AnalysisBulkAddTagsRequest analysisIds(@javax.annotation.Nonnull List analysisIds) { + this.analysisIds = analysisIds; + return this; + } + + public AnalysisBulkAddTagsRequest addAnalysisIdsItem(Integer analysisIdsItem) { + if (this.analysisIds == null) { + this.analysisIds = new ArrayList<>(); + } + this.analysisIds.add(analysisIdsItem); + return this; + } + + /** + * Get analysisIds + * @return analysisIds + */ + @javax.annotation.Nonnull + public List getAnalysisIds() { + return analysisIds; + } + + public void setAnalysisIds(@javax.annotation.Nonnull List analysisIds) { + this.analysisIds = analysisIds; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AnalysisBulkAddTagsRequest instance itself + */ + public AnalysisBulkAddTagsRequest putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest = (AnalysisBulkAddTagsRequest) o; + return Objects.equals(this.tags, analysisBulkAddTagsRequest.tags) && + Objects.equals(this.analysisIds, analysisBulkAddTagsRequest.analysisIds)&& + Objects.equals(this.additionalProperties, analysisBulkAddTagsRequest.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(tags, analysisIds, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalysisBulkAddTagsRequest {\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" analysisIds: ").append(toIndentedString(analysisIds)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("tags", "analysis_ids")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("tags", "analysis_ids")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnalysisBulkAddTagsRequest + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnalysisBulkAddTagsRequest.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AnalysisBulkAddTagsRequest is not found in the empty JSON string", AnalysisBulkAddTagsRequest.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnalysisBulkAddTagsRequest.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the required json array is present + if (jsonObj.get("tags") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + // ensure the required json array is present + if (jsonObj.get("analysis_ids") == null) { + throw new IllegalArgumentException("Expected the field `linkedContent` to be an array in the JSON string but got `null`"); + } else if (!jsonObj.get("analysis_ids").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `analysis_ids` to be an array in the JSON string but got `%s`", jsonObj.get("analysis_ids").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnalysisBulkAddTagsRequest.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnalysisBulkAddTagsRequest' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AnalysisBulkAddTagsRequest.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AnalysisBulkAddTagsRequest value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AnalysisBulkAddTagsRequest read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AnalysisBulkAddTagsRequest instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AnalysisBulkAddTagsRequest given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnalysisBulkAddTagsRequest + * @throws IOException if the JSON string is invalid with respect to AnalysisBulkAddTagsRequest + */ + public static AnalysisBulkAddTagsRequest fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnalysisBulkAddTagsRequest.class); + } + + /** + * Convert an instance of AnalysisBulkAddTagsRequest to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/AnalysisBulkAddTagsResponse.java b/src/main/java/ai/reveng/model/AnalysisBulkAddTagsResponse.java new file mode 100644 index 0000000..fa2440b --- /dev/null +++ b/src/main/java/ai/reveng/model/AnalysisBulkAddTagsResponse.java @@ -0,0 +1,312 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 ai.reveng.model.AnalysisBulkAddTagsResponseItem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import ai.reveng.invoker.JSON; + +/** + * AnalysisBulkAddTagsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AnalysisBulkAddTagsResponse { + public static final String SERIALIZED_NAME_RESULTS = "results"; + @SerializedName(SERIALIZED_NAME_RESULTS) + @javax.annotation.Nonnull + private List results = new ArrayList<>(); + + public AnalysisBulkAddTagsResponse() { + } + + public AnalysisBulkAddTagsResponse results(@javax.annotation.Nonnull List results) { + this.results = results; + return this; + } + + public AnalysisBulkAddTagsResponse addResultsItem(AnalysisBulkAddTagsResponseItem resultsItem) { + if (this.results == null) { + this.results = new ArrayList<>(); + } + this.results.add(resultsItem); + return this; + } + + /** + * Get results + * @return results + */ + @javax.annotation.Nonnull + public List getResults() { + return results; + } + + public void setResults(@javax.annotation.Nonnull List results) { + this.results = results; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AnalysisBulkAddTagsResponse instance itself + */ + public AnalysisBulkAddTagsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalysisBulkAddTagsResponse analysisBulkAddTagsResponse = (AnalysisBulkAddTagsResponse) o; + return Objects.equals(this.results, analysisBulkAddTagsResponse.results)&& + Objects.equals(this.additionalProperties, analysisBulkAddTagsResponse.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(results, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalysisBulkAddTagsResponse {\n"); + sb.append(" results: ").append(toIndentedString(results)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("results")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("results")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnalysisBulkAddTagsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnalysisBulkAddTagsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AnalysisBulkAddTagsResponse is not found in the empty JSON string", AnalysisBulkAddTagsResponse.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnalysisBulkAddTagsResponse.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // ensure the json data is an array + if (!jsonObj.get("results").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `results` to be an array in the JSON string but got `%s`", jsonObj.get("results").toString())); + } + + JsonArray jsonArrayresults = jsonObj.getAsJsonArray("results"); + // validate the required field `results` (array) + for (int i = 0; i < jsonArrayresults.size(); i++) { + AnalysisBulkAddTagsResponseItem.validateJsonElement(jsonArrayresults.get(i)); + }; + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnalysisBulkAddTagsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnalysisBulkAddTagsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AnalysisBulkAddTagsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AnalysisBulkAddTagsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AnalysisBulkAddTagsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AnalysisBulkAddTagsResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AnalysisBulkAddTagsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnalysisBulkAddTagsResponse + * @throws IOException if the JSON string is invalid with respect to AnalysisBulkAddTagsResponse + */ + public static AnalysisBulkAddTagsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnalysisBulkAddTagsResponse.class); + } + + /** + * Convert an instance of AnalysisBulkAddTagsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/AnalysisBulkAddTagsResponseItem.java b/src/main/java/ai/reveng/model/AnalysisBulkAddTagsResponseItem.java new file mode 100644 index 0000000..5910113 --- /dev/null +++ b/src/main/java/ai/reveng/model/AnalysisBulkAddTagsResponseItem.java @@ -0,0 +1,361 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import ai.reveng.invoker.JSON; + +/** + * AnalysisBulkAddTagsResponseItem + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class AnalysisBulkAddTagsResponseItem { + public static final String SERIALIZED_NAME_ANALYSIS_ID = "analysis_id"; + @SerializedName(SERIALIZED_NAME_ANALYSIS_ID) + @javax.annotation.Nonnull + private Integer analysisId; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public static final String SERIALIZED_NAME_ERROR = "error"; + @SerializedName(SERIALIZED_NAME_ERROR) + @javax.annotation.Nullable + private String error; + + public AnalysisBulkAddTagsResponseItem() { + } + + public AnalysisBulkAddTagsResponseItem analysisId(@javax.annotation.Nonnull Integer analysisId) { + this.analysisId = analysisId; + return this; + } + + /** + * Get analysisId + * @return analysisId + */ + @javax.annotation.Nonnull + public Integer getAnalysisId() { + return analysisId; + } + + public void setAnalysisId(@javax.annotation.Nonnull Integer analysisId) { + this.analysisId = analysisId; + } + + + public AnalysisBulkAddTagsResponseItem message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + public AnalysisBulkAddTagsResponseItem error(@javax.annotation.Nullable String error) { + this.error = error; + return this; + } + + /** + * Get error + * @return error + */ + @javax.annotation.Nullable + public String getError() { + return error; + } + + public void setError(@javax.annotation.Nullable String error) { + this.error = error; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the AnalysisBulkAddTagsResponseItem instance itself + */ + public AnalysisBulkAddTagsResponseItem putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + AnalysisBulkAddTagsResponseItem analysisBulkAddTagsResponseItem = (AnalysisBulkAddTagsResponseItem) o; + return Objects.equals(this.analysisId, analysisBulkAddTagsResponseItem.analysisId) && + Objects.equals(this.message, analysisBulkAddTagsResponseItem.message) && + Objects.equals(this.error, analysisBulkAddTagsResponseItem.error)&& + Objects.equals(this.additionalProperties, analysisBulkAddTagsResponseItem.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(analysisId, message, error, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class AnalysisBulkAddTagsResponseItem {\n"); + sb.append(" analysisId: ").append(toIndentedString(analysisId)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" error: ").append(toIndentedString(error)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("analysis_id", "message", "error")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(Arrays.asList("analysis_id", "message")); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to AnalysisBulkAddTagsResponseItem + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!AnalysisBulkAddTagsResponseItem.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AnalysisBulkAddTagsResponseItem is not found in the empty JSON string", AnalysisBulkAddTagsResponseItem.openapiRequiredFields.toString())); + } + } + + // check to make sure all required properties/fields are present in the JSON string + for (String requiredField : AnalysisBulkAddTagsResponseItem.openapiRequiredFields) { + if (jsonElement.getAsJsonObject().get(requiredField) == null) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field `%s` is not found in the JSON string: %s", requiredField, jsonElement.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if ((jsonObj.get("error") != null && !jsonObj.get("error").isJsonNull()) && !jsonObj.get("error").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString())); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!AnalysisBulkAddTagsResponseItem.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'AnalysisBulkAddTagsResponseItem' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(AnalysisBulkAddTagsResponseItem.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, AnalysisBulkAddTagsResponseItem value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public AnalysisBulkAddTagsResponseItem read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + AnalysisBulkAddTagsResponseItem instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of AnalysisBulkAddTagsResponseItem given an JSON string + * + * @param jsonString JSON string + * @return An instance of AnalysisBulkAddTagsResponseItem + * @throws IOException if the JSON string is invalid with respect to AnalysisBulkAddTagsResponseItem + */ + public static AnalysisBulkAddTagsResponseItem fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, AnalysisBulkAddTagsResponseItem.class); + } + + /** + * Convert an instance of AnalysisBulkAddTagsResponseItem to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/AnalysisRecord.java b/src/main/java/ai/reveng/model/AnalysisRecord.java index 6a0151b..786a68e 100644 --- a/src/main/java/ai/reveng/model/AnalysisRecord.java +++ b/src/main/java/ai/reveng/model/AnalysisRecord.java @@ -15,6 +15,7 @@ import java.util.Objects; import java.util.Locale; import ai.reveng.model.AppApiRestV2AnalysesEnumsDynamicExecutionStatus; +import ai.reveng.model.TagItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -23,7 +24,9 @@ import java.io.IOException; import java.math.BigInteger; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import com.google.gson.Gson; @@ -135,6 +138,11 @@ public class AnalysisRecord { @javax.annotation.Nonnull private BigInteger baseAddress; + public static final String SERIALIZED_NAME_TAGS = "tags"; + @SerializedName(SERIALIZED_NAME_TAGS) + @javax.annotation.Nullable + private List tags = new ArrayList<>(); + public AnalysisRecord() { } @@ -441,6 +449,33 @@ public void setBaseAddress(@javax.annotation.Nonnull BigInteger baseAddress) { this.baseAddress = baseAddress; } + + public AnalysisRecord tags(@javax.annotation.Nullable List tags) { + this.tags = tags; + return this; + } + + public AnalysisRecord addTagsItem(TagItem tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * List of tags associated with the analysis + * @return tags + */ + @javax.annotation.Nullable + public List getTags() { + return tags; + } + + public void setTags(@javax.annotation.Nullable List tags) { + this.tags = tags; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -511,7 +546,8 @@ public boolean equals(Object o) { Objects.equals(this.username, analysisRecord.username) && Objects.equals(this.dynamicExecutionStatus, analysisRecord.dynamicExecutionStatus) && Objects.equals(this.dynamicExecutionTaskId, analysisRecord.dynamicExecutionTaskId) && - Objects.equals(this.baseAddress, analysisRecord.baseAddress)&& + Objects.equals(this.baseAddress, analysisRecord.baseAddress) && + Objects.equals(this.tags, analysisRecord.tags)&& Objects.equals(this.additionalProperties, analysisRecord.additionalProperties); } @@ -521,7 +557,7 @@ private static boolean equalsNullable(JsonNullable a, JsonNullable b) @Override public int hashCode() { - return Objects.hash(analysisId, analysisScope, binaryId, modelId, modelName, status, creation, isOwner, binaryName, sha256Hash, functionBoundariesHash, binarySize, username, dynamicExecutionStatus, dynamicExecutionTaskId, baseAddress, additionalProperties); + return Objects.hash(analysisId, analysisScope, binaryId, modelId, modelName, status, creation, isOwner, binaryName, sha256Hash, functionBoundariesHash, binarySize, username, dynamicExecutionStatus, dynamicExecutionTaskId, baseAddress, tags, additionalProperties); } private static int hashCodeNullable(JsonNullable a) { @@ -551,6 +587,7 @@ public String toString() { sb.append(" dynamicExecutionStatus: ").append(toIndentedString(dynamicExecutionStatus)).append("\n"); sb.append(" dynamicExecutionTaskId: ").append(toIndentedString(dynamicExecutionTaskId)).append("\n"); sb.append(" baseAddress: ").append(toIndentedString(baseAddress)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -573,7 +610,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("analysis_id", "analysis_scope", "binary_id", "model_id", "model_name", "status", "creation", "is_owner", "binary_name", "sha_256_hash", "function_boundaries_hash", "binary_size", "username", "dynamic_execution_status", "dynamic_execution_task_id", "base_address")); + openapiFields = new HashSet(Arrays.asList("analysis_id", "analysis_scope", "binary_id", "model_id", "model_name", "status", "creation", "is_owner", "binary_name", "sha_256_hash", "function_boundaries_hash", "binary_size", "username", "dynamic_execution_status", "dynamic_execution_task_id", "base_address", "tags")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("analysis_id", "analysis_scope", "binary_id", "model_id", "model_name", "status", "creation", "is_owner", "binary_name", "sha_256_hash", "function_boundaries_hash", "binary_size", "username", "base_address")); @@ -624,6 +661,20 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti if (jsonObj.get("dynamic_execution_status") != null && !jsonObj.get("dynamic_execution_status").isJsonNull()) { AppApiRestV2AnalysesEnumsDynamicExecutionStatus.validateJsonElement(jsonObj.get("dynamic_execution_status")); } + if (jsonObj.get("tags") != null && !jsonObj.get("tags").isJsonNull()) { + JsonArray jsonArraytags = jsonObj.getAsJsonArray("tags"); + if (jsonArraytags != null) { + // ensure the json data is an array + if (!jsonObj.get("tags").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `tags` to be an array in the JSON string but got `%s`", jsonObj.get("tags").toString())); + } + + // validate the optional field `tags` (array) + for (int i = 0; i < jsonArraytags.size(); i++) { + TagItem.validateJsonElement(jsonArraytags.get(i)); + }; + } + } } public static class CustomTypeAdapterFactory implements TypeAdapterFactory { diff --git a/src/main/java/ai/reveng/model/BaseResponseAnalysisBulkAddTagsResponse.java b/src/main/java/ai/reveng/model/BaseResponseAnalysisBulkAddTagsResponse.java new file mode 100644 index 0000000..471ca59 --- /dev/null +++ b/src/main/java/ai/reveng/model/BaseResponseAnalysisBulkAddTagsResponse.java @@ -0,0 +1,438 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 ai.reveng.model.AnalysisBulkAddTagsResponse; +import ai.reveng.model.ErrorModel; +import ai.reveng.model.MetaModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonDeserializationContext; +import com.google.gson.JsonDeserializer; +import com.google.gson.JsonElement; +import com.google.gson.JsonObject; +import com.google.gson.JsonParseException; +import com.google.gson.TypeAdapterFactory; +import com.google.gson.reflect.TypeToken; +import com.google.gson.TypeAdapter; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.Locale; + +import ai.reveng.invoker.JSON; + +/** + * BaseResponseAnalysisBulkAddTagsResponse + */ +@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") +public class BaseResponseAnalysisBulkAddTagsResponse { + public static final String SERIALIZED_NAME_STATUS = "status"; + @SerializedName(SERIALIZED_NAME_STATUS) + @javax.annotation.Nullable + private Boolean status = true; + + public static final String SERIALIZED_NAME_DATA = "data"; + @SerializedName(SERIALIZED_NAME_DATA) + @javax.annotation.Nullable + private AnalysisBulkAddTagsResponse data; + + public static final String SERIALIZED_NAME_MESSAGE = "message"; + @SerializedName(SERIALIZED_NAME_MESSAGE) + @javax.annotation.Nullable + private String message; + + public static final String SERIALIZED_NAME_ERRORS = "errors"; + @SerializedName(SERIALIZED_NAME_ERRORS) + @javax.annotation.Nullable + private List errors; + + public static final String SERIALIZED_NAME_META = "meta"; + @SerializedName(SERIALIZED_NAME_META) + @javax.annotation.Nullable + private MetaModel meta; + + public BaseResponseAnalysisBulkAddTagsResponse() { + } + + public BaseResponseAnalysisBulkAddTagsResponse status(@javax.annotation.Nullable Boolean status) { + this.status = status; + return this; + } + + /** + * Response status on whether the request succeeded + * @return status + */ + @javax.annotation.Nullable + public Boolean getStatus() { + return status; + } + + public void setStatus(@javax.annotation.Nullable Boolean status) { + this.status = status; + } + + + public BaseResponseAnalysisBulkAddTagsResponse data(@javax.annotation.Nullable AnalysisBulkAddTagsResponse data) { + this.data = data; + return this; + } + + /** + * Get data + * @return data + */ + @javax.annotation.Nullable + public AnalysisBulkAddTagsResponse getData() { + return data; + } + + public void setData(@javax.annotation.Nullable AnalysisBulkAddTagsResponse data) { + this.data = data; + } + + + public BaseResponseAnalysisBulkAddTagsResponse message(@javax.annotation.Nullable String message) { + this.message = message; + return this; + } + + /** + * Get message + * @return message + */ + @javax.annotation.Nullable + public String getMessage() { + return message; + } + + public void setMessage(@javax.annotation.Nullable String message) { + this.message = message; + } + + + public BaseResponseAnalysisBulkAddTagsResponse errors(@javax.annotation.Nullable List errors) { + this.errors = errors; + return this; + } + + public BaseResponseAnalysisBulkAddTagsResponse addErrorsItem(ErrorModel errorsItem) { + if (this.errors == null) { + this.errors = new ArrayList<>(); + } + this.errors.add(errorsItem); + return this; + } + + /** + * Get errors + * @return errors + */ + @javax.annotation.Nullable + public List getErrors() { + return errors; + } + + public void setErrors(@javax.annotation.Nullable List errors) { + this.errors = errors; + } + + + public BaseResponseAnalysisBulkAddTagsResponse meta(@javax.annotation.Nullable MetaModel meta) { + this.meta = meta; + return this; + } + + /** + * Metadata + * @return meta + */ + @javax.annotation.Nullable + public MetaModel getMeta() { + return meta; + } + + public void setMeta(@javax.annotation.Nullable MetaModel meta) { + this.meta = meta; + } + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. + * If the property does not already exist, create it otherwise replace it. + * + * @param key name of the property + * @param value value of the property + * @return the BaseResponseAnalysisBulkAddTagsResponse instance itself + */ + public BaseResponseAnalysisBulkAddTagsResponse putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return a map of objects + */ + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key name of the property + * @return an object + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + BaseResponseAnalysisBulkAddTagsResponse baseResponseAnalysisBulkAddTagsResponse = (BaseResponseAnalysisBulkAddTagsResponse) o; + return Objects.equals(this.status, baseResponseAnalysisBulkAddTagsResponse.status) && + Objects.equals(this.data, baseResponseAnalysisBulkAddTagsResponse.data) && + Objects.equals(this.message, baseResponseAnalysisBulkAddTagsResponse.message) && + Objects.equals(this.errors, baseResponseAnalysisBulkAddTagsResponse.errors) && + Objects.equals(this.meta, baseResponseAnalysisBulkAddTagsResponse.meta)&& + Objects.equals(this.additionalProperties, baseResponseAnalysisBulkAddTagsResponse.additionalProperties); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); + } + + @Override + public int hashCode() { + return Objects.hash(status, data, message, errors, meta, additionalProperties); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class BaseResponseAnalysisBulkAddTagsResponse {\n"); + sb.append(" status: ").append(toIndentedString(status)).append("\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" message: ").append(toIndentedString(message)).append("\n"); + sb.append(" errors: ").append(toIndentedString(errors)).append("\n"); + sb.append(" meta: ").append(toIndentedString(meta)).append("\n"); + sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); + sb.append("}"); + return sb.toString(); + } + + /** + * Convert the given object to string with each line indented by 4 spaces + * (except the first line). + */ + private String toIndentedString(Object o) { + if (o == null) { + return "null"; + } + return o.toString().replace("\n", "\n "); + } + + + public static HashSet openapiFields; + public static HashSet openapiRequiredFields; + + static { + // a set of all properties/fields (JSON key names) + openapiFields = new HashSet(Arrays.asList("status", "data", "message", "errors", "meta")); + + // a set of required properties/fields (JSON key names) + openapiRequiredFields = new HashSet(0); + } + + /** + * Validates the JSON Element and throws an exception if issues found + * + * @param jsonElement JSON Element + * @throws IOException if the JSON Element is invalid with respect to BaseResponseAnalysisBulkAddTagsResponse + */ + public static void validateJsonElement(JsonElement jsonElement) throws IOException { + if (jsonElement == null) { + if (!BaseResponseAnalysisBulkAddTagsResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null + throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseAnalysisBulkAddTagsResponse is not found in the empty JSON string", BaseResponseAnalysisBulkAddTagsResponse.openapiRequiredFields.toString())); + } + } + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // validate the optional field `data` + if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { + AnalysisBulkAddTagsResponse.validateJsonElement(jsonObj.get("data")); + } + if ((jsonObj.get("message") != null && !jsonObj.get("message").isJsonNull()) && !jsonObj.get("message").isJsonPrimitive()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `message` to be a primitive type in the JSON string but got `%s`", jsonObj.get("message").toString())); + } + if (jsonObj.get("errors") != null && !jsonObj.get("errors").isJsonNull()) { + JsonArray jsonArrayerrors = jsonObj.getAsJsonArray("errors"); + if (jsonArrayerrors != null) { + // ensure the json data is an array + if (!jsonObj.get("errors").isJsonArray()) { + throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `errors` to be an array in the JSON string but got `%s`", jsonObj.get("errors").toString())); + } + + // validate the optional field `errors` (array) + for (int i = 0; i < jsonArrayerrors.size(); i++) { + ErrorModel.validateJsonElement(jsonArrayerrors.get(i)); + }; + } + } + // validate the optional field `meta` + if (jsonObj.get("meta") != null && !jsonObj.get("meta").isJsonNull()) { + MetaModel.validateJsonElement(jsonObj.get("meta")); + } + } + + public static class CustomTypeAdapterFactory implements TypeAdapterFactory { + @SuppressWarnings("unchecked") + @Override + public TypeAdapter create(Gson gson, TypeToken type) { + if (!BaseResponseAnalysisBulkAddTagsResponse.class.isAssignableFrom(type.getRawType())) { + return null; // this class only serializes 'BaseResponseAnalysisBulkAddTagsResponse' and its subtypes + } + final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); + final TypeAdapter thisAdapter + = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseAnalysisBulkAddTagsResponse.class)); + + return (TypeAdapter) new TypeAdapter() { + @Override + public void write(JsonWriter out, BaseResponseAnalysisBulkAddTagsResponse value) throws IOException { + JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject(); + obj.remove("additionalProperties"); + // serialize additional properties + if (value.getAdditionalProperties() != null) { + for (Map.Entry entry : value.getAdditionalProperties().entrySet()) { + if (entry.getValue() instanceof String) + obj.addProperty(entry.getKey(), (String) entry.getValue()); + else if (entry.getValue() instanceof Number) + obj.addProperty(entry.getKey(), (Number) entry.getValue()); + else if (entry.getValue() instanceof Boolean) + obj.addProperty(entry.getKey(), (Boolean) entry.getValue()); + else if (entry.getValue() instanceof Character) + obj.addProperty(entry.getKey(), (Character) entry.getValue()); + else { + JsonElement jsonElement = gson.toJsonTree(entry.getValue()); + if (jsonElement.isJsonArray()) { + obj.add(entry.getKey(), jsonElement.getAsJsonArray()); + } else { + obj.add(entry.getKey(), jsonElement.getAsJsonObject()); + } + } + } + } + elementAdapter.write(out, obj); + } + + @Override + public BaseResponseAnalysisBulkAddTagsResponse read(JsonReader in) throws IOException { + JsonElement jsonElement = elementAdapter.read(in); + validateJsonElement(jsonElement); + JsonObject jsonObj = jsonElement.getAsJsonObject(); + // store additional fields in the deserialized instance + BaseResponseAnalysisBulkAddTagsResponse instance = thisAdapter.fromJsonTree(jsonObj); + for (Map.Entry entry : jsonObj.entrySet()) { + if (!openapiFields.contains(entry.getKey())) { + if (entry.getValue().isJsonPrimitive()) { // primitive type + if (entry.getValue().getAsJsonPrimitive().isString()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString()); + else if (entry.getValue().getAsJsonPrimitive().isNumber()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber()); + else if (entry.getValue().getAsJsonPrimitive().isBoolean()) + instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean()); + else + throw new IllegalArgumentException(String.format(Locale.ROOT, "The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString())); + } else if (entry.getValue().isJsonArray()) { + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class)); + } else { // JSON object + instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class)); + } + } + } + return instance; + } + + }.nullSafe(); + } + } + + /** + * Create an instance of BaseResponseAnalysisBulkAddTagsResponse given an JSON string + * + * @param jsonString JSON string + * @return An instance of BaseResponseAnalysisBulkAddTagsResponse + * @throws IOException if the JSON string is invalid with respect to BaseResponseAnalysisBulkAddTagsResponse + */ + public static BaseResponseAnalysisBulkAddTagsResponse fromJson(String jsonString) throws IOException { + return JSON.getGson().fromJson(jsonString, BaseResponseAnalysisBulkAddTagsResponse.class); + } + + /** + * Convert an instance of BaseResponseAnalysisBulkAddTagsResponse to an JSON string + * + * @return JSON string + */ + public String toJson() { + return JSON.getGson().toJson(this); + } +} + diff --git a/src/main/java/ai/reveng/model/GetAiDecompilationTask.java b/src/main/java/ai/reveng/model/GetAiDecompilationTask.java index c0a31e3..c5c84a0 100644 --- a/src/main/java/ai/reveng/model/GetAiDecompilationTask.java +++ b/src/main/java/ai/reveng/model/GetAiDecompilationTask.java @@ -14,6 +14,7 @@ import java.util.Objects; import java.util.Locale; +import ai.reveng.model.AiDecompilationTaskStatus; import ai.reveng.model.FunctionMappingFull; import ai.reveng.model.InverseFunctionMapItem; import com.google.gson.TypeAdapter; @@ -59,7 +60,7 @@ public class GetAiDecompilationTask { public static final String SERIALIZED_NAME_STATUS = "status"; @SerializedName(SERIALIZED_NAME_STATUS) @javax.annotation.Nonnull - private String status; + private AiDecompilationTaskStatus status; public static final String SERIALIZED_NAME_DECOMPILATION = "decompilation"; @SerializedName(SERIALIZED_NAME_DECOMPILATION) @@ -104,21 +105,21 @@ public class GetAiDecompilationTask { public GetAiDecompilationTask() { } - public GetAiDecompilationTask status(@javax.annotation.Nonnull String status) { + public GetAiDecompilationTask status(@javax.annotation.Nonnull AiDecompilationTaskStatus status) { this.status = status; return this; } /** - * Get status + * The status of the AI decompilation task * @return status */ @javax.annotation.Nonnull - public String getStatus() { + public AiDecompilationTaskStatus getStatus() { return status; } - public void setStatus(@javax.annotation.Nonnull String status) { + public void setStatus(@javax.annotation.Nonnull AiDecompilationTaskStatus status) { this.status = status; } @@ -426,9 +427,8 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti } } JsonObject jsonObj = jsonElement.getAsJsonObject(); - if (!jsonObj.get("status").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `status` to be a primitive type in the JSON string but got `%s`", jsonObj.get("status").toString())); - } + // validate the required field `status` + AiDecompilationTaskStatus.validateJsonElement(jsonObj.get("status")); if ((jsonObj.get("decompilation") != null && !jsonObj.get("decompilation").isJsonNull()) && !jsonObj.get("decompilation").isJsonPrimitive()) { throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `decompilation` to be a primitive type in the JSON string but got `%s`", jsonObj.get("decompilation").toString())); } diff --git a/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java b/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java index 8d44527..9906b65 100644 --- a/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java +++ b/src/test/java/ai/reveng/api/AnalysesCoreApiTest.java @@ -13,11 +13,13 @@ package ai.reveng.api; import ai.reveng.invoker.ApiException; +import ai.reveng.model.AnalysisBulkAddTagsRequest; import ai.reveng.model.AnalysisCreateRequest; import ai.reveng.model.AnalysisUpdateRequest; import ai.reveng.model.AnalysisUpdateTagsRequest; import ai.reveng.model.AppApiRestV2AnalysesEnumsOrderBy; import ai.reveng.model.BaseResponse; +import ai.reveng.model.BaseResponseAnalysisBulkAddTagsResponse; import ai.reveng.model.BaseResponseAnalysisCreateResponse; import ai.reveng.model.BaseResponseAnalysisDetailResponse; import ai.reveng.model.BaseResponseAnalysisFunctionMapping; @@ -55,6 +57,20 @@ public class AnalysesCoreApiTest { private final AnalysesCoreApi api = new AnalysesCoreApi(); + /** + * Bulk Add Analysis Tags + * + * Updates analysis tags for multiple analyses. User must be the owner. + * + * @throws ApiException if the Api call fails + */ + @Test + public void bulkAddAnalysisTagsTest() throws ApiException { + AnalysisBulkAddTagsRequest analysisBulkAddTagsRequest = null; + BaseResponseAnalysisBulkAddTagsResponse response = api.bulkAddAnalysisTags(analysisBulkAddTagsRequest); + // TODO: test validations + } + /** * Create Analysis * diff --git a/src/test/java/ai/reveng/model/AiDecompilationTaskStatusTest.java b/src/test/java/ai/reveng/model/AiDecompilationTaskStatusTest.java new file mode 100644 index 0000000..d5769da --- /dev/null +++ b/src/test/java/ai/reveng/model/AiDecompilationTaskStatusTest.java @@ -0,0 +1,31 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 com.google.gson.annotations.SerializedName; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AiDecompilationTaskStatus + */ +public class AiDecompilationTaskStatusTest { + /** + * Model tests for AiDecompilationTaskStatus + */ + @Test + public void testAiDecompilationTaskStatus() { + // TODO: test AiDecompilationTaskStatus + } + +} diff --git a/src/test/java/ai/reveng/model/AnalysisBulkAddTagsRequestTest.java b/src/test/java/ai/reveng/model/AnalysisBulkAddTagsRequestTest.java new file mode 100644 index 0000000..0124445 --- /dev/null +++ b/src/test/java/ai/reveng/model/AnalysisBulkAddTagsRequestTest.java @@ -0,0 +1,57 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AnalysisBulkAddTagsRequest + */ +public class AnalysisBulkAddTagsRequestTest { + private final AnalysisBulkAddTagsRequest model = new AnalysisBulkAddTagsRequest(); + + /** + * Model tests for AnalysisBulkAddTagsRequest + */ + @Test + public void testAnalysisBulkAddTagsRequest() { + // TODO: test AnalysisBulkAddTagsRequest + } + + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + + /** + * Test the property 'analysisIds' + */ + @Test + public void analysisIdsTest() { + // TODO: test analysisIds + } + +} diff --git a/src/test/java/ai/reveng/model/AnalysisBulkAddTagsResponseItemTest.java b/src/test/java/ai/reveng/model/AnalysisBulkAddTagsResponseItemTest.java new file mode 100644 index 0000000..8f0acbf --- /dev/null +++ b/src/test/java/ai/reveng/model/AnalysisBulkAddTagsResponseItemTest.java @@ -0,0 +1,64 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.Arrays; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AnalysisBulkAddTagsResponseItem + */ +public class AnalysisBulkAddTagsResponseItemTest { + private final AnalysisBulkAddTagsResponseItem model = new AnalysisBulkAddTagsResponseItem(); + + /** + * Model tests for AnalysisBulkAddTagsResponseItem + */ + @Test + public void testAnalysisBulkAddTagsResponseItem() { + // TODO: test AnalysisBulkAddTagsResponseItem + } + + /** + * Test the property 'analysisId' + */ + @Test + public void analysisIdTest() { + // TODO: test analysisId + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'error' + */ + @Test + public void errorTest() { + // TODO: test error + } + +} diff --git a/src/test/java/ai/reveng/model/AnalysisBulkAddTagsResponseTest.java b/src/test/java/ai/reveng/model/AnalysisBulkAddTagsResponseTest.java new file mode 100644 index 0000000..756b614 --- /dev/null +++ b/src/test/java/ai/reveng/model/AnalysisBulkAddTagsResponseTest.java @@ -0,0 +1,50 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 ai.reveng.model.AnalysisBulkAddTagsResponseItem; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for AnalysisBulkAddTagsResponse + */ +public class AnalysisBulkAddTagsResponseTest { + private final AnalysisBulkAddTagsResponse model = new AnalysisBulkAddTagsResponse(); + + /** + * Model tests for AnalysisBulkAddTagsResponse + */ + @Test + public void testAnalysisBulkAddTagsResponse() { + // TODO: test AnalysisBulkAddTagsResponse + } + + /** + * Test the property 'results' + */ + @Test + public void resultsTest() { + // TODO: test results + } + +} diff --git a/src/test/java/ai/reveng/model/AnalysisRecordTest.java b/src/test/java/ai/reveng/model/AnalysisRecordTest.java index 309c799..5e2e003 100644 --- a/src/test/java/ai/reveng/model/AnalysisRecordTest.java +++ b/src/test/java/ai/reveng/model/AnalysisRecordTest.java @@ -13,6 +13,7 @@ package ai.reveng.model; import ai.reveng.model.AppApiRestV2AnalysesEnumsDynamicExecutionStatus; +import ai.reveng.model.TagItem; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; @@ -21,7 +22,9 @@ import java.io.IOException; import java.math.BigInteger; import java.time.OffsetDateTime; +import java.util.ArrayList; import java.util.Arrays; +import java.util.List; import org.openapitools.jackson.nullable.JsonNullable; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -168,4 +171,12 @@ public void baseAddressTest() { // TODO: test baseAddress } + /** + * Test the property 'tags' + */ + @Test + public void tagsTest() { + // TODO: test tags + } + } diff --git a/src/test/java/ai/reveng/model/BaseResponseAnalysisBulkAddTagsResponseTest.java b/src/test/java/ai/reveng/model/BaseResponseAnalysisBulkAddTagsResponseTest.java new file mode 100644 index 0000000..6dd132e --- /dev/null +++ b/src/test/java/ai/reveng/model/BaseResponseAnalysisBulkAddTagsResponseTest.java @@ -0,0 +1,85 @@ +/* + * RevEng.AI API + * RevEng.AI is Similarity Search Engine for executable binaries + * + * + * + * 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 ai.reveng.model.AnalysisBulkAddTagsResponse; +import ai.reveng.model.ErrorModel; +import ai.reveng.model.MetaModel; +import com.google.gson.TypeAdapter; +import com.google.gson.annotations.JsonAdapter; +import com.google.gson.annotations.SerializedName; +import com.google.gson.stream.JsonReader; +import com.google.gson.stream.JsonWriter; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; + +/** + * Model tests for BaseResponseAnalysisBulkAddTagsResponse + */ +public class BaseResponseAnalysisBulkAddTagsResponseTest { + private final BaseResponseAnalysisBulkAddTagsResponse model = new BaseResponseAnalysisBulkAddTagsResponse(); + + /** + * Model tests for BaseResponseAnalysisBulkAddTagsResponse + */ + @Test + public void testBaseResponseAnalysisBulkAddTagsResponse() { + // TODO: test BaseResponseAnalysisBulkAddTagsResponse + } + + /** + * Test the property 'status' + */ + @Test + public void statusTest() { + // TODO: test status + } + + /** + * Test the property 'data' + */ + @Test + public void dataTest() { + // TODO: test data + } + + /** + * Test the property 'message' + */ + @Test + public void messageTest() { + // TODO: test message + } + + /** + * Test the property 'errors' + */ + @Test + public void errorsTest() { + // TODO: test errors + } + + /** + * Test the property 'meta' + */ + @Test + public void metaTest() { + // TODO: test meta + } + +} diff --git a/src/test/java/ai/reveng/model/GetAiDecompilationTaskTest.java b/src/test/java/ai/reveng/model/GetAiDecompilationTaskTest.java index 5f130f5..a6770b0 100644 --- a/src/test/java/ai/reveng/model/GetAiDecompilationTaskTest.java +++ b/src/test/java/ai/reveng/model/GetAiDecompilationTaskTest.java @@ -12,6 +12,7 @@ package ai.reveng.model; +import ai.reveng.model.AiDecompilationTaskStatus; import ai.reveng.model.FunctionMappingFull; import ai.reveng.model.InverseFunctionMapItem; import com.google.gson.TypeAdapter;