diff --git a/README.md b/README.md
index 12c89194..c30ef5b5 100644
--- a/README.md
+++ b/README.md
@@ -167,6 +167,7 @@ Class | Method | HTTP request | Description
*FunctionsAiDecompilationApi* | [**patchAiDecompilationInlineComment**](docs/FunctionsAiDecompilationApi.md#patchAiDecompilationInlineComment) | **PATCH** /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment
*FunctionsAiDecompilationApi* | [**regenerateAiDecompilationInlineComments**](docs/FunctionsAiDecompilationApi.md#regenerateAiDecompilationInlineComments) | **POST** /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments
*FunctionsAiDecompilationApi* | [**regenerateAiDecompilationSummary**](docs/FunctionsAiDecompilationApi.md#regenerateAiDecompilationSummary) | **POST** /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary
+*FunctionsAiDecompilationApi* | [**streamAiDecompilation**](docs/FunctionsAiDecompilationApi.md#streamAiDecompilation) | **GET** /v3/functions/{function_id}/ai-decompilation/events | Stream live AI decompilation output (SSE)
*FunctionsAiDecompilationApi* | [**updateAiDecompilationComment**](docs/FunctionsAiDecompilationApi.md#updateAiDecompilationComment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment
*FunctionsAiDecompilationApi* | [**upsertAiDecompilationOverrides**](docs/FunctionsAiDecompilationApi.md#upsertAiDecompilationOverrides) | **PATCH** /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides
*FunctionsAiDecompilationApi* | [**upsertAiDecompilationRating**](docs/FunctionsAiDecompilationApi.md#upsertAiDecompilationRating) | **PATCH** /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation
@@ -246,6 +247,8 @@ Class | Method | HTTP request | Description
- [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md)
- [AppApiRestV2InfoTypesCapability](docs/AppApiRestV2InfoTypesCapability.md)
- [Argument](docs/Argument.md)
+ - [AttemptFailedEvent](docs/AttemptFailedEvent.md)
+ - [AttemptStartedEvent](docs/AttemptStartedEvent.md)
- [AutoRunAgents](docs/AutoRunAgents.md)
- [AutoUnstripRequest](docs/AutoUnstripRequest.md)
- [AutoUnstripResponse](docs/AutoUnstripResponse.md)
@@ -366,6 +369,9 @@ 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)
- [DecompilationData](docs/DecompilationData.md)
- [DieMatch](docs/DieMatch.md)
@@ -386,13 +392,22 @@ Class | Method | HTTP request | Description
- [ErrorBody](docs/ErrorBody.md)
- [ErrorModel](docs/ErrorModel.md)
- [Event](docs/Event.md)
+ - [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)
- [EventRUNCANCELLED](docs/EventRUNCANCELLED.md)
- [EventRUNERROR](docs/EventRUNERROR.md)
- [EventRUNFINISHED](docs/EventRUNFINISHED.md)
- [EventRUNSTARTED](docs/EventRUNSTARTED.md)
+ - [EventRenameApplied](docs/EventRenameApplied.md)
- [EventSTEPFINISHED](docs/EventSTEPFINISHED.md)
- [EventSTEPSTARTED](docs/EventSTEPSTARTED.md)
+ - [EventSourceDelta](docs/EventSourceDelta.md)
+ - [EventSourceReset](docs/EventSourceReset.md)
- [EventTEXTMESSAGECONTENT](docs/EventTEXTMESSAGECONTENT.md)
- [EventTEXTMESSAGEEND](docs/EventTEXTMESSAGEEND.md)
- [EventTEXTMESSAGESTART](docs/EventTEXTMESSAGESTART.md)
@@ -402,6 +417,7 @@ Class | Method | HTTP request | Description
- [EventTOOLCALLRESULT](docs/EventTOOLCALLRESULT.md)
- [EventTOOLCALLSTART](docs/EventTOOLCALLSTART.md)
- [EventTOOLCONFIRMATIONREQUIRED](docs/EventTOOLCONFIRMATIONREQUIRED.md)
+ - [EventWarning](docs/EventWarning.md)
- [ExportModel](docs/ExportModel.md)
- [ExternalResponse](docs/ExternalResponse.md)
- [ExtractedURL](docs/ExtractedURL.md)
@@ -494,6 +510,7 @@ Class | Method | HTTP request | Description
- [ProcessNode](docs/ProcessNode.md)
- [ProcessTree](docs/ProcessTree.md)
- [ProgressMessage](docs/ProgressMessage.md)
+ - [ProseEvent](docs/ProseEvent.md)
- [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md)
- [QueuePositionResponse](docs/QueuePositionResponse.md)
- [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md)
@@ -503,6 +520,7 @@ Class | Method | HTTP request | Description
- [RegenerateTarget](docs/RegenerateTarget.md)
- [RegistryOperation](docs/RegistryOperation.md)
- [RelativeBinaryResponse](docs/RelativeBinaryResponse.md)
+ - [RenameAppliedEvent](docs/RenameAppliedEvent.md)
- [RenameInputBody](docs/RenameInputBody.md)
- [RenameOutputBody](docs/RenameOutputBody.md)
- [ReplacementValue](docs/ReplacementValue.md)
@@ -526,6 +544,8 @@ Class | Method | HTTP request | Description
- [SingleCodeSignatureModel](docs/SingleCodeSignatureModel.md)
- [SinglePDBEntryModel](docs/SinglePDBEntryModel.md)
- [SingleSectionModel](docs/SingleSectionModel.md)
+ - [SourceDeltaEvent](docs/SourceDeltaEvent.md)
+ - [SourceResetEvent](docs/SourceResetEvent.md)
- [SseEventContextCompactedData](docs/SseEventContextCompactedData.md)
- [SseEventRunCancelledData](docs/SseEventRunCancelledData.md)
- [SseEventRunErrorData](docs/SseEventRunErrorData.md)
@@ -547,6 +567,7 @@ Class | Method | HTTP request | Description
- [StatusInput](docs/StatusInput.md)
- [StatusOutput](docs/StatusOutput.md)
- [StatusResponse](docs/StatusResponse.md)
+ - [StreamAiDecompilation200ResponseInner](docs/StreamAiDecompilation200ResponseInner.md)
- [StreamEvents200ResponseInner](docs/StreamEvents200ResponseInner.md)
- [StringFunctions](docs/StringFunctions.md)
- [StringSource](docs/StringSource.md)
@@ -578,6 +599,7 @@ Class | Method | HTTP request | Description
- [UserActivityResponse](docs/UserActivityResponse.md)
- [Vulnerabilities](docs/Vulnerabilities.md)
- [Vulnerability](docs/Vulnerability.md)
+ - [WarningEvent](docs/WarningEvent.md)
- [WorkflowProgress](docs/WorkflowProgress.md)
- [Workspace](docs/Workspace.md)
- [XrefFromResponse](docs/XrefFromResponse.md)
diff --git a/docs/AttemptFailedEvent.md b/docs/AttemptFailedEvent.md
new file mode 100644
index 00000000..aaf19b10
--- /dev/null
+++ b/docs/AttemptFailedEvent.md
@@ -0,0 +1,16 @@
+
+
+# AttemptFailedEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**error** | **String** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/AttemptStartedEvent.md b/docs/AttemptStartedEvent.md
new file mode 100644
index 00000000..635da26d
--- /dev/null
+++ b/docs/AttemptStartedEvent.md
@@ -0,0 +1,15 @@
+
+
+# AttemptStartedEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/DebugPromptEvent.md b/docs/DebugPromptEvent.md
new file mode 100644
index 00000000..45f2044e
--- /dev/null
+++ b/docs/DebugPromptEvent.md
@@ -0,0 +1,17 @@
+
+
+# DebugPromptEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**activity** | **String** | | |
+|**attempt** | **Integer** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+|**userPrompt** | **String** | | |
+
+
+
diff --git a/docs/DecompFailedEvent.md b/docs/DecompFailedEvent.md
new file mode 100644
index 00000000..b998a5d8
--- /dev/null
+++ b/docs/DecompFailedEvent.md
@@ -0,0 +1,17 @@
+
+
+# DecompFailedEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**error** | **String** | | |
+|**errorCode** | **String** | | [optional] |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/DecompFinishedEvent.md b/docs/DecompFinishedEvent.md
new file mode 100644
index 00000000..680816d5
--- /dev/null
+++ b/docs/DecompFinishedEvent.md
@@ -0,0 +1,15 @@
+
+
+# DecompFinishedEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/EventAttemptFailed.md b/docs/EventAttemptFailed.md
new file mode 100644
index 00000000..d0785f8d
--- /dev/null
+++ b/docs/EventAttemptFailed.md
@@ -0,0 +1,25 @@
+
+
+# EventAttemptFailed
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **AttemptFailedEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| ATTEMPT_FAILED | "attempt_failed" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventAttemptStarted.md b/docs/EventAttemptStarted.md
new file mode 100644
index 00000000..79bf23f5
--- /dev/null
+++ b/docs/EventAttemptStarted.md
@@ -0,0 +1,25 @@
+
+
+# EventAttemptStarted
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **AttemptStartedEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| ATTEMPT_STARTED | "attempt_started" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventDebugPrompt.md b/docs/EventDebugPrompt.md
new file mode 100644
index 00000000..25e58484
--- /dev/null
+++ b/docs/EventDebugPrompt.md
@@ -0,0 +1,25 @@
+
+
+# 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/EventDecompFailed.md b/docs/EventDecompFailed.md
new file mode 100644
index 00000000..b35cd520
--- /dev/null
+++ b/docs/EventDecompFailed.md
@@ -0,0 +1,25 @@
+
+
+# EventDecompFailed
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **DecompFailedEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| DECOMP_FAILED | "decomp_failed" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventDecompFinished.md b/docs/EventDecompFinished.md
new file mode 100644
index 00000000..0a0d346f
--- /dev/null
+++ b/docs/EventDecompFinished.md
@@ -0,0 +1,25 @@
+
+
+# EventDecompFinished
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **DecompFinishedEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| DECOMP_FINISHED | "decomp_finished" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventProse.md b/docs/EventProse.md
new file mode 100644
index 00000000..d1259f78
--- /dev/null
+++ b/docs/EventProse.md
@@ -0,0 +1,25 @@
+
+
+# EventProse
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **ProseEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| PROSE | "prose" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventRenameApplied.md b/docs/EventRenameApplied.md
new file mode 100644
index 00000000..14272f71
--- /dev/null
+++ b/docs/EventRenameApplied.md
@@ -0,0 +1,25 @@
+
+
+# EventRenameApplied
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **RenameAppliedEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| RENAME_APPLIED | "rename_applied" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventSourceDelta.md b/docs/EventSourceDelta.md
new file mode 100644
index 00000000..fd47d40e
--- /dev/null
+++ b/docs/EventSourceDelta.md
@@ -0,0 +1,25 @@
+
+
+# EventSourceDelta
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **SourceDeltaEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| SOURCE_DELTA | "source_delta" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventSourceReset.md b/docs/EventSourceReset.md
new file mode 100644
index 00000000..3771eab9
--- /dev/null
+++ b/docs/EventSourceReset.md
@@ -0,0 +1,25 @@
+
+
+# EventSourceReset
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **SourceResetEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| SOURCE_RESET | "source_reset" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/EventWarning.md b/docs/EventWarning.md
new file mode 100644
index 00000000..d7cd5cf0
--- /dev/null
+++ b/docs/EventWarning.md
@@ -0,0 +1,25 @@
+
+
+# EventWarning
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **WarningEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| WARNING | "warning" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/FunctionsAiDecompilationApi.md b/docs/FunctionsAiDecompilationApi.md
index dc616def..622640ae 100644
--- a/docs/FunctionsAiDecompilationApi.md
+++ b/docs/FunctionsAiDecompilationApi.md
@@ -23,6 +23,7 @@ All URIs are relative to *https://api.reveng.ai*
| [**patchAiDecompilationInlineComment**](FunctionsAiDecompilationApi.md#patchAiDecompilationInlineComment) | **PATCH** /v3/functions/{function_id}/ai-decompilation/inline-comments | Update a single inline comment |
| [**regenerateAiDecompilationInlineComments**](FunctionsAiDecompilationApi.md#regenerateAiDecompilationInlineComments) | **POST** /v3/functions/{function_id}/ai-decompilation/inline-comments | Regenerate AI decompilation inline comments |
| [**regenerateAiDecompilationSummary**](FunctionsAiDecompilationApi.md#regenerateAiDecompilationSummary) | **POST** /v3/functions/{function_id}/ai-decompilation/summary | Regenerate AI decompilation summary |
+| [**streamAiDecompilation**](FunctionsAiDecompilationApi.md#streamAiDecompilation) | **GET** /v3/functions/{function_id}/ai-decompilation/events | Stream live AI decompilation output (SSE) |
| [**updateAiDecompilationComment**](FunctionsAiDecompilationApi.md#updateAiDecompilationComment) | **PATCH** /v2/functions/{function_id}/ai-decompilation/comments/{comment_id} | Update a comment |
| [**upsertAiDecompilationOverrides**](FunctionsAiDecompilationApi.md#upsertAiDecompilationOverrides) | **PATCH** /v3/functions/{function_id}/ai-decompilation/overrides | Upsert variable/function name overrides |
| [**upsertAiDecompilationRating**](FunctionsAiDecompilationApi.md#upsertAiDecompilationRating) | **PATCH** /v2/functions/{function_id}/ai-decompilation/rating | Upsert rating for AI decompilation |
@@ -1418,6 +1419,76 @@ public class Example {
| **422** | Unprocessable Entity | - |
| **500** | Internal Server Error | - |
+
+# **streamAiDecompilation**
+> List<StreamAiDecompilation200ResponseInner> streamAiDecompilation(functionId)
+
+Stream live AI decompilation output (SSE)
+
+Opens a Server-Sent Events stream of incremental decompilation events for the given function. Each event has a `type` discriminator (also used as the SSE `event:` line) and a per-attempt monotonic `seq`. Terminal events: `decomp_finished` (success) or `decomp_failed` (all retries exhausted). `attempt_failed` is per-attempt and non-terminal — Temporal may retry the activity. Clients should treat `attempt` changes as a reset signal. `last_event_id` is not supported — clients fall back to polling the standard GET endpoint after the stream ends.
+
+### 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.FunctionsAiDecompilationApi;
+
+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");
+
+ FunctionsAiDecompilationApi apiInstance = new FunctionsAiDecompilationApi(defaultClient);
+ Long functionId = 56L; // Long | Function ID
+ try {
+ List result = apiInstance.streamAiDecompilation(functionId);
+ System.out.println(result);
+ } catch (ApiException e) {
+ System.err.println("Exception when calling FunctionsAiDecompilationApi#streamAiDecompilation");
+ System.err.println("Status code: " + e.getCode());
+ System.err.println("Reason: " + e.getResponseBody());
+ System.err.println("Response headers: " + e.getResponseHeaders());
+ e.printStackTrace();
+ }
+ }
+}
+```
+
+### Parameters
+
+| Name | Type | Description | Notes |
+|------------- | ------------- | ------------- | -------------|
+| **functionId** | **Long**| Function ID | |
+
+### Return type
+
+[**List<StreamAiDecompilation200ResponseInner>**](StreamAiDecompilation200ResponseInner.md)
+
+### Authorization
+
+[APIKey](../README.md#APIKey)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: text/event-stream, application/json
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+| **200** | OK | - |
+| **0** | Error | - |
+
# **updateAiDecompilationComment**
> BaseResponseCommentResponse updateAiDecompilationComment(commentId, functionId, commentUpdateRequest)
diff --git a/docs/ProseEvent.md b/docs/ProseEvent.md
new file mode 100644
index 00000000..ad385a40
--- /dev/null
+++ b/docs/ProseEvent.md
@@ -0,0 +1,16 @@
+
+
+# ProseEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**seq** | **Integer** | | |
+|**text** | **String** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/RenameAppliedEvent.md b/docs/RenameAppliedEvent.md
new file mode 100644
index 00000000..ff592b04
--- /dev/null
+++ b/docs/RenameAppliedEvent.md
@@ -0,0 +1,18 @@
+
+
+# RenameAppliedEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**addrHex** | **String** | | [optional] |
+|**attempt** | **Integer** | | |
+|**newName** | **String** | | |
+|**oldName** | **String** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/SourceDeltaEvent.md b/docs/SourceDeltaEvent.md
new file mode 100644
index 00000000..7ccd4953
--- /dev/null
+++ b/docs/SourceDeltaEvent.md
@@ -0,0 +1,16 @@
+
+
+# SourceDeltaEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**content** | **String** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/SourceResetEvent.md b/docs/SourceResetEvent.md
new file mode 100644
index 00000000..1a9dd518
--- /dev/null
+++ b/docs/SourceResetEvent.md
@@ -0,0 +1,15 @@
+
+
+# SourceResetEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/docs/StreamAiDecompilation200ResponseInner.md b/docs/StreamAiDecompilation200ResponseInner.md
new file mode 100644
index 00000000..0905c645
--- /dev/null
+++ b/docs/StreamAiDecompilation200ResponseInner.md
@@ -0,0 +1,25 @@
+
+
+# StreamAiDecompilation200ResponseInner
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**data** | **WarningEvent** | | |
+|**event** | [**EventEnum**](#EventEnum) | The event name. | |
+|**id** | **Integer** | The event ID. | [optional] |
+|**retry** | **Integer** | The retry time in milliseconds. | [optional] |
+
+
+
+## Enum: EventEnum
+
+| Name | Value |
+|---- | -----|
+| WARNING | "warning" |
+| UNKNOWN_DEFAULT_OPEN_API | "unknown_default_open_api" |
+
+
+
diff --git a/docs/WarningEvent.md b/docs/WarningEvent.md
new file mode 100644
index 00000000..1ea0128a
--- /dev/null
+++ b/docs/WarningEvent.md
@@ -0,0 +1,18 @@
+
+
+# WarningEvent
+
+
+## Properties
+
+| Name | Type | Description | Notes |
+|------------ | ------------- | ------------- | -------------|
+|**attempt** | **Integer** | | |
+|**identifiers** | **List<String>** | | [optional] |
+|**kind** | **String** | | |
+|**message** | **String** | | |
+|**seq** | **Integer** | | |
+|**type** | **String** | | |
+
+
+
diff --git a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java
index 152e36a7..ed1de762 100644
--- a/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java
+++ b/src/main/java/ai/reveng/api/FunctionsAiDecompilationApi.java
@@ -42,6 +42,7 @@
import ai.reveng.model.PatchCommentBody;
import ai.reveng.model.RegenerateOutputBody;
import ai.reveng.model.RegenerateTarget;
+import ai.reveng.model.StreamAiDecompilation200ResponseInner;
import ai.reveng.model.SummaryData;
import ai.reveng.model.TokenisedData;
import ai.reveng.model.UpsertAiDecomplationRatingRequest;
@@ -2872,6 +2873,138 @@ public okhttp3.Call regenerateAiDecompilationSummaryAsync(@javax.annotation.Nonn
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
+ /**
+ * Build call for streamAiDecompilation
+ * @param functionId Function ID (required)
+ * @param _callback Callback for upload/download progress
+ * @return Call to execute
+ * @throws ApiException If fail to serialize the request body object
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 0 | Error | - |
+
+ */
+ public okhttp3.Call streamAiDecompilationCall(@javax.annotation.Nonnull Long functionId, 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 = "/v3/functions/{function_id}/ai-decompilation/events"
+ .replace("{" + "function_id" + "}", localVarApiClient.escapeString(functionId.toString()));
+
+ List localVarQueryParams = new ArrayList();
+ List localVarCollectionQueryParams = new ArrayList();
+ Map localVarHeaderParams = new HashMap();
+ Map localVarCookieParams = new HashMap();
+ Map localVarFormParams = new HashMap();
+
+ final String[] localVarAccepts = {
+ "text/event-stream",
+ "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 streamAiDecompilationValidateBeforeCall(@javax.annotation.Nonnull Long functionId, final ApiCallback _callback) throws ApiException {
+ // verify the required parameter 'functionId' is set
+ if (functionId == null) {
+ throw new ApiException("Missing the required parameter 'functionId' when calling streamAiDecompilation(Async)");
+ }
+
+ return streamAiDecompilationCall(functionId, _callback);
+
+ }
+
+ /**
+ * Stream live AI decompilation output (SSE)
+ * Opens a Server-Sent Events stream of incremental decompilation events for the given function. Each event has a `type` discriminator (also used as the SSE `event:` line) and a per-attempt monotonic `seq`. Terminal events: `decomp_finished` (success) or `decomp_failed` (all retries exhausted). `attempt_failed` is per-attempt and non-terminal — Temporal may retry the activity. Clients should treat `attempt` changes as a reset signal. `last_event_id` is not supported — clients fall back to polling the standard GET endpoint after the stream ends.
+ * @param functionId Function ID (required)
+ * @return List<StreamAiDecompilation200ResponseInner>
+ * @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 | OK | - |
+ | 0 | Error | - |
+
+ */
+ public List streamAiDecompilation(@javax.annotation.Nonnull Long functionId) throws ApiException {
+ ApiResponse> localVarResp = streamAiDecompilationWithHttpInfo(functionId);
+ return localVarResp.getData();
+ }
+
+ /**
+ * Stream live AI decompilation output (SSE)
+ * Opens a Server-Sent Events stream of incremental decompilation events for the given function. Each event has a `type` discriminator (also used as the SSE `event:` line) and a per-attempt monotonic `seq`. Terminal events: `decomp_finished` (success) or `decomp_failed` (all retries exhausted). `attempt_failed` is per-attempt and non-terminal — Temporal may retry the activity. Clients should treat `attempt` changes as a reset signal. `last_event_id` is not supported — clients fall back to polling the standard GET endpoint after the stream ends.
+ * @param functionId Function ID (required)
+ * @return ApiResponse<List<StreamAiDecompilation200ResponseInner>>
+ * @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 | OK | - |
+ | 0 | Error | - |
+
+ */
+ public ApiResponse> streamAiDecompilationWithHttpInfo(@javax.annotation.Nonnull Long functionId) throws ApiException {
+ okhttp3.Call localVarCall = streamAiDecompilationValidateBeforeCall(functionId, null);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ return localVarApiClient.execute(localVarCall, localVarReturnType);
+ }
+
+ /**
+ * Stream live AI decompilation output (SSE) (asynchronously)
+ * Opens a Server-Sent Events stream of incremental decompilation events for the given function. Each event has a `type` discriminator (also used as the SSE `event:` line) and a per-attempt monotonic `seq`. Terminal events: `decomp_finished` (success) or `decomp_failed` (all retries exhausted). `attempt_failed` is per-attempt and non-terminal — Temporal may retry the activity. Clients should treat `attempt` changes as a reset signal. `last_event_id` is not supported — clients fall back to polling the standard GET endpoint after the stream ends.
+ * @param functionId Function ID (required)
+ * @param _callback The callback to be executed when the API call finishes
+ * @return The request call
+ * @throws ApiException If fail to process the API call, e.g. serializing the request body object
+ * @http.response.details
+
+ Response Details
+ | Status Code | Description | Response Headers |
+ | 200 | OK | - |
+ | 0 | Error | - |
+
+ */
+ public okhttp3.Call streamAiDecompilationAsync(@javax.annotation.Nonnull Long functionId, final ApiCallback> _callback) throws ApiException {
+
+ okhttp3.Call localVarCall = streamAiDecompilationValidateBeforeCall(functionId, _callback);
+ Type localVarReturnType = new TypeToken>(){}.getType();
+ localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
+ return localVarCall;
+ }
/**
* Build call for updateAiDecompilationComment
* @param commentId (required)
diff --git a/src/main/java/ai/reveng/invoker/JSON.java b/src/main/java/ai/reveng/invoker/JSON.java
index 55eabca1..559023db 100644
--- a/src/main/java/ai/reveng/invoker/JSON.java
+++ b/src/main/java/ai/reveng/invoker/JSON.java
@@ -129,6 +129,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2FunctionsTypesFunction.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AppApiRestV2InfoTypesCapability.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Argument.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AttemptFailedEvent.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AttemptStartedEvent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AutoRunAgents.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AutoUnstripRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.AutoUnstripResponse.CustomTypeAdapterFactory());
@@ -246,6 +248,9 @@ 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());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DecompilationData.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.DieMatch.CustomTypeAdapterFactory());
@@ -265,13 +270,22 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ErrorBody.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ErrorModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Event.CustomTypeAdapterFactory());
+ 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());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventRUNCANCELLED.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventRUNERROR.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventRUNFINISHED.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventRUNSTARTED.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventRenameApplied.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventSTEPFINISHED.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventSTEPSTARTED.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventSourceDelta.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventSourceReset.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventTEXTMESSAGECONTENT.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventTEXTMESSAGEEND.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventTEXTMESSAGESTART.CustomTypeAdapterFactory());
@@ -281,6 +295,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventTOOLCALLRESULT.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventTOOLCALLSTART.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventTOOLCONFIRMATIONREQUIRED.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.EventWarning.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExportModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExternalResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ExtractedURL.CustomTypeAdapterFactory());
@@ -365,6 +380,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProcessNode.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProcessTree.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProgressMessage.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ProseEvent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.PutAnalysisStringsRequest.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.QueuePositionResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.QueuedWorkflowTaskResponse.CustomTypeAdapterFactory());
@@ -373,6 +389,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RegenerateOutputBody.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RegistryOperation.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RelativeBinaryResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RenameAppliedEvent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RenameInputBody.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.RenameOutputBody.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.ReplacementValue.CustomTypeAdapterFactory());
@@ -394,6 +411,8 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SingleCodeSignatureModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SinglePDBEntryModel.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SingleSectionModel.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SourceDeltaEvent.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SourceResetEvent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SseEventContextCompactedData.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SseEventRunCancelledData.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.SseEventRunErrorData.CustomTypeAdapterFactory());
@@ -414,6 +433,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StartupInfo.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StatusOutput.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StatusResponse.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StreamAiDecompilation200ResponseInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StreamEvents200ResponseInner.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.StringFunctions.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Structure.CustomTypeAdapterFactory());
@@ -442,6 +462,7 @@ private static Class getClassByDiscriminator(Map classByDiscriminatorValue, Stri
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.UserActivityResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Vulnerabilities.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.Vulnerability.CustomTypeAdapterFactory());
+ gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.WarningEvent.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.WorkflowProgress.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.XrefFromResponse.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(new ai.reveng.model.XrefResponse.CustomTypeAdapterFactory());
diff --git a/src/main/java/ai/reveng/model/AttemptFailedEvent.java b/src/main/java/ai/reveng/model/AttemptFailedEvent.java
new file mode 100644
index 00000000..8d2e9712
--- /dev/null
+++ b/src/main/java/ai/reveng/model/AttemptFailedEvent.java
@@ -0,0 +1,375 @@
+/*
+ * 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;
+
+/**
+ * AttemptFailedEvent
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AttemptFailedEvent {
+ public static final String SERIALIZED_NAME_ATTEMPT = "attempt";
+ @SerializedName(SERIALIZED_NAME_ATTEMPT)
+ @javax.annotation.Nonnull
+ private Integer attempt;
+
+ public static final String SERIALIZED_NAME_ERROR = "error";
+ @SerializedName(SERIALIZED_NAME_ERROR)
+ @javax.annotation.Nonnull
+ private String error;
+
+ 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 AttemptFailedEvent() {
+ }
+
+ public AttemptFailedEvent 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 AttemptFailedEvent error(@javax.annotation.Nonnull String error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get error
+ * @return error
+ */
+ @javax.annotation.Nonnull
+ public String getError() {
+ return error;
+ }
+
+ public void setError(@javax.annotation.Nonnull String error) {
+ this.error = error;
+ }
+
+
+ public AttemptFailedEvent 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 AttemptFailedEvent 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;
+ }
+
+ /**
+ * 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 AttemptFailedEvent instance itself
+ */
+ public AttemptFailedEvent 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;
+ }
+ AttemptFailedEvent attemptFailedEvent = (AttemptFailedEvent) o;
+ return Objects.equals(this.attempt, attemptFailedEvent.attempt) &&
+ Objects.equals(this.error, attemptFailedEvent.error) &&
+ Objects.equals(this.seq, attemptFailedEvent.seq) &&
+ Objects.equals(this.type, attemptFailedEvent.type)&&
+ Objects.equals(this.additionalProperties, attemptFailedEvent.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attempt, error, seq, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttemptFailedEvent {\n");
+ sb.append(" attempt: ").append(toIndentedString(attempt)).append("\n");
+ sb.append(" error: ").append(toIndentedString(error)).append("\n");
+ sb.append(" seq: ").append(toIndentedString(seq)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).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("attempt", "error", "seq", "type"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("attempt", "error", "seq", "type"));
+ }
+
+ /**
+ * 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 AttemptFailedEvent
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AttemptFailedEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AttemptFailedEvent is not found in the empty JSON string", AttemptFailedEvent.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : AttemptFailedEvent.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("error").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString()));
+ }
+ 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()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AttemptFailedEvent.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AttemptFailedEvent' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(AttemptFailedEvent.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AttemptFailedEvent 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 AttemptFailedEvent read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ AttemptFailedEvent 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 AttemptFailedEvent given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AttemptFailedEvent
+ * @throws IOException if the JSON string is invalid with respect to AttemptFailedEvent
+ */
+ public static AttemptFailedEvent fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AttemptFailedEvent.class);
+ }
+
+ /**
+ * Convert an instance of AttemptFailedEvent to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/AttemptStartedEvent.java b/src/main/java/ai/reveng/model/AttemptStartedEvent.java
new file mode 100644
index 00000000..ef236a8b
--- /dev/null
+++ b/src/main/java/ai/reveng/model/AttemptStartedEvent.java
@@ -0,0 +1,346 @@
+/*
+ * 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;
+
+/**
+ * AttemptStartedEvent
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class AttemptStartedEvent {
+ 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 AttemptStartedEvent() {
+ }
+
+ public AttemptStartedEvent 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 AttemptStartedEvent 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 AttemptStartedEvent 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;
+ }
+
+ /**
+ * 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 AttemptStartedEvent instance itself
+ */
+ public AttemptStartedEvent 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;
+ }
+ AttemptStartedEvent attemptStartedEvent = (AttemptStartedEvent) o;
+ return Objects.equals(this.attempt, attemptStartedEvent.attempt) &&
+ Objects.equals(this.seq, attemptStartedEvent.seq) &&
+ Objects.equals(this.type, attemptStartedEvent.type)&&
+ Objects.equals(this.additionalProperties, attemptStartedEvent.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attempt, seq, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AttemptStartedEvent {\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(" 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("attempt", "seq", "type"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("attempt", "seq", "type"));
+ }
+
+ /**
+ * 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 AttemptStartedEvent
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!AttemptStartedEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in AttemptStartedEvent is not found in the empty JSON string", AttemptStartedEvent.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : AttemptStartedEvent.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("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()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!AttemptStartedEvent.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'AttemptStartedEvent' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(AttemptStartedEvent.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, AttemptStartedEvent 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 AttemptStartedEvent read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ AttemptStartedEvent 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 AttemptStartedEvent given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of AttemptStartedEvent
+ * @throws IOException if the JSON string is invalid with respect to AttemptStartedEvent
+ */
+ public static AttemptStartedEvent fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, AttemptStartedEvent.class);
+ }
+
+ /**
+ * Convert an instance of AttemptStartedEvent 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
new file mode 100644
index 00000000..70be76dc
--- /dev/null
+++ b/src/main/java/ai/reveng/model/DebugPromptEvent.java
@@ -0,0 +1,404 @@
+/*
+ * 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/DecompFailedEvent.java b/src/main/java/ai/reveng/model/DecompFailedEvent.java
new file mode 100644
index 00000000..4faf7d6c
--- /dev/null
+++ b/src/main/java/ai/reveng/model/DecompFailedEvent.java
@@ -0,0 +1,404 @@
+/*
+ * 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;
+
+/**
+ * DecompFailedEvent
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class DecompFailedEvent {
+ public static final String SERIALIZED_NAME_ATTEMPT = "attempt";
+ @SerializedName(SERIALIZED_NAME_ATTEMPT)
+ @javax.annotation.Nonnull
+ private Integer attempt;
+
+ public static final String SERIALIZED_NAME_ERROR = "error";
+ @SerializedName(SERIALIZED_NAME_ERROR)
+ @javax.annotation.Nonnull
+ private String error;
+
+ public static final String SERIALIZED_NAME_ERROR_CODE = "error_code";
+ @SerializedName(SERIALIZED_NAME_ERROR_CODE)
+ @javax.annotation.Nullable
+ private String errorCode;
+
+ 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 DecompFailedEvent() {
+ }
+
+ public DecompFailedEvent 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 DecompFailedEvent error(@javax.annotation.Nonnull String error) {
+ this.error = error;
+ return this;
+ }
+
+ /**
+ * Get error
+ * @return error
+ */
+ @javax.annotation.Nonnull
+ public String getError() {
+ return error;
+ }
+
+ public void setError(@javax.annotation.Nonnull String error) {
+ this.error = error;
+ }
+
+
+ public DecompFailedEvent errorCode(@javax.annotation.Nullable String errorCode) {
+ this.errorCode = errorCode;
+ return this;
+ }
+
+ /**
+ * Get errorCode
+ * @return errorCode
+ */
+ @javax.annotation.Nullable
+ public String getErrorCode() {
+ return errorCode;
+ }
+
+ public void setErrorCode(@javax.annotation.Nullable String errorCode) {
+ this.errorCode = errorCode;
+ }
+
+
+ public DecompFailedEvent 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 DecompFailedEvent 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;
+ }
+
+ /**
+ * 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 DecompFailedEvent instance itself
+ */
+ public DecompFailedEvent 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;
+ }
+ DecompFailedEvent decompFailedEvent = (DecompFailedEvent) o;
+ return Objects.equals(this.attempt, decompFailedEvent.attempt) &&
+ Objects.equals(this.error, decompFailedEvent.error) &&
+ Objects.equals(this.errorCode, decompFailedEvent.errorCode) &&
+ Objects.equals(this.seq, decompFailedEvent.seq) &&
+ Objects.equals(this.type, decompFailedEvent.type)&&
+ Objects.equals(this.additionalProperties, decompFailedEvent.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attempt, error, errorCode, seq, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DecompFailedEvent {\n");
+ sb.append(" attempt: ").append(toIndentedString(attempt)).append("\n");
+ sb.append(" error: ").append(toIndentedString(error)).append("\n");
+ sb.append(" errorCode: ").append(toIndentedString(errorCode)).append("\n");
+ sb.append(" seq: ").append(toIndentedString(seq)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).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("attempt", "error", "error_code", "seq", "type"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("attempt", "error", "seq", "type"));
+ }
+
+ /**
+ * 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 DecompFailedEvent
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!DecompFailedEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DecompFailedEvent is not found in the empty JSON string", DecompFailedEvent.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : DecompFailedEvent.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("error").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error").toString()));
+ }
+ if ((jsonObj.get("error_code") != null && !jsonObj.get("error_code").isJsonNull()) && !jsonObj.get("error_code").isJsonPrimitive()) {
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "Expected the field `error_code` to be a primitive type in the JSON string but got `%s`", jsonObj.get("error_code").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()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!DecompFailedEvent.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'DecompFailedEvent' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(DecompFailedEvent.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, DecompFailedEvent 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 DecompFailedEvent read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ DecompFailedEvent 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 DecompFailedEvent given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of DecompFailedEvent
+ * @throws IOException if the JSON string is invalid with respect to DecompFailedEvent
+ */
+ public static DecompFailedEvent fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, DecompFailedEvent.class);
+ }
+
+ /**
+ * Convert an instance of DecompFailedEvent to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/DecompFinishedEvent.java b/src/main/java/ai/reveng/model/DecompFinishedEvent.java
new file mode 100644
index 00000000..a9568cfb
--- /dev/null
+++ b/src/main/java/ai/reveng/model/DecompFinishedEvent.java
@@ -0,0 +1,346 @@
+/*
+ * 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;
+
+/**
+ * DecompFinishedEvent
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class DecompFinishedEvent {
+ 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 DecompFinishedEvent() {
+ }
+
+ public DecompFinishedEvent 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 DecompFinishedEvent 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 DecompFinishedEvent 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;
+ }
+
+ /**
+ * 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 DecompFinishedEvent instance itself
+ */
+ public DecompFinishedEvent 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;
+ }
+ DecompFinishedEvent decompFinishedEvent = (DecompFinishedEvent) o;
+ return Objects.equals(this.attempt, decompFinishedEvent.attempt) &&
+ Objects.equals(this.seq, decompFinishedEvent.seq) &&
+ Objects.equals(this.type, decompFinishedEvent.type)&&
+ Objects.equals(this.additionalProperties, decompFinishedEvent.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(attempt, seq, type, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class DecompFinishedEvent {\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(" 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("attempt", "seq", "type"));
+
+ // a set of required properties/fields (JSON key names)
+ openapiRequiredFields = new HashSet(Arrays.asList("attempt", "seq", "type"));
+ }
+
+ /**
+ * 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 DecompFinishedEvent
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!DecompFinishedEvent.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in DecompFinishedEvent is not found in the empty JSON string", DecompFinishedEvent.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : DecompFinishedEvent.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("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()));
+ }
+ }
+
+ public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
+ @SuppressWarnings("unchecked")
+ @Override
+ public TypeAdapter create(Gson gson, TypeToken type) {
+ if (!DecompFinishedEvent.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'DecompFinishedEvent' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(DecompFinishedEvent.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, DecompFinishedEvent 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 DecompFinishedEvent read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ DecompFinishedEvent 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 DecompFinishedEvent given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of DecompFinishedEvent
+ * @throws IOException if the JSON string is invalid with respect to DecompFinishedEvent
+ */
+ public static DecompFinishedEvent fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, DecompFinishedEvent.class);
+ }
+
+ /**
+ * Convert an instance of DecompFinishedEvent to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventAttemptFailed.java b/src/main/java/ai/reveng/model/EventAttemptFailed.java
new file mode 100644
index 00000000..fbdbb49f
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventAttemptFailed.java
@@ -0,0 +1,427 @@
+/*
+ * 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.AttemptFailedEvent;
+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;
+
+/**
+ * EventAttemptFailed
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventAttemptFailed {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private AttemptFailedEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ ATTEMPT_FAILED("attempt_failed"),
+
+ 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 EventAttemptFailed() {
+ }
+
+ public EventAttemptFailed data(@javax.annotation.Nonnull AttemptFailedEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public AttemptFailedEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull AttemptFailedEvent data) {
+ this.data = data;
+ }
+
+
+ public EventAttemptFailed 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 EventAttemptFailed 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 EventAttemptFailed 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 EventAttemptFailed instance itself
+ */
+ public EventAttemptFailed 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;
+ }
+ EventAttemptFailed eventAttemptFailed = (EventAttemptFailed) o;
+ return Objects.equals(this.data, eventAttemptFailed.data) &&
+ Objects.equals(this.event, eventAttemptFailed.event) &&
+ Objects.equals(this.id, eventAttemptFailed.id) &&
+ Objects.equals(this.retry, eventAttemptFailed.retry)&&
+ Objects.equals(this.additionalProperties, eventAttemptFailed.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventAttemptFailed {\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 EventAttemptFailed
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventAttemptFailed.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventAttemptFailed is not found in the empty JSON string", EventAttemptFailed.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventAttemptFailed.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 (!EventAttemptFailed.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventAttemptFailed' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventAttemptFailed.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventAttemptFailed 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 EventAttemptFailed read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventAttemptFailed 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 EventAttemptFailed given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventAttemptFailed
+ * @throws IOException if the JSON string is invalid with respect to EventAttemptFailed
+ */
+ public static EventAttemptFailed fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventAttemptFailed.class);
+ }
+
+ /**
+ * Convert an instance of EventAttemptFailed to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventAttemptStarted.java b/src/main/java/ai/reveng/model/EventAttemptStarted.java
new file mode 100644
index 00000000..afe141d1
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventAttemptStarted.java
@@ -0,0 +1,427 @@
+/*
+ * 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.AttemptStartedEvent;
+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;
+
+/**
+ * EventAttemptStarted
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventAttemptStarted {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private AttemptStartedEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ ATTEMPT_STARTED("attempt_started"),
+
+ 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 EventAttemptStarted() {
+ }
+
+ public EventAttemptStarted data(@javax.annotation.Nonnull AttemptStartedEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public AttemptStartedEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull AttemptStartedEvent data) {
+ this.data = data;
+ }
+
+
+ public EventAttemptStarted 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 EventAttemptStarted 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 EventAttemptStarted 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 EventAttemptStarted instance itself
+ */
+ public EventAttemptStarted 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;
+ }
+ EventAttemptStarted eventAttemptStarted = (EventAttemptStarted) o;
+ return Objects.equals(this.data, eventAttemptStarted.data) &&
+ Objects.equals(this.event, eventAttemptStarted.event) &&
+ Objects.equals(this.id, eventAttemptStarted.id) &&
+ Objects.equals(this.retry, eventAttemptStarted.retry)&&
+ Objects.equals(this.additionalProperties, eventAttemptStarted.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventAttemptStarted {\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 EventAttemptStarted
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventAttemptStarted.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventAttemptStarted is not found in the empty JSON string", EventAttemptStarted.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventAttemptStarted.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 (!EventAttemptStarted.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventAttemptStarted' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventAttemptStarted.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventAttemptStarted 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 EventAttemptStarted read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventAttemptStarted 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 EventAttemptStarted given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventAttemptStarted
+ * @throws IOException if the JSON string is invalid with respect to EventAttemptStarted
+ */
+ public static EventAttemptStarted fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventAttemptStarted.class);
+ }
+
+ /**
+ * Convert an instance of EventAttemptStarted to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventDebugPrompt.java b/src/main/java/ai/reveng/model/EventDebugPrompt.java
new file mode 100644
index 00000000..5ddca50a
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventDebugPrompt.java
@@ -0,0 +1,427 @@
+/*
+ * 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/EventDecompFailed.java b/src/main/java/ai/reveng/model/EventDecompFailed.java
new file mode 100644
index 00000000..34ad2085
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventDecompFailed.java
@@ -0,0 +1,427 @@
+/*
+ * 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.DecompFailedEvent;
+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;
+
+/**
+ * EventDecompFailed
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventDecompFailed {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private DecompFailedEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ DECOMP_FAILED("decomp_failed"),
+
+ 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 EventDecompFailed() {
+ }
+
+ public EventDecompFailed data(@javax.annotation.Nonnull DecompFailedEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public DecompFailedEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull DecompFailedEvent data) {
+ this.data = data;
+ }
+
+
+ public EventDecompFailed 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 EventDecompFailed 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 EventDecompFailed 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 EventDecompFailed instance itself
+ */
+ public EventDecompFailed 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;
+ }
+ EventDecompFailed eventDecompFailed = (EventDecompFailed) o;
+ return Objects.equals(this.data, eventDecompFailed.data) &&
+ Objects.equals(this.event, eventDecompFailed.event) &&
+ Objects.equals(this.id, eventDecompFailed.id) &&
+ Objects.equals(this.retry, eventDecompFailed.retry)&&
+ Objects.equals(this.additionalProperties, eventDecompFailed.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventDecompFailed {\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 EventDecompFailed
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventDecompFailed.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventDecompFailed is not found in the empty JSON string", EventDecompFailed.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventDecompFailed.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 (!EventDecompFailed.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventDecompFailed' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventDecompFailed.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventDecompFailed 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 EventDecompFailed read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventDecompFailed 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 EventDecompFailed given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventDecompFailed
+ * @throws IOException if the JSON string is invalid with respect to EventDecompFailed
+ */
+ public static EventDecompFailed fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventDecompFailed.class);
+ }
+
+ /**
+ * Convert an instance of EventDecompFailed to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventDecompFinished.java b/src/main/java/ai/reveng/model/EventDecompFinished.java
new file mode 100644
index 00000000..a77d7309
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventDecompFinished.java
@@ -0,0 +1,427 @@
+/*
+ * 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.DecompFinishedEvent;
+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;
+
+/**
+ * EventDecompFinished
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventDecompFinished {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private DecompFinishedEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ DECOMP_FINISHED("decomp_finished"),
+
+ 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 EventDecompFinished() {
+ }
+
+ public EventDecompFinished data(@javax.annotation.Nonnull DecompFinishedEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public DecompFinishedEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull DecompFinishedEvent data) {
+ this.data = data;
+ }
+
+
+ public EventDecompFinished 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 EventDecompFinished 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 EventDecompFinished 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 EventDecompFinished instance itself
+ */
+ public EventDecompFinished 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;
+ }
+ EventDecompFinished eventDecompFinished = (EventDecompFinished) o;
+ return Objects.equals(this.data, eventDecompFinished.data) &&
+ Objects.equals(this.event, eventDecompFinished.event) &&
+ Objects.equals(this.id, eventDecompFinished.id) &&
+ Objects.equals(this.retry, eventDecompFinished.retry)&&
+ Objects.equals(this.additionalProperties, eventDecompFinished.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventDecompFinished {\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 EventDecompFinished
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventDecompFinished.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventDecompFinished is not found in the empty JSON string", EventDecompFinished.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventDecompFinished.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 (!EventDecompFinished.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventDecompFinished' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventDecompFinished.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventDecompFinished 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 EventDecompFinished read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventDecompFinished 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 EventDecompFinished given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventDecompFinished
+ * @throws IOException if the JSON string is invalid with respect to EventDecompFinished
+ */
+ public static EventDecompFinished fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventDecompFinished.class);
+ }
+
+ /**
+ * Convert an instance of EventDecompFinished to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventProse.java b/src/main/java/ai/reveng/model/EventProse.java
new file mode 100644
index 00000000..96e5fe57
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventProse.java
@@ -0,0 +1,427 @@
+/*
+ * 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.ProseEvent;
+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;
+
+/**
+ * EventProse
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventProse {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private ProseEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ PROSE("prose"),
+
+ 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 EventProse() {
+ }
+
+ public EventProse data(@javax.annotation.Nonnull ProseEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public ProseEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull ProseEvent data) {
+ this.data = data;
+ }
+
+
+ public EventProse 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 EventProse 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 EventProse 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 EventProse instance itself
+ */
+ public EventProse 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;
+ }
+ EventProse eventProse = (EventProse) o;
+ return Objects.equals(this.data, eventProse.data) &&
+ Objects.equals(this.event, eventProse.event) &&
+ Objects.equals(this.id, eventProse.id) &&
+ Objects.equals(this.retry, eventProse.retry)&&
+ Objects.equals(this.additionalProperties, eventProse.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventProse {\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 EventProse
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventProse.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventProse is not found in the empty JSON string", EventProse.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventProse.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 (!EventProse.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventProse' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventProse.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventProse 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 EventProse read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventProse 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 EventProse given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventProse
+ * @throws IOException if the JSON string is invalid with respect to EventProse
+ */
+ public static EventProse fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventProse.class);
+ }
+
+ /**
+ * Convert an instance of EventProse to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventRenameApplied.java b/src/main/java/ai/reveng/model/EventRenameApplied.java
new file mode 100644
index 00000000..6f6280eb
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventRenameApplied.java
@@ -0,0 +1,427 @@
+/*
+ * 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.RenameAppliedEvent;
+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;
+
+/**
+ * EventRenameApplied
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventRenameApplied {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private RenameAppliedEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ RENAME_APPLIED("rename_applied"),
+
+ 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 EventRenameApplied() {
+ }
+
+ public EventRenameApplied data(@javax.annotation.Nonnull RenameAppliedEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public RenameAppliedEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull RenameAppliedEvent data) {
+ this.data = data;
+ }
+
+
+ public EventRenameApplied 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 EventRenameApplied 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 EventRenameApplied 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 EventRenameApplied instance itself
+ */
+ public EventRenameApplied 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;
+ }
+ EventRenameApplied eventRenameApplied = (EventRenameApplied) o;
+ return Objects.equals(this.data, eventRenameApplied.data) &&
+ Objects.equals(this.event, eventRenameApplied.event) &&
+ Objects.equals(this.id, eventRenameApplied.id) &&
+ Objects.equals(this.retry, eventRenameApplied.retry)&&
+ Objects.equals(this.additionalProperties, eventRenameApplied.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventRenameApplied {\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 EventRenameApplied
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventRenameApplied.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventRenameApplied is not found in the empty JSON string", EventRenameApplied.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventRenameApplied.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 (!EventRenameApplied.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventRenameApplied' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventRenameApplied.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventRenameApplied 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 EventRenameApplied read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventRenameApplied 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 EventRenameApplied given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventRenameApplied
+ * @throws IOException if the JSON string is invalid with respect to EventRenameApplied
+ */
+ public static EventRenameApplied fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventRenameApplied.class);
+ }
+
+ /**
+ * Convert an instance of EventRenameApplied to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventSourceDelta.java b/src/main/java/ai/reveng/model/EventSourceDelta.java
new file mode 100644
index 00000000..97233dcd
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventSourceDelta.java
@@ -0,0 +1,427 @@
+/*
+ * 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.SourceDeltaEvent;
+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;
+
+/**
+ * EventSourceDelta
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventSourceDelta {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private SourceDeltaEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ SOURCE_DELTA("source_delta"),
+
+ 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 EventSourceDelta() {
+ }
+
+ public EventSourceDelta data(@javax.annotation.Nonnull SourceDeltaEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public SourceDeltaEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull SourceDeltaEvent data) {
+ this.data = data;
+ }
+
+
+ public EventSourceDelta 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 EventSourceDelta 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 EventSourceDelta 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 EventSourceDelta instance itself
+ */
+ public EventSourceDelta 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;
+ }
+ EventSourceDelta eventSourceDelta = (EventSourceDelta) o;
+ return Objects.equals(this.data, eventSourceDelta.data) &&
+ Objects.equals(this.event, eventSourceDelta.event) &&
+ Objects.equals(this.id, eventSourceDelta.id) &&
+ Objects.equals(this.retry, eventSourceDelta.retry)&&
+ Objects.equals(this.additionalProperties, eventSourceDelta.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventSourceDelta {\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 EventSourceDelta
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventSourceDelta.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventSourceDelta is not found in the empty JSON string", EventSourceDelta.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventSourceDelta.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 (!EventSourceDelta.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventSourceDelta' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventSourceDelta.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventSourceDelta 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 EventSourceDelta read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventSourceDelta 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 EventSourceDelta given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventSourceDelta
+ * @throws IOException if the JSON string is invalid with respect to EventSourceDelta
+ */
+ public static EventSourceDelta fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventSourceDelta.class);
+ }
+
+ /**
+ * Convert an instance of EventSourceDelta to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventSourceReset.java b/src/main/java/ai/reveng/model/EventSourceReset.java
new file mode 100644
index 00000000..7747c238
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventSourceReset.java
@@ -0,0 +1,427 @@
+/*
+ * 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.SourceResetEvent;
+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;
+
+/**
+ * EventSourceReset
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventSourceReset {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private SourceResetEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ SOURCE_RESET("source_reset"),
+
+ 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 EventSourceReset() {
+ }
+
+ public EventSourceReset data(@javax.annotation.Nonnull SourceResetEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public SourceResetEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull SourceResetEvent data) {
+ this.data = data;
+ }
+
+
+ public EventSourceReset 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 EventSourceReset 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 EventSourceReset 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 EventSourceReset instance itself
+ */
+ public EventSourceReset 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;
+ }
+ EventSourceReset eventSourceReset = (EventSourceReset) o;
+ return Objects.equals(this.data, eventSourceReset.data) &&
+ Objects.equals(this.event, eventSourceReset.event) &&
+ Objects.equals(this.id, eventSourceReset.id) &&
+ Objects.equals(this.retry, eventSourceReset.retry)&&
+ Objects.equals(this.additionalProperties, eventSourceReset.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventSourceReset {\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 EventSourceReset
+ */
+ public static void validateJsonElement(JsonElement jsonElement) throws IOException {
+ if (jsonElement == null) {
+ if (!EventSourceReset.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
+ throw new IllegalArgumentException(String.format(Locale.ROOT, "The required field(s) %s in EventSourceReset is not found in the empty JSON string", EventSourceReset.openapiRequiredFields.toString()));
+ }
+ }
+
+ // check to make sure all required properties/fields are present in the JSON string
+ for (String requiredField : EventSourceReset.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 (!EventSourceReset.class.isAssignableFrom(type.getRawType())) {
+ return null; // this class only serializes 'EventSourceReset' and its subtypes
+ }
+ final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
+ final TypeAdapter thisAdapter
+ = gson.getDelegateAdapter(this, TypeToken.get(EventSourceReset.class));
+
+ return (TypeAdapter) new TypeAdapter() {
+ @Override
+ public void write(JsonWriter out, EventSourceReset 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 EventSourceReset read(JsonReader in) throws IOException {
+ JsonElement jsonElement = elementAdapter.read(in);
+ validateJsonElement(jsonElement);
+ JsonObject jsonObj = jsonElement.getAsJsonObject();
+ // store additional fields in the deserialized instance
+ EventSourceReset 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 EventSourceReset given an JSON string
+ *
+ * @param jsonString JSON string
+ * @return An instance of EventSourceReset
+ * @throws IOException if the JSON string is invalid with respect to EventSourceReset
+ */
+ public static EventSourceReset fromJson(String jsonString) throws IOException {
+ return JSON.getGson().fromJson(jsonString, EventSourceReset.class);
+ }
+
+ /**
+ * Convert an instance of EventSourceReset to an JSON string
+ *
+ * @return JSON string
+ */
+ public String toJson() {
+ return JSON.getGson().toJson(this);
+ }
+}
+
diff --git a/src/main/java/ai/reveng/model/EventWarning.java b/src/main/java/ai/reveng/model/EventWarning.java
new file mode 100644
index 00000000..d2f5a8e1
--- /dev/null
+++ b/src/main/java/ai/reveng/model/EventWarning.java
@@ -0,0 +1,427 @@
+/*
+ * 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.WarningEvent;
+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;
+
+/**
+ * EventWarning
+ */
+@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
+public class EventWarning {
+ public static final String SERIALIZED_NAME_DATA = "data";
+ @SerializedName(SERIALIZED_NAME_DATA)
+ @javax.annotation.Nonnull
+ private WarningEvent data;
+
+ /**
+ * The event name.
+ */
+ @JsonAdapter(EventEnum.Adapter.class)
+ public enum EventEnum {
+ WARNING("warning"),
+
+ 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 EventWarning() {
+ }
+
+ public EventWarning data(@javax.annotation.Nonnull WarningEvent data) {
+ this.data = data;
+ return this;
+ }
+
+ /**
+ * Get data
+ * @return data
+ */
+ @javax.annotation.Nonnull
+ public WarningEvent getData() {
+ return data;
+ }
+
+ public void setData(@javax.annotation.Nonnull WarningEvent data) {
+ this.data = data;
+ }
+
+
+ public EventWarning 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 EventWarning 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 EventWarning 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 EventWarning instance itself
+ */
+ public EventWarning 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;
+ }
+ EventWarning eventWarning = (EventWarning) o;
+ return Objects.equals(this.data, eventWarning.data) &&
+ Objects.equals(this.event, eventWarning.event) &&
+ Objects.equals(this.id, eventWarning.id) &&
+ Objects.equals(this.retry, eventWarning.retry)&&
+ Objects.equals(this.additionalProperties, eventWarning.additionalProperties);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(data, event, id, retry, additionalProperties);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EventWarning {\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