From a7fe084a323c564ea2acd8ffca820b5b84e7d65f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 27 May 2026 08:17:03 +0000 Subject: [PATCH] Update SDK to version v3.86.1 - Generated from OpenAPI spec version v3.86.1 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 10 +- build.gradle | 4 +- build.sbt | 2 +- docs/AuthenticationUsersApi.md | 132 ----- docs/BaseResponseGetMeResponse.md | 17 - docs/DebugPromptEvent.md | 17 - docs/ELFRelocation.md | 1 + docs/ELFSymbol.md | 1 + docs/EventDebugPrompt.md | 25 - docs/GetMeResponse.md | 32 - pom.xml | 2 +- .../ai/reveng/api/AuthenticationUsersApi.java | 244 -------- .../java/ai/reveng/invoker/ApiClient.java | 2 +- .../java/ai/reveng/invoker/Configuration.java | 2 +- src/main/java/ai/reveng/invoker/JSON.java | 4 - .../model/BaseResponseGetMeResponse.java | 438 -------------- .../ai/reveng/model/DebugPromptEvent.java | 404 ------------- .../java/ai/reveng/model/ELFRelocation.java | 32 +- src/main/java/ai/reveng/model/ELFSymbol.java | 32 +- .../ai/reveng/model/EventDebugPrompt.java | 427 -------------- .../java/ai/reveng/model/GetMeResponse.java | 549 ------------------ ...StreamAiDecompilation200ResponseInner.java | 57 +- 23 files changed, 75 insertions(+), 2361 deletions(-) delete mode 100644 docs/BaseResponseGetMeResponse.md delete mode 100644 docs/DebugPromptEvent.md delete mode 100644 docs/EventDebugPrompt.md delete mode 100644 docs/GetMeResponse.md delete mode 100644 src/main/java/ai/reveng/model/BaseResponseGetMeResponse.java delete mode 100644 src/main/java/ai/reveng/model/DebugPromptEvent.java delete mode 100644 src/main/java/ai/reveng/model/EventDebugPrompt.java delete mode 100644 src/main/java/ai/reveng/model/GetMeResponse.java diff --git a/.sdk-version b/.sdk-version index 8f8c6ffb..963acd8f 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.85.0 +v3.86.1 diff --git a/README.md b/README.md index c30ef5b5..2c23c37b 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ Add this dependency to your project's POM: ai.reveng sdk - 3.85.0 + 3.86.1 compile ``` @@ -31,7 +31,7 @@ repositories { } dependencies { - implementation "ai.reveng:sdk:3.85.0" + implementation "ai.reveng:sdk:3.86.1" } ``` @@ -115,10 +115,8 @@ Class | Method | HTTP request | Description *AnalysesResultsMetadataApi* | [**getTags**](docs/AnalysesResultsMetadataApi.md#getTags) | **GET** /v2/analyses/{analysis_id}/tags | Get function tags with maliciousness score *AnalysesResultsMetadataApi* | [**getVulnerabilities**](docs/AnalysesResultsMetadataApi.md#getVulnerabilities) | **GET** /v2/analyses/{analysis_id}/vulnerabilities | Gets the vulnerabilities found in the analysis *AnalysesXRefsApi* | [**getXrefByVaddr**](docs/AnalysesXRefsApi.md#getXrefByVaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address -*AuthenticationUsersApi* | [**getRequesterUserInfo**](docs/AuthenticationUsersApi.md#getRequesterUserInfo) | **GET** /v2/users/me | Get the requesters user information *AuthenticationUsersApi* | [**getUser**](docs/AuthenticationUsersApi.md#getUser) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**getUserActivity**](docs/AuthenticationUsersApi.md#getUserActivity) | **GET** /v2/users/activity | Get auth user activity -*AuthenticationUsersApi* | [**getUserComments**](docs/AuthenticationUsersApi.md#getUserComments) | **GET** /v2/users/me/comments | Get comments by user *AuthenticationUsersApi* | [**submitUserFeedback**](docs/AuthenticationUsersApi.md#submitUserFeedback) | **POST** /v2/users/feedback | Submit feedback about the application *BinariesApi* | [**downloadZippedBinary**](docs/BinariesApi.md#downloadZippedBinary) | **GET** /v2/binaries/{binary_id}/download-zipped | Downloads a zipped binary with password protection *BinariesApi* | [**getBinaryAdditionalDetails**](docs/BinariesApi.md#getBinaryAdditionalDetails) | **GET** /v2/binaries/{binary_id}/additional-details | Gets the additional details of a binary @@ -295,7 +293,6 @@ Class | Method | HTTP request | Description - [BaseResponseGenerateFunctionDataTypes](docs/BaseResponseGenerateFunctionDataTypes.md) - [BaseResponseGenerationStatusList](docs/BaseResponseGenerationStatusList.md) - [BaseResponseGetAiDecompilationTask](docs/BaseResponseGetAiDecompilationTask.md) - - [BaseResponseGetMeResponse](docs/BaseResponseGetMeResponse.md) - [BaseResponseGetPublicUserResponse](docs/BaseResponseGetPublicUserResponse.md) - [BaseResponseListCalleesCallerFunctionsResponse](docs/BaseResponseListCalleesCallerFunctionsResponse.md) - [BaseResponseListCollectionResults](docs/BaseResponseListCollectionResults.md) @@ -369,7 +366,6 @@ Class | Method | HTTP request | Description - [CreateAIDecompOutputBody](docs/CreateAIDecompOutputBody.md) - [CreateConversationRequest](docs/CreateConversationRequest.md) - [Created](docs/Created.md) - - [DebugPromptEvent](docs/DebugPromptEvent.md) - [DecompFailedEvent](docs/DecompFailedEvent.md) - [DecompFinishedEvent](docs/DecompFinishedEvent.md) - [DecompilationCommentContext](docs/DecompilationCommentContext.md) @@ -395,7 +391,6 @@ Class | Method | HTTP request | Description - [EventAttemptFailed](docs/EventAttemptFailed.md) - [EventAttemptStarted](docs/EventAttemptStarted.md) - [EventCONTEXTCOMPACTED](docs/EventCONTEXTCOMPACTED.md) - - [EventDebugPrompt](docs/EventDebugPrompt.md) - [EventDecompFailed](docs/EventDecompFailed.md) - [EventDecompFinished](docs/EventDecompFinished.md) - [EventProse](docs/EventProse.md) @@ -469,7 +464,6 @@ Class | Method | HTTP request | Description - [GenerationStatusList](docs/GenerationStatusList.md) - [GetAiDecompilationRatingResponse](docs/GetAiDecompilationRatingResponse.md) - [GetAiDecompilationTask](docs/GetAiDecompilationTask.md) - - [GetMeResponse](docs/GetMeResponse.md) - [GetPublicUserResponse](docs/GetPublicUserResponse.md) - [GlobalVariable](docs/GlobalVariable.md) - [HistoryEntry](docs/HistoryEntry.md) diff --git a/build.gradle b/build.gradle index 5c407948..35b652fc 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ apply plugin: 'java' apply plugin: 'com.diffplug.spotless' group = 'ai.reveng' -version = '3.85.0' +version = '3.86.1' @@ -171,7 +171,7 @@ mavenPublishing { publishToMavenCentral(true) signAllPublications() - coordinates("ai.reveng", "sdk", "3.85.0") + coordinates("ai.reveng", "sdk", "3.86.1") pom { name = "sdk" diff --git a/build.sbt b/build.sbt index fba7bcb9..238d6ff3 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.85.0", + version := "3.86.1", scalaVersion := "2.11.12", scalacOptions ++= Seq("-feature"), compile / javacOptions ++= Seq("-Xlint:deprecation"), diff --git a/docs/AuthenticationUsersApi.md b/docs/AuthenticationUsersApi.md index 9df7cf63..c8c29646 100644 --- a/docs/AuthenticationUsersApi.md +++ b/docs/AuthenticationUsersApi.md @@ -4,77 +4,11 @@ All URIs are relative to *https://api.reveng.ai* | Method | HTTP request | Description | |------------- | ------------- | -------------| -| [**getRequesterUserInfo**](AuthenticationUsersApi.md#getRequesterUserInfo) | **GET** /v2/users/me | Get the requesters user information | | [**getUser**](AuthenticationUsersApi.md#getUser) | **GET** /v2/users/{user_id} | Get a user's public information | | [**getUserActivity**](AuthenticationUsersApi.md#getUserActivity) | **GET** /v2/users/activity | Get auth user activity | -| [**getUserComments**](AuthenticationUsersApi.md#getUserComments) | **GET** /v2/users/me/comments | Get comments by user | | [**submitUserFeedback**](AuthenticationUsersApi.md#submitUserFeedback) | **POST** /v2/users/feedback | Submit feedback about the application | - -# **getRequesterUserInfo** -> BaseResponseGetMeResponse getRequesterUserInfo() - -Get the requesters user information - -### 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.AuthenticationUsersApi; - -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"); - - AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient); - try { - BaseResponseGetMeResponse result = apiInstance.getRequesterUserInfo(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationUsersApi#getRequesterUserInfo"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**BaseResponseGetMeResponse**](BaseResponseGetMeResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - # **getUser** > BaseResponseGetPublicUserResponse getUser(userId) @@ -207,72 +141,6 @@ This endpoint does not need any parameter. | **200** | Successful Response | - | | **422** | Invalid request parameters | - | - -# **getUserComments** -> BaseResponseListCommentResponse getUserComments() - -Get comments by user - -Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. - -### 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.AuthenticationUsersApi; - -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"); - - AuthenticationUsersApi apiInstance = new AuthenticationUsersApi(defaultClient); - try { - BaseResponseListCommentResponse result = apiInstance.getUserComments(); - System.out.println(result); - } catch (ApiException e) { - System.err.println("Exception when calling AuthenticationUsersApi#getUserComments"); - System.err.println("Status code: " + e.getCode()); - System.err.println("Reason: " + e.getResponseBody()); - System.err.println("Response headers: " + e.getResponseHeaders()); - e.printStackTrace(); - } - } -} -``` - -### Parameters -This endpoint does not need any parameter. - -### Return type - -[**BaseResponseListCommentResponse**](BaseResponseListCommentResponse.md) - -### Authorization - -[APIKey](../README.md#APIKey) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details -| Status code | Description | Response headers | -|-------------|-------------|------------------| -| **200** | Successful Response | - | -| **422** | Invalid request parameters | - | - # **submitUserFeedback** > BaseResponse submitUserFeedback(submitUserFeedbackRequest) diff --git a/docs/BaseResponseGetMeResponse.md b/docs/BaseResponseGetMeResponse.md deleted file mode 100644 index fa439513..00000000 --- a/docs/BaseResponseGetMeResponse.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# BaseResponseGetMeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**status** | **Boolean** | Response status on whether the request succeeded | [optional] | -|**data** | [**GetMeResponse**](GetMeResponse.md) | | [optional] | -|**message** | **String** | | [optional] | -|**errors** | [**List<ErrorModel>**](ErrorModel.md) | | [optional] | -|**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] | - - - diff --git a/docs/DebugPromptEvent.md b/docs/DebugPromptEvent.md deleted file mode 100644 index 45f2044e..00000000 --- a/docs/DebugPromptEvent.md +++ /dev/null @@ -1,17 +0,0 @@ - - -# DebugPromptEvent - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**activity** | **String** | | | -|**attempt** | **Integer** | | | -|**seq** | **Integer** | | | -|**type** | **String** | | | -|**userPrompt** | **String** | | | - - - diff --git a/docs/ELFRelocation.md b/docs/ELFRelocation.md index aa5b2b5e..33312e01 100644 --- a/docs/ELFRelocation.md +++ b/docs/ELFRelocation.md @@ -14,6 +14,7 @@ |**symbolName** | **String** | | | |**isDynamic** | **Boolean** | | | |**isPltgot** | **Boolean** | | | +|**isUnicodeSymbolName** | **Boolean** | | [optional] | diff --git a/docs/ELFSymbol.md b/docs/ELFSymbol.md index 3bfbce63..04b3a4ce 100644 --- a/docs/ELFSymbol.md +++ b/docs/ELFSymbol.md @@ -14,6 +14,7 @@ |**binding** | **String** | | | |**visibility** | **String** | | | |**sectionIndex** | **Integer** | | | +|**isUnicodeName** | **Boolean** | | [optional] | diff --git a/docs/EventDebugPrompt.md b/docs/EventDebugPrompt.md deleted file mode 100644 index 25e58484..00000000 --- a/docs/EventDebugPrompt.md +++ /dev/null @@ -1,25 +0,0 @@ - - -# EventDebugPrompt - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**data** | **DebugPromptEvent** | | | -|**event** | [**EventEnum**](#EventEnum) | The event name. | | -|**id** | **Integer** | The event ID. | [optional] | -|**retry** | **Integer** | The retry time in milliseconds. | [optional] | - - - -## Enum: EventEnum - -| Name | Value | -|---- | -----| -| DEBUG_PROMPT | "debug_prompt" | -| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | - - - diff --git a/docs/GetMeResponse.md b/docs/GetMeResponse.md deleted file mode 100644 index ba7d560a..00000000 --- a/docs/GetMeResponse.md +++ /dev/null @@ -1,32 +0,0 @@ - - -# GetMeResponse - - -## Properties - -| Name | Type | Description | Notes | -|------------ | ------------- | ------------- | -------------| -|**username** | **String** | | | -|**userId** | **Integer** | | | -|**firstName** | **String** | | | -|**lastName** | **String** | | | -|**email** | **String** | | | -|**creation** | **OffsetDateTime** | | | -|**tutorialSeen** | **Boolean** | | | -|**role** | [**RoleEnum**](#RoleEnum) | | | - - - -## Enum: RoleEnum - -| Name | Value | -|---- | -----| -| USER | "USER" | -| ADMIN | "ADMIN" | -| SUPERADMIN | "SUPERADMIN" | -| SYSTEM | "SYSTEM" | -| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" | - - - diff --git a/pom.xml b/pom.xml index f6f90e83..95d3e68b 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ sdk jar sdk - 3.85.0 + 3.86.1 https://github.com/RevEngAI/sdk-java Java SDK for the RevEng.AI API diff --git a/src/main/java/ai/reveng/api/AuthenticationUsersApi.java b/src/main/java/ai/reveng/api/AuthenticationUsersApi.java index 24941295..8566e161 100644 --- a/src/main/java/ai/reveng/api/AuthenticationUsersApi.java +++ b/src/main/java/ai/reveng/api/AuthenticationUsersApi.java @@ -27,9 +27,7 @@ import ai.reveng.model.BaseResponse; -import ai.reveng.model.BaseResponseGetMeResponse; import ai.reveng.model.BaseResponseGetPublicUserResponse; -import ai.reveng.model.BaseResponseListCommentResponse; import ai.reveng.model.BaseResponseListUserActivityResponse; import ai.reveng.model.SubmitUserFeedbackRequest; @@ -76,127 +74,6 @@ public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } - /** - * Build call for getRequesterUserInfo - * @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 getRequesterUserInfoCall(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 = null; - - // create path and map variables - String localVarPath = "/v2/users/me"; - - 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 = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getRequesterUserInfoValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getRequesterUserInfoCall(_callback); - - } - - /** - * Get the requesters user information - * - * @return BaseResponseGetMeResponse - * @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 BaseResponseGetMeResponse getRequesterUserInfo() throws ApiException { - ApiResponse localVarResp = getRequesterUserInfoWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get the requesters user information - * - * @return ApiResponse<BaseResponseGetMeResponse> - * @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 getRequesterUserInfoWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getRequesterUserInfoValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get the requesters user information (asynchronously) - * - * @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 getRequesterUserInfoAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getRequesterUserInfoValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for getUser * @param userId (required) @@ -449,127 +326,6 @@ public okhttp3.Call getUserActivityAsync(final ApiCallback - Response Details - Status Code Description Response Headers - 200 Successful Response - - 422 Invalid request parameters - - - */ - public okhttp3.Call getUserCommentsCall(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 = null; - - // create path and map variables - String localVarPath = "/v2/users/me/comments"; - - 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 = { - }; - final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); - if (localVarContentType != null) { - localVarHeaderParams.put("Content-Type", localVarContentType); - } - - String[] localVarAuthNames = new String[] { "APIKey" }; - return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); - } - - @SuppressWarnings("rawtypes") - private okhttp3.Call getUserCommentsValidateBeforeCall(final ApiCallback _callback) throws ApiException { - return getUserCommentsCall(_callback); - - } - - /** - * Get comments by user - * Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. - * @return BaseResponseListCommentResponse - * @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 BaseResponseListCommentResponse getUserComments() throws ApiException { - ApiResponse localVarResp = getUserCommentsWithHttpInfo(); - return localVarResp.getData(); - } - - /** - * Get comments by user - * Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. - * @return ApiResponse<BaseResponseListCommentResponse> - * @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 getUserCommentsWithHttpInfo() throws ApiException { - okhttp3.Call localVarCall = getUserCommentsValidateBeforeCall(null); - Type localVarReturnType = new TypeToken(){}.getType(); - return localVarApiClient.execute(localVarCall, localVarReturnType); - } - - /** - * Get comments by user (asynchronously) - * Retrieves all comments created by a specific user. Only returns comments for resources the requesting user has access to. - * @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 getUserCommentsAsync(final ApiCallback _callback) throws ApiException { - - okhttp3.Call localVarCall = getUserCommentsValidateBeforeCall(_callback); - Type localVarReturnType = new TypeToken(){}.getType(); - localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); - return localVarCall; - } /** * Build call for submitUserFeedback * @param submitUserFeedbackRequest (required) diff --git a/src/main/java/ai/reveng/invoker/ApiClient.java b/src/main/java/ai/reveng/invoker/ApiClient.java index 0be2be20..b707b977 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.85.0/java"); + setUserAgent("OpenAPI-Generator/3.86.1/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 cfc955e4..a6617066 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.85.0"; + public static final String VERSION = "3.86.1"; 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 559023db..5c2fa619 100644 --- a/src/main/java/ai/reveng/invoker/JSON.java +++ b/src/main/java/ai/reveng/invoker/JSON.java @@ -177,7 +177,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGenerateFunctionDataTypes.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGenerationStatusList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetAiDecompilationTask.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetMeResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseGetPublicUserResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCalleesCallerFunctionsResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.BaseResponseListCollectionResults.CustomTypeAdapterFactory()); @@ -248,7 +247,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CreateAIDecompOutputBody.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.CreateConversationRequest.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Created.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DebugPromptEvent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompFailedEvent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompFinishedEvent.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompilationCommentContext.CustomTypeAdapterFactory()); @@ -273,7 +271,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventAttemptFailed.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventAttemptStarted.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventCONTEXTCOMPACTED.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventDebugPrompt.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventDecompFailed.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventDecompFinished.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventProse.CustomTypeAdapterFactory()); @@ -343,7 +340,6 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GenerationStatusList.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetAiDecompilationRatingResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetAiDecompilationTask.CustomTypeAdapterFactory()); - gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetMeResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GetPublicUserResponse.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.GlobalVariable.CustomTypeAdapterFactory()); gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.HistoryEntry.CustomTypeAdapterFactory()); diff --git a/src/main/java/ai/reveng/model/BaseResponseGetMeResponse.java b/src/main/java/ai/reveng/model/BaseResponseGetMeResponse.java deleted file mode 100644 index 32208bb2..00000000 --- a/src/main/java/ai/reveng/model/BaseResponseGetMeResponse.java +++ /dev/null @@ -1,438 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package ai.reveng.model; - -import java.util.Objects; -import java.util.Locale; -import ai.reveng.model.ErrorModel; -import ai.reveng.model.GetMeResponse; -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; - -/** - * BaseResponseGetMeResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class BaseResponseGetMeResponse { - 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 GetMeResponse 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 BaseResponseGetMeResponse() { - } - - public BaseResponseGetMeResponse 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 BaseResponseGetMeResponse data(@javax.annotation.Nullable GetMeResponse data) { - this.data = data; - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nullable - public GetMeResponse getData() { - return data; - } - - public void setData(@javax.annotation.Nullable GetMeResponse data) { - this.data = data; - } - - - public BaseResponseGetMeResponse 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 BaseResponseGetMeResponse errors(@javax.annotation.Nullable List errors) { - this.errors = errors; - return this; - } - - public BaseResponseGetMeResponse 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 BaseResponseGetMeResponse 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 BaseResponseGetMeResponse instance itself - */ - public BaseResponseGetMeResponse 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; - } - BaseResponseGetMeResponse baseResponseGetMeResponse = (BaseResponseGetMeResponse) o; - return Objects.equals(this.status, baseResponseGetMeResponse.status) && - Objects.equals(this.data, baseResponseGetMeResponse.data) && - Objects.equals(this.message, baseResponseGetMeResponse.message) && - Objects.equals(this.errors, baseResponseGetMeResponse.errors) && - Objects.equals(this.meta, baseResponseGetMeResponse.meta)&& - Objects.equals(this.additionalProperties, baseResponseGetMeResponse.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 BaseResponseGetMeResponse {\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 BaseResponseGetMeResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!BaseResponseGetMeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in BaseResponseGetMeResponse is not found in the empty JSON string", BaseResponseGetMeResponse.openapiRequiredFields.toString())); - } - } - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // validate the optional field `data` - if (jsonObj.get("data") != null && !jsonObj.get("data").isJsonNull()) { - GetMeResponse.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 (!BaseResponseGetMeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'BaseResponseGetMeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(BaseResponseGetMeResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, BaseResponseGetMeResponse 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 BaseResponseGetMeResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - BaseResponseGetMeResponse 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 BaseResponseGetMeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of BaseResponseGetMeResponse - * @throws IOException if the JSON string is invalid with respect to BaseResponseGetMeResponse - */ - public static BaseResponseGetMeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, BaseResponseGetMeResponse.class); - } - - /** - * Convert an instance of BaseResponseGetMeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/DebugPromptEvent.java b/src/main/java/ai/reveng/model/DebugPromptEvent.java deleted file mode 100644 index 70be76dc..00000000 --- a/src/main/java/ai/reveng/model/DebugPromptEvent.java +++ /dev/null @@ -1,404 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package ai.reveng.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.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 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; - -/** - * DebugPromptEvent - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class DebugPromptEvent { - public static final String SERIALIZED_NAME_ACTIVITY = "activity"; - @SerializedName(SERIALIZED_NAME_ACTIVITY) - @javax.annotation.Nonnull - private String activity; - - public static final String SERIALIZED_NAME_ATTEMPT = "attempt"; - @SerializedName(SERIALIZED_NAME_ATTEMPT) - @javax.annotation.Nonnull - private Integer attempt; - - public static final String SERIALIZED_NAME_SEQ = "seq"; - @SerializedName(SERIALIZED_NAME_SEQ) - @javax.annotation.Nonnull - private Integer seq; - - public static final String SERIALIZED_NAME_TYPE = "type"; - @SerializedName(SERIALIZED_NAME_TYPE) - @javax.annotation.Nonnull - private String type; - - public static final String SERIALIZED_NAME_USER_PROMPT = "user_prompt"; - @SerializedName(SERIALIZED_NAME_USER_PROMPT) - @javax.annotation.Nonnull - private String userPrompt; - - public DebugPromptEvent() { - } - - public DebugPromptEvent activity(@javax.annotation.Nonnull String activity) { - this.activity = activity; - return this; - } - - /** - * Get activity - * @return activity - */ - @javax.annotation.Nonnull - public String getActivity() { - return activity; - } - - public void setActivity(@javax.annotation.Nonnull String activity) { - this.activity = activity; - } - - - public DebugPromptEvent attempt(@javax.annotation.Nonnull Integer attempt) { - this.attempt = attempt; - return this; - } - - /** - * Get attempt - * @return attempt - */ - @javax.annotation.Nonnull - public Integer getAttempt() { - return attempt; - } - - public void setAttempt(@javax.annotation.Nonnull Integer attempt) { - this.attempt = attempt; - } - - - public DebugPromptEvent seq(@javax.annotation.Nonnull Integer seq) { - this.seq = seq; - return this; - } - - /** - * Get seq - * @return seq - */ - @javax.annotation.Nonnull - public Integer getSeq() { - return seq; - } - - public void setSeq(@javax.annotation.Nonnull Integer seq) { - this.seq = seq; - } - - - public DebugPromptEvent type(@javax.annotation.Nonnull String type) { - this.type = type; - return this; - } - - /** - * Get type - * @return type - */ - @javax.annotation.Nonnull - public String getType() { - return type; - } - - public void setType(@javax.annotation.Nonnull String type) { - this.type = type; - } - - - public DebugPromptEvent userPrompt(@javax.annotation.Nonnull String userPrompt) { - this.userPrompt = userPrompt; - return this; - } - - /** - * Get userPrompt - * @return userPrompt - */ - @javax.annotation.Nonnull - public String getUserPrompt() { - return userPrompt; - } - - public void setUserPrompt(@javax.annotation.Nonnull String userPrompt) { - this.userPrompt = userPrompt; - } - - /** - * 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 DebugPromptEvent instance itself - */ - public DebugPromptEvent 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; - } - DebugPromptEvent debugPromptEvent = (DebugPromptEvent) o; - return Objects.equals(this.activity, debugPromptEvent.activity) && - Objects.equals(this.attempt, debugPromptEvent.attempt) && - Objects.equals(this.seq, debugPromptEvent.seq) && - Objects.equals(this.type, debugPromptEvent.type) && - Objects.equals(this.userPrompt, debugPromptEvent.userPrompt)&& - Objects.equals(this.additionalProperties, debugPromptEvent.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(activity, attempt, seq, type, userPrompt, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class DebugPromptEvent {\n"); - sb.append(" activity: ").append(toIndentedString(activity)).append("\n"); - sb.append(" attempt: ").append(toIndentedString(attempt)).append("\n"); - sb.append(" seq: ").append(toIndentedString(seq)).append("\n"); - sb.append(" type: ").append(toIndentedString(type)).append("\n"); - sb.append(" userPrompt: ").append(toIndentedString(userPrompt)).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("activity", "attempt", "seq", "type", "user_prompt")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("activity", "attempt", "seq", "type", "user_prompt")); - } - - /** - * 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 DebugPromptEvent - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!DebugPromptEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DebugPromptEvent is not found in the empty JSON string", DebugPromptEvent.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : DebugPromptEvent.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("activity").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `activity` to be a primitive type in the JSON string but got `%s`", jsonObj.get("activity").toString())); - } - if (!jsonObj.get("type").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `type` to be a primitive type in the JSON string but got `%s`", jsonObj.get("type").toString())); - } - if (!jsonObj.get("user_prompt").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `user_prompt` to be a primitive type in the JSON string but got `%s`", jsonObj.get("user_prompt").toString())); - } - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!DebugPromptEvent.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'DebugPromptEvent' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(DebugPromptEvent.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, DebugPromptEvent 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 DebugPromptEvent read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - DebugPromptEvent 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 DebugPromptEvent given an JSON string - * - * @param jsonString JSON string - * @return An instance of DebugPromptEvent - * @throws IOException if the JSON string is invalid with respect to DebugPromptEvent - */ - public static DebugPromptEvent fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, DebugPromptEvent.class); - } - - /** - * Convert an instance of DebugPromptEvent to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/ELFRelocation.java b/src/main/java/ai/reveng/model/ELFRelocation.java index 8d26a756..11e20594 100644 --- a/src/main/java/ai/reveng/model/ELFRelocation.java +++ b/src/main/java/ai/reveng/model/ELFRelocation.java @@ -86,6 +86,11 @@ public class ELFRelocation { @javax.annotation.Nonnull private Boolean isPltgot; + public static final String SERIALIZED_NAME_IS_UNICODE_SYMBOL_NAME = "is_unicode_symbol_name"; + @SerializedName(SERIALIZED_NAME_IS_UNICODE_SYMBOL_NAME) + @javax.annotation.Nullable + private Boolean isUnicodeSymbolName = true; + public ELFRelocation() { } @@ -221,6 +226,25 @@ public void setIsPltgot(@javax.annotation.Nonnull Boolean isPltgot) { this.isPltgot = isPltgot; } + + public ELFRelocation isUnicodeSymbolName(@javax.annotation.Nullable Boolean isUnicodeSymbolName) { + this.isUnicodeSymbolName = isUnicodeSymbolName; + return this; + } + + /** + * Get isUnicodeSymbolName + * @return isUnicodeSymbolName + */ + @javax.annotation.Nullable + public Boolean getIsUnicodeSymbolName() { + return isUnicodeSymbolName; + } + + public void setIsUnicodeSymbolName(@javax.annotation.Nullable Boolean isUnicodeSymbolName) { + this.isUnicodeSymbolName = isUnicodeSymbolName; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -282,13 +306,14 @@ public boolean equals(Object o) { Objects.equals(this.addend, elFRelocation.addend) && Objects.equals(this.symbolName, elFRelocation.symbolName) && Objects.equals(this.isDynamic, elFRelocation.isDynamic) && - Objects.equals(this.isPltgot, elFRelocation.isPltgot)&& + Objects.equals(this.isPltgot, elFRelocation.isPltgot) && + Objects.equals(this.isUnicodeSymbolName, elFRelocation.isUnicodeSymbolName)&& Objects.equals(this.additionalProperties, elFRelocation.additionalProperties); } @Override public int hashCode() { - return Objects.hash(address, type, size, addend, symbolName, isDynamic, isPltgot, additionalProperties); + return Objects.hash(address, type, size, addend, symbolName, isDynamic, isPltgot, isUnicodeSymbolName, additionalProperties); } @Override @@ -302,6 +327,7 @@ public String toString() { sb.append(" symbolName: ").append(toIndentedString(symbolName)).append("\n"); sb.append(" isDynamic: ").append(toIndentedString(isDynamic)).append("\n"); sb.append(" isPltgot: ").append(toIndentedString(isPltgot)).append("\n"); + sb.append(" isUnicodeSymbolName: ").append(toIndentedString(isUnicodeSymbolName)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -324,7 +350,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("address", "type", "size", "addend", "symbol_name", "is_dynamic", "is_pltgot")); + openapiFields = new HashSet(Arrays.asList("address", "type", "size", "addend", "symbol_name", "is_dynamic", "is_pltgot", "is_unicode_symbol_name")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("address", "type", "size", "addend", "symbol_name", "is_dynamic", "is_pltgot")); diff --git a/src/main/java/ai/reveng/model/ELFSymbol.java b/src/main/java/ai/reveng/model/ELFSymbol.java index 543a8315..793e123d 100644 --- a/src/main/java/ai/reveng/model/ELFSymbol.java +++ b/src/main/java/ai/reveng/model/ELFSymbol.java @@ -86,6 +86,11 @@ public class ELFSymbol { @javax.annotation.Nonnull private Integer sectionIndex; + public static final String SERIALIZED_NAME_IS_UNICODE_NAME = "is_unicode_name"; + @SerializedName(SERIALIZED_NAME_IS_UNICODE_NAME) + @javax.annotation.Nullable + private Boolean isUnicodeName = true; + public ELFSymbol() { } @@ -221,6 +226,25 @@ public void setSectionIndex(@javax.annotation.Nonnull Integer sectionIndex) { this.sectionIndex = sectionIndex; } + + public ELFSymbol isUnicodeName(@javax.annotation.Nullable Boolean isUnicodeName) { + this.isUnicodeName = isUnicodeName; + return this; + } + + /** + * Get isUnicodeName + * @return isUnicodeName + */ + @javax.annotation.Nullable + public Boolean getIsUnicodeName() { + return isUnicodeName; + } + + public void setIsUnicodeName(@javax.annotation.Nullable Boolean isUnicodeName) { + this.isUnicodeName = isUnicodeName; + } + /** * A container for additional, undeclared properties. * This is a holder for any undeclared properties as specified with @@ -282,13 +306,14 @@ public boolean equals(Object o) { Objects.equals(this.type, elFSymbol.type) && Objects.equals(this.binding, elFSymbol.binding) && Objects.equals(this.visibility, elFSymbol.visibility) && - Objects.equals(this.sectionIndex, elFSymbol.sectionIndex)&& + Objects.equals(this.sectionIndex, elFSymbol.sectionIndex) && + Objects.equals(this.isUnicodeName, elFSymbol.isUnicodeName)&& Objects.equals(this.additionalProperties, elFSymbol.additionalProperties); } @Override public int hashCode() { - return Objects.hash(name, value, size, type, binding, visibility, sectionIndex, additionalProperties); + return Objects.hash(name, value, size, type, binding, visibility, sectionIndex, isUnicodeName, additionalProperties); } @Override @@ -302,6 +327,7 @@ public String toString() { sb.append(" binding: ").append(toIndentedString(binding)).append("\n"); sb.append(" visibility: ").append(toIndentedString(visibility)).append("\n"); sb.append(" sectionIndex: ").append(toIndentedString(sectionIndex)).append("\n"); + sb.append(" isUnicodeName: ").append(toIndentedString(isUnicodeName)).append("\n"); sb.append(" additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n"); sb.append("}"); return sb.toString(); @@ -324,7 +350,7 @@ private String toIndentedString(Object o) { static { // a set of all properties/fields (JSON key names) - openapiFields = new HashSet(Arrays.asList("name", "value", "size", "type", "binding", "visibility", "section_index")); + openapiFields = new HashSet(Arrays.asList("name", "value", "size", "type", "binding", "visibility", "section_index", "is_unicode_name")); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet(Arrays.asList("name", "value", "size", "type", "binding", "visibility", "section_index")); diff --git a/src/main/java/ai/reveng/model/EventDebugPrompt.java b/src/main/java/ai/reveng/model/EventDebugPrompt.java deleted file mode 100644 index 5ddca50a..00000000 --- a/src/main/java/ai/reveng/model/EventDebugPrompt.java +++ /dev/null @@ -1,427 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package ai.reveng.model; - -import java.util.Objects; -import java.util.Locale; -import ai.reveng.model.DebugPromptEvent; -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 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; - -/** - * EventDebugPrompt - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class EventDebugPrompt { - public static final String SERIALIZED_NAME_DATA = "data"; - @SerializedName(SERIALIZED_NAME_DATA) - @javax.annotation.Nonnull - private DebugPromptEvent data; - - /** - * The event name. - */ - @JsonAdapter(EventEnum.Adapter.class) - public enum EventEnum { - DEBUG_PROMPT("debug_prompt"), - - UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); - - private String value; - - EventEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static EventEnum fromValue(String value) { - for (EventEnum b : EventEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_DEFAULT_OPEN_API; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final EventEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public EventEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return EventEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - EventEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_EVENT = "event"; - @SerializedName(SERIALIZED_NAME_EVENT) - @javax.annotation.Nonnull - private EventEnum event; - - public static final String SERIALIZED_NAME_ID = "id"; - @SerializedName(SERIALIZED_NAME_ID) - @javax.annotation.Nullable - private Integer id; - - public static final String SERIALIZED_NAME_RETRY = "retry"; - @SerializedName(SERIALIZED_NAME_RETRY) - @javax.annotation.Nullable - private Integer retry; - - public EventDebugPrompt() { - } - - public EventDebugPrompt data(@javax.annotation.Nonnull DebugPromptEvent data) { - this.data = data; - return this; - } - - /** - * Get data - * @return data - */ - @javax.annotation.Nonnull - public DebugPromptEvent getData() { - return data; - } - - public void setData(@javax.annotation.Nonnull DebugPromptEvent data) { - this.data = data; - } - - - public EventDebugPrompt event(@javax.annotation.Nonnull EventEnum event) { - this.event = event; - return this; - } - - /** - * The event name. - * @return event - */ - @javax.annotation.Nonnull - public EventEnum getEvent() { - return event; - } - - public void setEvent(@javax.annotation.Nonnull EventEnum event) { - this.event = event; - } - - - public EventDebugPrompt id(@javax.annotation.Nullable Integer id) { - this.id = id; - return this; - } - - /** - * The event ID. - * @return id - */ - @javax.annotation.Nullable - public Integer getId() { - return id; - } - - public void setId(@javax.annotation.Nullable Integer id) { - this.id = id; - } - - - public EventDebugPrompt retry(@javax.annotation.Nullable Integer retry) { - this.retry = retry; - return this; - } - - /** - * The retry time in milliseconds. - * @return retry - */ - @javax.annotation.Nullable - public Integer getRetry() { - return retry; - } - - public void setRetry(@javax.annotation.Nullable Integer retry) { - this.retry = retry; - } - - /** - * 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 EventDebugPrompt instance itself - */ - public EventDebugPrompt 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; - } - EventDebugPrompt eventDebugPrompt = (EventDebugPrompt) o; - return Objects.equals(this.data, eventDebugPrompt.data) && - Objects.equals(this.event, eventDebugPrompt.event) && - Objects.equals(this.id, eventDebugPrompt.id) && - Objects.equals(this.retry, eventDebugPrompt.retry)&& - Objects.equals(this.additionalProperties, eventDebugPrompt.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(data, event, id, retry, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class EventDebugPrompt {\n"); - sb.append(" data: ").append(toIndentedString(data)).append("\n"); - sb.append(" event: ").append(toIndentedString(event)).append("\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); - sb.append(" retry: ").append(toIndentedString(retry)).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("data", "event", "id", "retry")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("data", "event")); - } - - /** - * 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 EventDebugPrompt - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!EventDebugPrompt.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventDebugPrompt is not found in the empty JSON string", EventDebugPrompt.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : EventDebugPrompt.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("event").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `event` to be a primitive type in the JSON string but got `%s`", jsonObj.get("event").toString())); - } - // validate the required field `event` - EventEnum.validateJsonElement(jsonObj.get("event")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!EventDebugPrompt.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'EventDebugPrompt' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(EventDebugPrompt.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, EventDebugPrompt 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 EventDebugPrompt read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - EventDebugPrompt 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 EventDebugPrompt given an JSON string - * - * @param jsonString JSON string - * @return An instance of EventDebugPrompt - * @throws IOException if the JSON string is invalid with respect to EventDebugPrompt - */ - public static EventDebugPrompt fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, EventDebugPrompt.class); - } - - /** - * Convert an instance of EventDebugPrompt to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/GetMeResponse.java b/src/main/java/ai/reveng/model/GetMeResponse.java deleted file mode 100644 index c21cc122..00000000 --- a/src/main/java/ai/reveng/model/GetMeResponse.java +++ /dev/null @@ -1,549 +0,0 @@ -/* - * RevEng.AI API - * RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - * - * - * - * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). - * https://openapi-generator.tech - * Do not edit the class manually. - */ - - -package ai.reveng.model; - -import java.util.Objects; -import java.util.Locale; -import com.google.gson.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.time.OffsetDateTime; -import java.util.Arrays; - -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; - -/** - * GetMeResponse - */ -@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen") -public class GetMeResponse { - public static final String SERIALIZED_NAME_USERNAME = "username"; - @SerializedName(SERIALIZED_NAME_USERNAME) - @javax.annotation.Nonnull - private String username; - - public static final String SERIALIZED_NAME_USER_ID = "user_id"; - @SerializedName(SERIALIZED_NAME_USER_ID) - @javax.annotation.Nonnull - private Integer userId; - - public static final String SERIALIZED_NAME_FIRST_NAME = "first_name"; - @SerializedName(SERIALIZED_NAME_FIRST_NAME) - @javax.annotation.Nonnull - private String firstName; - - public static final String SERIALIZED_NAME_LAST_NAME = "last_name"; - @SerializedName(SERIALIZED_NAME_LAST_NAME) - @javax.annotation.Nonnull - private String lastName; - - public static final String SERIALIZED_NAME_EMAIL = "email"; - @SerializedName(SERIALIZED_NAME_EMAIL) - @javax.annotation.Nonnull - private String email; - - public static final String SERIALIZED_NAME_CREATION = "creation"; - @SerializedName(SERIALIZED_NAME_CREATION) - @javax.annotation.Nonnull - private OffsetDateTime creation; - - public static final String SERIALIZED_NAME_TUTORIAL_SEEN = "tutorial_seen"; - @SerializedName(SERIALIZED_NAME_TUTORIAL_SEEN) - @javax.annotation.Nonnull - private Boolean tutorialSeen; - - /** - * Gets or Sets role - */ - @JsonAdapter(RoleEnum.Adapter.class) - public enum RoleEnum { - USER("USER"), - - ADMIN("ADMIN"), - - SUPERADMIN("SUPERADMIN"), - - SYSTEM("SYSTEM"), - - UNKNOWN_DEFAULT_OPEN_API("unknown_default_open_api"); - - private String value; - - RoleEnum(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - @Override - public String toString() { - return String.valueOf(value); - } - - public static RoleEnum fromValue(String value) { - for (RoleEnum b : RoleEnum.values()) { - if (b.value.equals(value)) { - return b; - } - } - return UNKNOWN_DEFAULT_OPEN_API; - } - - public static class Adapter extends TypeAdapter { - @Override - public void write(final JsonWriter jsonWriter, final RoleEnum enumeration) throws IOException { - jsonWriter.value(enumeration.getValue()); - } - - @Override - public RoleEnum read(final JsonReader jsonReader) throws IOException { - String value = jsonReader.nextString(); - return RoleEnum.fromValue(value); - } - } - - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - String value = jsonElement.getAsString(); - RoleEnum.fromValue(value); - } - } - - public static final String SERIALIZED_NAME_ROLE = "role"; - @SerializedName(SERIALIZED_NAME_ROLE) - @javax.annotation.Nonnull - private RoleEnum role; - - public GetMeResponse() { - } - - public GetMeResponse username(@javax.annotation.Nonnull String username) { - this.username = username; - return this; - } - - /** - * Get username - * @return username - */ - @javax.annotation.Nonnull - public String getUsername() { - return username; - } - - public void setUsername(@javax.annotation.Nonnull String username) { - this.username = username; - } - - - public GetMeResponse userId(@javax.annotation.Nonnull Integer userId) { - this.userId = userId; - return this; - } - - /** - * Get userId - * @return userId - */ - @javax.annotation.Nonnull - public Integer getUserId() { - return userId; - } - - public void setUserId(@javax.annotation.Nonnull Integer userId) { - this.userId = userId; - } - - - public GetMeResponse firstName(@javax.annotation.Nonnull String firstName) { - this.firstName = firstName; - return this; - } - - /** - * Get firstName - * @return firstName - */ - @javax.annotation.Nonnull - public String getFirstName() { - return firstName; - } - - public void setFirstName(@javax.annotation.Nonnull String firstName) { - this.firstName = firstName; - } - - - public GetMeResponse lastName(@javax.annotation.Nonnull String lastName) { - this.lastName = lastName; - return this; - } - - /** - * Get lastName - * @return lastName - */ - @javax.annotation.Nonnull - public String getLastName() { - return lastName; - } - - public void setLastName(@javax.annotation.Nonnull String lastName) { - this.lastName = lastName; - } - - - public GetMeResponse email(@javax.annotation.Nonnull String email) { - this.email = email; - return this; - } - - /** - * Get email - * @return email - */ - @javax.annotation.Nonnull - public String getEmail() { - return email; - } - - public void setEmail(@javax.annotation.Nonnull String email) { - this.email = email; - } - - - public GetMeResponse creation(@javax.annotation.Nonnull OffsetDateTime creation) { - this.creation = creation; - return this; - } - - /** - * Get creation - * @return creation - */ - @javax.annotation.Nonnull - public OffsetDateTime getCreation() { - return creation; - } - - public void setCreation(@javax.annotation.Nonnull OffsetDateTime creation) { - this.creation = creation; - } - - - public GetMeResponse tutorialSeen(@javax.annotation.Nonnull Boolean tutorialSeen) { - this.tutorialSeen = tutorialSeen; - return this; - } - - /** - * Get tutorialSeen - * @return tutorialSeen - */ - @javax.annotation.Nonnull - public Boolean getTutorialSeen() { - return tutorialSeen; - } - - public void setTutorialSeen(@javax.annotation.Nonnull Boolean tutorialSeen) { - this.tutorialSeen = tutorialSeen; - } - - - public GetMeResponse role(@javax.annotation.Nonnull RoleEnum role) { - this.role = role; - return this; - } - - /** - * Get role - * @return role - */ - @javax.annotation.Nonnull - public RoleEnum getRole() { - return role; - } - - public void setRole(@javax.annotation.Nonnull RoleEnum role) { - this.role = role; - } - - /** - * 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 GetMeResponse instance itself - */ - public GetMeResponse 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; - } - GetMeResponse getMeResponse = (GetMeResponse) o; - return Objects.equals(this.username, getMeResponse.username) && - Objects.equals(this.userId, getMeResponse.userId) && - Objects.equals(this.firstName, getMeResponse.firstName) && - Objects.equals(this.lastName, getMeResponse.lastName) && - Objects.equals(this.email, getMeResponse.email) && - Objects.equals(this.creation, getMeResponse.creation) && - Objects.equals(this.tutorialSeen, getMeResponse.tutorialSeen) && - Objects.equals(this.role, getMeResponse.role)&& - Objects.equals(this.additionalProperties, getMeResponse.additionalProperties); - } - - @Override - public int hashCode() { - return Objects.hash(username, userId, firstName, lastName, email, creation, tutorialSeen, role, additionalProperties); - } - - @Override - public String toString() { - StringBuilder sb = new StringBuilder(); - sb.append("class GetMeResponse {\n"); - sb.append(" username: ").append(toIndentedString(username)).append("\n"); - sb.append(" userId: ").append(toIndentedString(userId)).append("\n"); - sb.append(" firstName: ").append(toIndentedString(firstName)).append("\n"); - sb.append(" lastName: ").append(toIndentedString(lastName)).append("\n"); - sb.append(" email: ").append(toIndentedString(email)).append("\n"); - sb.append(" creation: ").append(toIndentedString(creation)).append("\n"); - sb.append(" tutorialSeen: ").append(toIndentedString(tutorialSeen)).append("\n"); - sb.append(" role: ").append(toIndentedString(role)).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("username", "user_id", "first_name", "last_name", "email", "creation", "tutorial_seen", "role")); - - // a set of required properties/fields (JSON key names) - openapiRequiredFields = new HashSet(Arrays.asList("username", "user_id", "first_name", "last_name", "email", "creation", "tutorial_seen", "role")); - } - - /** - * 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 GetMeResponse - */ - public static void validateJsonElement(JsonElement jsonElement) throws IOException { - if (jsonElement == null) { - if (!GetMeResponse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null - throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in GetMeResponse is not found in the empty JSON string", GetMeResponse.openapiRequiredFields.toString())); - } - } - - // check to make sure all required properties/fields are present in the JSON string - for (String requiredField : GetMeResponse.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("username").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `username` to be a primitive type in the JSON string but got `%s`", jsonObj.get("username").toString())); - } - if (!jsonObj.get("first_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `first_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("first_name").toString())); - } - if (!jsonObj.get("last_name").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `last_name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("last_name").toString())); - } - if (!jsonObj.get("email").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `email` to be a primitive type in the JSON string but got `%s`", jsonObj.get("email").toString())); - } - if (!jsonObj.get("role").isJsonPrimitive()) { - throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `role` to be a primitive type in the JSON string but got `%s`", jsonObj.get("role").toString())); - } - // validate the required field `role` - RoleEnum.validateJsonElement(jsonObj.get("role")); - } - - public static class CustomTypeAdapterFactory implements TypeAdapterFactory { - @SuppressWarnings("unchecked") - @Override - public TypeAdapter create(Gson gson, TypeToken type) { - if (!GetMeResponse.class.isAssignableFrom(type.getRawType())) { - return null; // this class only serializes 'GetMeResponse' and its subtypes - } - final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); - final TypeAdapter thisAdapter - = gson.getDelegateAdapter(this, TypeToken.get(GetMeResponse.class)); - - return (TypeAdapter) new TypeAdapter() { - @Override - public void write(JsonWriter out, GetMeResponse 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 GetMeResponse read(JsonReader in) throws IOException { - JsonElement jsonElement = elementAdapter.read(in); - validateJsonElement(jsonElement); - JsonObject jsonObj = jsonElement.getAsJsonObject(); - // store additional fields in the deserialized instance - GetMeResponse 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 GetMeResponse given an JSON string - * - * @param jsonString JSON string - * @return An instance of GetMeResponse - * @throws IOException if the JSON string is invalid with respect to GetMeResponse - */ - public static GetMeResponse fromJson(String jsonString) throws IOException { - return JSON.getGson().fromJson(jsonString, GetMeResponse.class); - } - - /** - * Convert an instance of GetMeResponse to an JSON string - * - * @return JSON string - */ - public String toJson() { - return JSON.getGson().toJson(this); - } -} - diff --git a/src/main/java/ai/reveng/model/StreamAiDecompilation200ResponseInner.java b/src/main/java/ai/reveng/model/StreamAiDecompilation200ResponseInner.java index dd53a3bb..9b90505d 100644 --- a/src/main/java/ai/reveng/model/StreamAiDecompilation200ResponseInner.java +++ b/src/main/java/ai/reveng/model/StreamAiDecompilation200ResponseInner.java @@ -16,7 +16,6 @@ import java.util.Locale; import ai.reveng.model.EventAttemptFailed; import ai.reveng.model.EventAttemptStarted; -import ai.reveng.model.EventDebugPrompt; import ai.reveng.model.EventDecompFailed; import ai.reveng.model.EventDecompFinished; import ai.reveng.model.EventProse; @@ -83,7 +82,6 @@ public TypeAdapter create(Gson gson, TypeToken type) { final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class); final TypeAdapter adapterEventAttemptFailed = gson.getDelegateAdapter(this, TypeToken.get(EventAttemptFailed.class)); final TypeAdapter adapterEventAttemptStarted = gson.getDelegateAdapter(this, TypeToken.get(EventAttemptStarted.class)); - final TypeAdapter adapterEventDebugPrompt = gson.getDelegateAdapter(this, TypeToken.get(EventDebugPrompt.class)); final TypeAdapter adapterEventDecompFailed = gson.getDelegateAdapter(this, TypeToken.get(EventDecompFailed.class)); final TypeAdapter adapterEventDecompFinished = gson.getDelegateAdapter(this, TypeToken.get(EventDecompFinished.class)); final TypeAdapter adapterEventProse = gson.getDelegateAdapter(this, TypeToken.get(EventProse.class)); @@ -112,12 +110,6 @@ public void write(JsonWriter out, StreamAiDecompilation200ResponseInner value) t elementAdapter.write(out, element); return; } - // check if the actual instance is of the type `EventDebugPrompt` - if (value.getActualInstance() instanceof EventDebugPrompt) { - JsonElement element = adapterEventDebugPrompt.toJsonTree((EventDebugPrompt)value.getActualInstance()); - elementAdapter.write(out, element); - return; - } // check if the actual instance is of the type `EventDecompFailed` if (value.getActualInstance() instanceof EventDecompFailed) { JsonElement element = adapterEventDecompFailed.toJsonTree((EventDecompFailed)value.getActualInstance()); @@ -160,7 +152,7 @@ public void write(JsonWriter out, StreamAiDecompilation200ResponseInner value) t elementAdapter.write(out, element); return; } - throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: EventAttemptFailed, EventAttemptStarted, EventDebugPrompt, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning"); + throw new IOException("Failed to serialize as the type doesn't match oneOf schemas: EventAttemptFailed, EventAttemptStarted, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning"); } @Override @@ -196,18 +188,6 @@ public StreamAiDecompilation200ResponseInner read(JsonReader in) throws IOExcept errorMessages.add(String.format(Locale.ROOT, "Deserialization for EventAttemptStarted failed with `%s`.", e.getMessage())); log.log(Level.FINER, "Input data does not match schema 'EventAttemptStarted'", e); } - // deserialize EventDebugPrompt - try { - // validate the JSON object to see if any exception is thrown - EventDebugPrompt.validateJsonElement(jsonElement); - actualAdapter = adapterEventDebugPrompt; - match++; - log.log(Level.FINER, "Input data matches schema 'EventDebugPrompt'"); - } catch (Exception e) { - // deserialization failed, continue - errorMessages.add(String.format(Locale.ROOT, "Deserialization for EventDebugPrompt failed with `%s`.", e.getMessage())); - log.log(Level.FINER, "Input data does not match schema 'EventDebugPrompt'", e); - } // deserialize EventDecompFailed try { // validate the JSON object to see if any exception is thrown @@ -320,7 +300,6 @@ public StreamAiDecompilation200ResponseInner(Object o) { static { schemas.put("EventAttemptFailed", EventAttemptFailed.class); schemas.put("EventAttemptStarted", EventAttemptStarted.class); - schemas.put("EventDebugPrompt", EventDebugPrompt.class); schemas.put("EventDecompFailed", EventDecompFailed.class); schemas.put("EventDecompFinished", EventDecompFinished.class); schemas.put("EventProse", EventProse.class); @@ -338,7 +317,7 @@ public Map> getSchemas() { /** * Set the instance that matches the oneOf child schema, check * the instance parameter is valid against the oneOf child schemas: - * EventAttemptFailed, EventAttemptStarted, EventDebugPrompt, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning + * EventAttemptFailed, EventAttemptStarted, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning * * It could be an instance of the 'oneOf' schemas. */ @@ -354,11 +333,6 @@ public void setActualInstance(Object instance) { return; } - if (instance instanceof EventDebugPrompt) { - super.setActualInstance(instance); - return; - } - if (instance instanceof EventDecompFailed) { super.setActualInstance(instance); return; @@ -394,14 +368,14 @@ public void setActualInstance(Object instance) { return; } - throw new RuntimeException("Invalid instance type. Must be EventAttemptFailed, EventAttemptStarted, EventDebugPrompt, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning"); + throw new RuntimeException("Invalid instance type. Must be EventAttemptFailed, EventAttemptStarted, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning"); } /** * Get the actual instance, which can be the following: - * EventAttemptFailed, EventAttemptStarted, EventDebugPrompt, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning + * EventAttemptFailed, EventAttemptStarted, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning * - * @return The actual instance (EventAttemptFailed, EventAttemptStarted, EventDebugPrompt, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning) + * @return The actual instance (EventAttemptFailed, EventAttemptStarted, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning) */ @SuppressWarnings("unchecked") @Override @@ -431,17 +405,6 @@ public EventAttemptStarted getEventAttemptStarted() throws ClassCastException { return (EventAttemptStarted)super.getActualInstance(); } - /** - * Get the actual instance of `EventDebugPrompt`. If the actual instance is not `EventDebugPrompt`, - * the ClassCastException will be thrown. - * - * @return The actual instance of `EventDebugPrompt` - * @throws ClassCastException if the instance is not `EventDebugPrompt` - */ - public EventDebugPrompt getEventDebugPrompt() throws ClassCastException { - return (EventDebugPrompt)super.getActualInstance(); - } - /** * Get the actual instance of `EventDecompFailed`. If the actual instance is not `EventDecompFailed`, * the ClassCastException will be thrown. @@ -545,14 +508,6 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti errorMessages.add(String.format(Locale.ROOT, "Deserialization for EventAttemptStarted failed with `%s`.", e.getMessage())); // continue to the next one } - // validate the json string with EventDebugPrompt - try { - EventDebugPrompt.validateJsonElement(jsonElement); - validCount++; - } catch (Exception e) { - errorMessages.add(String.format(Locale.ROOT, "Deserialization for EventDebugPrompt failed with `%s`.", e.getMessage())); - // continue to the next one - } // validate the json string with EventDecompFailed try { EventDecompFailed.validateJsonElement(jsonElement); @@ -610,7 +565,7 @@ public static void validateJsonElement(JsonElement jsonElement) throws IOExcepti // continue to the next one } if (validCount != 1) { - throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for StreamAiDecompilation200ResponseInner with oneOf schemas: EventAttemptFailed, EventAttemptStarted, EventDebugPrompt, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); + throw new IOException(String.format(Locale.ROOT, "The JSON string is invalid for StreamAiDecompilation200ResponseInner with oneOf schemas: EventAttemptFailed, EventAttemptStarted, EventDecompFailed, EventDecompFinished, EventProse, EventRenameApplied, EventSourceDelta, EventSourceReset, EventWarning. %d class(es) match the result, expected 1. Detailed failure message for oneOf schemas: %s. JSON: %s", validCount, errorMessages, jsonElement.toString())); } }