From 13535acacee9d2fe877c9b5be4c163b0ac870c4d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 25 Mar 2026 06:31:39 +0000 Subject: [PATCH] Update SDK to version v3.51.0 - Generated from OpenAPI spec version v3.51.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 11 + docs/AnalysisStage.md | 14 + docs/AnalysisStageStatus.md | 16 + docs/AnalysisStagesApi.md | 170 ++++++ docs/AnalysisStagesResponse.md | 29 + docs/BaseResponseAnalysisStagesResponse.md | 33 + docs/BaseResponsePipelineStatusResponse.md | 33 + docs/PipelineStageStatus.md | 18 + docs/PipelineStatusResponse.md | 29 + docs/StageEvent.md | 31 + docs/StageStatus.md | 31 + revengai/__init__.py | 22 +- revengai/api/__init__.py | 1 + revengai/api/analysis_stages_api.py | 565 ++++++++++++++++++ revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 9 + revengai/models/analysis_stage.py | 37 ++ revengai/models/analysis_stage_status.py | 38 ++ revengai/models/analysis_stages_response.py | 94 +++ .../base_response_analysis_stages_response.py | 125 ++++ .../base_response_pipeline_status_response.py | 125 ++++ revengai/models/pipeline_stage_status.py | 39 ++ revengai/models/pipeline_status_response.py | 94 +++ revengai/models/stage_event.py | 92 +++ revengai/models/stage_status.py | 92 +++ test/test_analysis_stage.py | 32 + test/test_analysis_stage_status.py | 32 + test/test_analysis_stages_api.py | 44 ++ test/test_analysis_stages_response.py | 61 ++ ..._base_response_analysis_stages_response.py | 68 +++ ..._base_response_pipeline_status_response.py | 68 +++ test/test_pipeline_stage_status.py | 32 + test/test_pipeline_status_response.py | 61 ++ test/test_stage_event.py | 55 ++ test/test_stage_status.py | 55 ++ 37 files changed, 2259 insertions(+), 5 deletions(-) create mode 100644 docs/AnalysisStage.md create mode 100644 docs/AnalysisStageStatus.md create mode 100644 docs/AnalysisStagesApi.md create mode 100644 docs/AnalysisStagesResponse.md create mode 100644 docs/BaseResponseAnalysisStagesResponse.md create mode 100644 docs/BaseResponsePipelineStatusResponse.md create mode 100644 docs/PipelineStageStatus.md create mode 100644 docs/PipelineStatusResponse.md create mode 100644 docs/StageEvent.md create mode 100644 docs/StageStatus.md create mode 100644 revengai/api/analysis_stages_api.py create mode 100644 revengai/models/analysis_stage.py create mode 100644 revengai/models/analysis_stage_status.py create mode 100644 revengai/models/analysis_stages_response.py create mode 100644 revengai/models/base_response_analysis_stages_response.py create mode 100644 revengai/models/base_response_pipeline_status_response.py create mode 100644 revengai/models/pipeline_stage_status.py create mode 100644 revengai/models/pipeline_status_response.py create mode 100644 revengai/models/stage_event.py create mode 100644 revengai/models/stage_status.py create mode 100644 test/test_analysis_stage.py create mode 100644 test/test_analysis_stage_status.py create mode 100644 test/test_analysis_stages_api.py create mode 100644 test/test_analysis_stages_response.py create mode 100644 test/test_base_response_analysis_stages_response.py create mode 100644 test/test_base_response_pipeline_status_response.py create mode 100644 test/test_pipeline_stage_status.py create mode 100644 test/test_pipeline_status_response.py create mode 100644 test/test_stage_event.py create mode 100644 test/test_stage_status.py diff --git a/.sdk-version b/.sdk-version index 89f17c0..100a28e 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.46.0 +v3.51.0 diff --git a/README.md b/README.md index 82eb918..95350b8 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,8 @@ Class | Method | HTTP request | Description *AnalysesSecurityChecksApi* | [**get_security_checks**](docs/AnalysesSecurityChecksApi.md#get_security_checks) | **GET** /v2/analyses/{analysis_id}/security-checks | Get Security Checks *AnalysesSecurityChecksApi* | [**get_security_checks_task_status**](docs/AnalysesSecurityChecksApi.md#get_security_checks_task_status) | **GET** /v2/analyses/{analysis_id}/security-checks/status | Check the status of a security check process *AnalysesXRefsApi* | [**get_xref_by_vaddr**](docs/AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address +*AnalysisStagesApi* | [**get_analysis_stages**](docs/AnalysisStagesApi.md#get_analysis_stages) | **GET** /v2/analysis-stages/{analysis_id} | Get Analysis Stages +*AnalysisStagesApi* | [**get_pipeline_status**](docs/AnalysisStagesApi.md#get_pipeline_status) | **GET** /v2/analysis-stages/{analysis_id}/pipeline-status | Get Pipeline Status *AuthenticationUsersApi* | [**get_requester_user_info**](docs/AuthenticationUsersApi.md#get_requester_user_info) | **GET** /v2/users/me | Get the requesters user information *AuthenticationUsersApi* | [**get_user**](docs/AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**get_user_activity**](docs/AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity @@ -173,6 +175,9 @@ Class | Method | HTTP request | Description - [AnalysisFunctionsList](docs/AnalysisFunctionsList.md) - [AnalysisRecord](docs/AnalysisRecord.md) - [AnalysisScope](docs/AnalysisScope.md) + - [AnalysisStage](docs/AnalysisStage.md) + - [AnalysisStageStatus](docs/AnalysisStageStatus.md) + - [AnalysisStagesResponse](docs/AnalysisStagesResponse.md) - [AnalysisStringsResponse](docs/AnalysisStringsResponse.md) - [AnalysisStringsStatusResponse](docs/AnalysisStringsStatusResponse.md) - [AnalysisTags](docs/AnalysisTags.md) @@ -197,6 +202,7 @@ Class | Method | HTTP request | Description - [BaseResponseAnalysisFunctionMapping](docs/BaseResponseAnalysisFunctionMapping.md) - [BaseResponseAnalysisFunctions](docs/BaseResponseAnalysisFunctions.md) - [BaseResponseAnalysisFunctionsList](docs/BaseResponseAnalysisFunctionsList.md) + - [BaseResponseAnalysisStagesResponse](docs/BaseResponseAnalysisStagesResponse.md) - [BaseResponseAnalysisStringsResponse](docs/BaseResponseAnalysisStringsResponse.md) - [BaseResponseAnalysisStringsStatusResponse](docs/BaseResponseAnalysisStringsStatusResponse.md) - [BaseResponseAnalysisTags](docs/BaseResponseAnalysisTags.md) @@ -251,6 +257,7 @@ Class | Method | HTTP request | Description - [BaseResponseModelsResponse](docs/BaseResponseModelsResponse.md) - [BaseResponseNetworkOverviewResponse](docs/BaseResponseNetworkOverviewResponse.md) - [BaseResponseParams](docs/BaseResponseParams.md) + - [BaseResponsePipelineStatusResponse](docs/BaseResponsePipelineStatusResponse.md) - [BaseResponseProcessDumps](docs/BaseResponseProcessDumps.md) - [BaseResponseProcessRegistry](docs/BaseResponseProcessRegistry.md) - [BaseResponseProcessTree](docs/BaseResponseProcessTree.md) @@ -400,6 +407,8 @@ Class | Method | HTTP request | Description - [PEModel](docs/PEModel.md) - [PaginationModel](docs/PaginationModel.md) - [Params](docs/Params.md) + - [PipelineStageStatus](docs/PipelineStageStatus.md) + - [PipelineStatusResponse](docs/PipelineStatusResponse.md) - [Platform](docs/Platform.md) - [Process](docs/Process.md) - [ProcessDump](docs/ProcessDump.md) @@ -428,6 +437,8 @@ Class | Method | HTTP request | Description - [SinglePDBEntryModel](docs/SinglePDBEntryModel.md) - [SingleSectionModel](docs/SingleSectionModel.md) - [StackVariable](docs/StackVariable.md) + - [StageEvent](docs/StageEvent.md) + - [StageStatus](docs/StageStatus.md) - [StatusInput](docs/StatusInput.md) - [StatusOutput](docs/StatusOutput.md) - [StringFunctions](docs/StringFunctions.md) diff --git a/docs/AnalysisStage.md b/docs/AnalysisStage.md new file mode 100644 index 0000000..782f86f --- /dev/null +++ b/docs/AnalysisStage.md @@ -0,0 +1,14 @@ +# AnalysisStage + + +## Enum + +* `ANALYSIS` (value: `'ANALYSIS'`) + +* `POST_PROCESSING` (value: `'POST_PROCESSING'`) + +* `INFERENCE` (value: `'INFERENCE'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalysisStageStatus.md b/docs/AnalysisStageStatus.md new file mode 100644 index 0000000..4e53bdf --- /dev/null +++ b/docs/AnalysisStageStatus.md @@ -0,0 +1,16 @@ +# AnalysisStageStatus + + +## Enum + +* `QUEUED` (value: `'QUEUED'`) + +* `STARTED` (value: `'STARTED'`) + +* `FINISHED` (value: `'FINISHED'`) + +* `ERROR` (value: `'ERROR'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/AnalysisStagesApi.md b/docs/AnalysisStagesApi.md new file mode 100644 index 0000000..82d123e --- /dev/null +++ b/docs/AnalysisStagesApi.md @@ -0,0 +1,170 @@ +# revengai.AnalysisStagesApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**get_analysis_stages**](AnalysisStagesApi.md#get_analysis_stages) | **GET** /v2/analysis-stages/{analysis_id} | Get Analysis Stages +[**get_pipeline_status**](AnalysisStagesApi.md#get_pipeline_status) | **GET** /v2/analysis-stages/{analysis_id}/pipeline-status | Get Pipeline Status + + +# **get_analysis_stages** +> BaseResponseAnalysisStagesResponse get_analysis_stages(analysis_id) + +Get Analysis Stages + +Returns all stage events for an analysis ordered by timestamp. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_analysis_stages_response import BaseResponseAnalysisStagesResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysisStagesApi(api_client) + analysis_id = 56 # int | + + try: + # Get Analysis Stages + api_response = api_instance.get_analysis_stages(analysis_id) + print("The response of AnalysisStagesApi->get_analysis_stages:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysisStagesApi->get_analysis_stages: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseAnalysisStagesResponse**](BaseResponseAnalysisStagesResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + +# **get_pipeline_status** +> BaseResponsePipelineStatusResponse get_pipeline_status(analysis_id) + +Get Pipeline Status + +Returns the latest status for each core pipeline stage with the number of analyses ahead in the queue. + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_pipeline_status_response import BaseResponsePipelineStatusResponse +from revengai.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://api.reveng.ai +# See configuration.py for a list of all supported configuration parameters. +configuration = revengai.Configuration( + host = "https://api.reveng.ai" +) + +# The client must configure the authentication and authorization parameters +# in accordance with the API server security policy. +# Examples for each auth method are provided below, use the example that +# satisfies your auth use case. + +# Configure API key authorization: APIKey +configuration.api_key['APIKey'] = os.environ["API_KEY"] + +# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed +# configuration.api_key_prefix['APIKey'] = 'Bearer' + +# Enter a context with an instance of the API client +with revengai.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = revengai.AnalysisStagesApi(api_client) + analysis_id = 56 # int | + + try: + # Get Pipeline Status + api_response = api_instance.get_pipeline_status(analysis_id) + print("The response of AnalysisStagesApi->get_pipeline_status:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AnalysisStagesApi->get_pipeline_status: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponsePipelineStatusResponse**](BaseResponsePipelineStatusResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successful Response | - | +**422** | Invalid request parameters | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/AnalysisStagesResponse.md b/docs/AnalysisStagesResponse.md new file mode 100644 index 0000000..7096afa --- /dev/null +++ b/docs/AnalysisStagesResponse.md @@ -0,0 +1,29 @@ +# AnalysisStagesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**events** | [**List[StageEvent]**](StageEvent.md) | | + +## Example + +```python +from revengai.models.analysis_stages_response import AnalysisStagesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of AnalysisStagesResponse from a JSON string +analysis_stages_response_instance = AnalysisStagesResponse.from_json(json) +# print the JSON string representation of the object +print(AnalysisStagesResponse.to_json()) + +# convert the object into a dict +analysis_stages_response_dict = analysis_stages_response_instance.to_dict() +# create an instance of AnalysisStagesResponse from a dict +analysis_stages_response_from_dict = AnalysisStagesResponse.from_dict(analysis_stages_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseResponseAnalysisStagesResponse.md b/docs/BaseResponseAnalysisStagesResponse.md new file mode 100644 index 0000000..7570c60 --- /dev/null +++ b/docs/BaseResponseAnalysisStagesResponse.md @@ -0,0 +1,33 @@ +# BaseResponseAnalysisStagesResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**AnalysisStagesResponse**](AnalysisStagesResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_analysis_stages_response import BaseResponseAnalysisStagesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseAnalysisStagesResponse from a JSON string +base_response_analysis_stages_response_instance = BaseResponseAnalysisStagesResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseAnalysisStagesResponse.to_json()) + +# convert the object into a dict +base_response_analysis_stages_response_dict = base_response_analysis_stages_response_instance.to_dict() +# create an instance of BaseResponseAnalysisStagesResponse from a dict +base_response_analysis_stages_response_from_dict = BaseResponseAnalysisStagesResponse.from_dict(base_response_analysis_stages_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/BaseResponsePipelineStatusResponse.md b/docs/BaseResponsePipelineStatusResponse.md new file mode 100644 index 0000000..a934895 --- /dev/null +++ b/docs/BaseResponsePipelineStatusResponse.md @@ -0,0 +1,33 @@ +# BaseResponsePipelineStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**PipelineStatusResponse**](PipelineStatusResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_pipeline_status_response import BaseResponsePipelineStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponsePipelineStatusResponse from a JSON string +base_response_pipeline_status_response_instance = BaseResponsePipelineStatusResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponsePipelineStatusResponse.to_json()) + +# convert the object into a dict +base_response_pipeline_status_response_dict = base_response_pipeline_status_response_instance.to_dict() +# create an instance of BaseResponsePipelineStatusResponse from a dict +base_response_pipeline_status_response_from_dict = BaseResponsePipelineStatusResponse.from_dict(base_response_pipeline_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PipelineStageStatus.md b/docs/PipelineStageStatus.md new file mode 100644 index 0000000..2580a39 --- /dev/null +++ b/docs/PipelineStageStatus.md @@ -0,0 +1,18 @@ +# PipelineStageStatus + + +## Enum + +* `PENDING` (value: `'PENDING'`) + +* `QUEUED` (value: `'QUEUED'`) + +* `STARTED` (value: `'STARTED'`) + +* `FINISHED` (value: `'FINISHED'`) + +* `ERROR` (value: `'ERROR'`) + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PipelineStatusResponse.md b/docs/PipelineStatusResponse.md new file mode 100644 index 0000000..8e6a56a --- /dev/null +++ b/docs/PipelineStatusResponse.md @@ -0,0 +1,29 @@ +# PipelineStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stages** | [**List[StageStatus]**](StageStatus.md) | | + +## Example + +```python +from revengai.models.pipeline_status_response import PipelineStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of PipelineStatusResponse from a JSON string +pipeline_status_response_instance = PipelineStatusResponse.from_json(json) +# print the JSON string representation of the object +print(PipelineStatusResponse.to_json()) + +# convert the object into a dict +pipeline_status_response_dict = pipeline_status_response_instance.to_dict() +# create an instance of PipelineStatusResponse from a dict +pipeline_status_response_from_dict = PipelineStatusResponse.from_dict(pipeline_status_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StageEvent.md b/docs/StageEvent.md new file mode 100644 index 0000000..b3caf78 --- /dev/null +++ b/docs/StageEvent.md @@ -0,0 +1,31 @@ +# StageEvent + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stage** | [**AnalysisStage**](AnalysisStage.md) | | +**status** | [**AnalysisStageStatus**](AnalysisStageStatus.md) | | +**timestamp** | **str** | | + +## Example + +```python +from revengai.models.stage_event import StageEvent + +# TODO update the JSON string below +json = "{}" +# create an instance of StageEvent from a JSON string +stage_event_instance = StageEvent.from_json(json) +# print the JSON string representation of the object +print(StageEvent.to_json()) + +# convert the object into a dict +stage_event_dict = stage_event_instance.to_dict() +# create an instance of StageEvent from a dict +stage_event_from_dict = StageEvent.from_dict(stage_event_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/StageStatus.md b/docs/StageStatus.md new file mode 100644 index 0000000..607d1b3 --- /dev/null +++ b/docs/StageStatus.md @@ -0,0 +1,31 @@ +# StageStatus + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**stage** | [**AnalysisStage**](AnalysisStage.md) | | +**status** | [**PipelineStageStatus**](PipelineStageStatus.md) | | +**num_ahead** | **int** | | + +## Example + +```python +from revengai.models.stage_status import StageStatus + +# TODO update the JSON string below +json = "{}" +# create an instance of StageStatus from a JSON string +stage_status_instance = StageStatus.from_json(json) +# print the JSON string representation of the object +print(StageStatus.to_json()) + +# convert the object into a dict +stage_status_dict = stage_status_instance.to_dict() +# create an instance of StageStatus from a dict +stage_status_from_dict = StageStatus.from_dict(stage_status_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/revengai/__init__.py b/revengai/__init__.py index 6739734..2e54b01 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.46.0" +__version__ = "v3.51.0" # Define package exports __all__ = [ @@ -23,6 +23,7 @@ "AnalysesResultsMetadataApi", "AnalysesSecurityChecksApi", "AnalysesXRefsApi", + "AnalysisStagesApi", "AuthenticationUsersApi", "BinariesApi", "CollectionsApi", @@ -65,6 +66,9 @@ "AnalysisFunctionsList", "AnalysisRecord", "AnalysisScope", + "AnalysisStage", + "AnalysisStageStatus", + "AnalysisStagesResponse", "AnalysisStringsResponse", "AnalysisStringsStatusResponse", "AnalysisTags", @@ -89,6 +93,7 @@ "BaseResponseAnalysisFunctionMapping", "BaseResponseAnalysisFunctions", "BaseResponseAnalysisFunctionsList", + "BaseResponseAnalysisStagesResponse", "BaseResponseAnalysisStringsResponse", "BaseResponseAnalysisStringsStatusResponse", "BaseResponseAnalysisTags", @@ -143,6 +148,7 @@ "BaseResponseModelsResponse", "BaseResponseNetworkOverviewResponse", "BaseResponseParams", + "BaseResponsePipelineStatusResponse", "BaseResponseProcessDumps", "BaseResponseProcessRegistry", "BaseResponseProcessTree", @@ -292,6 +298,8 @@ "PEModel", "PaginationModel", "Params", + "PipelineStageStatus", + "PipelineStatusResponse", "Platform", "Process", "ProcessDump", @@ -320,6 +328,8 @@ "SinglePDBEntryModel", "SingleSectionModel", "StackVariable", + "StageEvent", + "StageStatus", "StatusInput", "StatusOutput", "StringFunctions", @@ -361,6 +371,7 @@ from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi as AnalysesResultsMetadataApi from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi as AnalysesSecurityChecksApi from revengai.api.analyses_x_refs_api import AnalysesXRefsApi as AnalysesXRefsApi +from revengai.api.analysis_stages_api import AnalysisStagesApi as AnalysisStagesApi from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi from revengai.api.binaries_api import BinariesApi as BinariesApi from revengai.api.collections_api import CollectionsApi as CollectionsApi @@ -407,6 +418,9 @@ from revengai.models.analysis_functions_list import AnalysisFunctionsList as AnalysisFunctionsList from revengai.models.analysis_record import AnalysisRecord as AnalysisRecord from revengai.models.analysis_scope import AnalysisScope as AnalysisScope +from revengai.models.analysis_stage import AnalysisStage as AnalysisStage +from revengai.models.analysis_stage_status import AnalysisStageStatus as AnalysisStageStatus +from revengai.models.analysis_stages_response import AnalysisStagesResponse as AnalysisStagesResponse from revengai.models.analysis_strings_response import AnalysisStringsResponse as AnalysisStringsResponse from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse as AnalysisStringsStatusResponse from revengai.models.analysis_tags import AnalysisTags as AnalysisTags @@ -431,6 +445,7 @@ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping as BaseResponseAnalysisFunctionMapping from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions as BaseResponseAnalysisFunctions from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList as BaseResponseAnalysisFunctionsList +from revengai.models.base_response_analysis_stages_response import BaseResponseAnalysisStagesResponse as BaseResponseAnalysisStagesResponse from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse as BaseResponseAnalysisStringsResponse from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse as BaseResponseAnalysisStringsStatusResponse from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags as BaseResponseAnalysisTags @@ -485,6 +500,7 @@ from revengai.models.base_response_models_response import BaseResponseModelsResponse as BaseResponseModelsResponse from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse as BaseResponseNetworkOverviewResponse from revengai.models.base_response_params import BaseResponseParams as BaseResponseParams +from revengai.models.base_response_pipeline_status_response import BaseResponsePipelineStatusResponse as BaseResponsePipelineStatusResponse from revengai.models.base_response_process_dumps import BaseResponseProcessDumps as BaseResponseProcessDumps from revengai.models.base_response_process_registry import BaseResponseProcessRegistry as BaseResponseProcessRegistry from revengai.models.base_response_process_tree import BaseResponseProcessTree as BaseResponseProcessTree @@ -634,6 +650,8 @@ from revengai.models.pe_model import PEModel as PEModel from revengai.models.pagination_model import PaginationModel as PaginationModel from revengai.models.params import Params as Params +from revengai.models.pipeline_stage_status import PipelineStageStatus as PipelineStageStatus +from revengai.models.pipeline_status_response import PipelineStatusResponse as PipelineStatusResponse from revengai.models.platform import Platform as Platform from revengai.models.process import Process as Process from revengai.models.process_dump import ProcessDump as ProcessDump @@ -662,6 +680,8 @@ from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel from revengai.models.single_section_model import SingleSectionModel as SingleSectionModel from revengai.models.stack_variable import StackVariable as StackVariable +from revengai.models.stage_event import StageEvent as StageEvent +from revengai.models.stage_status import StageStatus as StageStatus from revengai.models.status_input import StatusInput as StatusInput from revengai.models.status_output import StatusOutput as StatusOutput from revengai.models.string_functions import StringFunctions as StringFunctions diff --git a/revengai/api/__init__.py b/revengai/api/__init__.py index 459bf9a..8a7b133 100644 --- a/revengai/api/__init__.py +++ b/revengai/api/__init__.py @@ -7,6 +7,7 @@ from revengai.api.analyses_results_metadata_api import AnalysesResultsMetadataApi from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi from revengai.api.analyses_x_refs_api import AnalysesXRefsApi +from revengai.api.analysis_stages_api import AnalysisStagesApi from revengai.api.authentication_users_api import AuthenticationUsersApi from revengai.api.binaries_api import BinariesApi from revengai.api.collections_api import CollectionsApi diff --git a/revengai/api/analysis_stages_api.py b/revengai/api/analysis_stages_api.py new file mode 100644 index 0000000..14a78f1 --- /dev/null +++ b/revengai/api/analysis_stages_api.py @@ -0,0 +1,565 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + +import warnings +from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt +from typing import Any, Dict, List, Optional, Tuple, Union +from typing_extensions import Annotated + +from pydantic import StrictInt +from revengai.models.base_response_analysis_stages_response import BaseResponseAnalysisStagesResponse +from revengai.models.base_response_pipeline_status_response import BaseResponsePipelineStatusResponse + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AnalysisStagesApi: + """NOTE: This class is auto generated by OpenAPI Generator + Ref: https://openapi-generator.tech + + Do not edit the class manually. + """ + + def __init__(self, api_client=None) -> None: + if api_client is None: + api_client = ApiClient.get_default() + self.api_client = api_client + + + @validate_call + def get_analysis_stages( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponseAnalysisStagesResponse: + """Get Analysis Stages + + Returns all stage events for an analysis ordered by timestamp. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_analysis_stages_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisStagesResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_analysis_stages_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponseAnalysisStagesResponse]: + """Get Analysis Stages + + Returns all stage events for an analysis ordered by timestamp. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_analysis_stages_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisStagesResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_analysis_stages_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Analysis Stages + + Returns all stage events for an analysis ordered by timestamp. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_analysis_stages_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponseAnalysisStagesResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_analysis_stages_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analysis-stages/{analysis_id}', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + + + + @validate_call + def get_pipeline_status( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> BaseResponsePipelineStatusResponse: + """Get Pipeline Status + + Returns the latest status for each core pipeline stage with the number of analyses ahead in the queue. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_pipeline_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponsePipelineStatusResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + + @validate_call + def get_pipeline_status_with_http_info( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> ApiResponse[BaseResponsePipelineStatusResponse]: + """Get Pipeline Status + + Returns the latest status for each core pipeline stage with the number of analyses ahead in the queue. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_pipeline_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponsePipelineStatusResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + + @validate_call + def get_pipeline_status_without_preload_content( + self, + analysis_id: StrictInt, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + _request_auth: Optional[Dict[StrictStr, Any]] = None, + _content_type: Optional[StrictStr] = None, + _headers: Optional[Dict[StrictStr, Any]] = None, + _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, + ) -> RESTResponseType: + """Get Pipeline Status + + Returns the latest status for each core pipeline stage with the number of analyses ahead in the queue. + + :param analysis_id: (required) + :type analysis_id: int + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :param _request_auth: set to override the auth_settings for an a single + request; this effectively ignores the + authentication in the spec for a single request. + :type _request_auth: dict, optional + :param _content_type: force content-type for the request. + :type _content_type: str, Optional + :param _headers: set to override the headers for a single + request; this effectively ignores the headers + in the spec for a single request. + :type _headers: dict, optional + :param _host_index: set to override the host_index for a single + request; this effectively ignores the host_index + in the spec for a single request. + :type _host_index: int, optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._get_pipeline_status_serialize( + analysis_id=analysis_id, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "BaseResponsePipelineStatusResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_pipeline_status_serialize( + self, + analysis_id, + _request_auth, + _content_type, + _headers, + _host_index, + ) -> RequestSerialized: + + _host = None + + _collection_formats: Dict[str, str] = { + } + + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _header_params: Dict[str, Optional[str]] = _headers or {} + _form_params: List[Tuple[str, str]] = [] + _files: Dict[ + str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] + ] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if analysis_id is not None: + _path_params['analysis_id'] = analysis_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + + # authentication setting + _auth_settings: List[str] = [ + 'APIKey' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v2/analysis-stages/{analysis_id}/pipeline-status', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + auth_settings=_auth_settings, + collection_formats=_collection_formats, + _host=_host, + _request_auth=_request_auth + ) + + diff --git a/revengai/api_client.py b/revengai/api_client.py index a2218cd..1b03b6f 100644 --- a/revengai/api_client.py +++ b/revengai/api_client.py @@ -90,7 +90,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/v3.46.0/python' + self.user_agent = 'OpenAPI-Generator/v3.51.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 765e0cc..4ccfb14 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -533,8 +533,8 @@ def to_debug_report(self) -> str: return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v3.46.0\n"\ - "SDK Package Version: v3.46.0".\ + "Version of the API: v3.51.0\n"\ + "SDK Package Version: v3.51.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/__init__.py b/revengai/models/__init__.py index 1e24ba8..9685658 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -31,6 +31,9 @@ from revengai.models.analysis_functions_list import AnalysisFunctionsList from revengai.models.analysis_record import AnalysisRecord from revengai.models.analysis_scope import AnalysisScope +from revengai.models.analysis_stage import AnalysisStage +from revengai.models.analysis_stage_status import AnalysisStageStatus +from revengai.models.analysis_stages_response import AnalysisStagesResponse from revengai.models.analysis_strings_response import AnalysisStringsResponse from revengai.models.analysis_strings_status_response import AnalysisStringsStatusResponse from revengai.models.analysis_tags import AnalysisTags @@ -55,6 +58,7 @@ from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList +from revengai.models.base_response_analysis_stages_response import BaseResponseAnalysisStagesResponse from revengai.models.base_response_analysis_strings_response import BaseResponseAnalysisStringsResponse from revengai.models.base_response_analysis_strings_status_response import BaseResponseAnalysisStringsStatusResponse from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags @@ -109,6 +113,7 @@ from revengai.models.base_response_models_response import BaseResponseModelsResponse from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse from revengai.models.base_response_params import BaseResponseParams +from revengai.models.base_response_pipeline_status_response import BaseResponsePipelineStatusResponse from revengai.models.base_response_process_dumps import BaseResponseProcessDumps from revengai.models.base_response_process_registry import BaseResponseProcessRegistry from revengai.models.base_response_process_tree import BaseResponseProcessTree @@ -258,6 +263,8 @@ from revengai.models.pe_model import PEModel from revengai.models.pagination_model import PaginationModel from revengai.models.params import Params +from revengai.models.pipeline_stage_status import PipelineStageStatus +from revengai.models.pipeline_status_response import PipelineStatusResponse from revengai.models.platform import Platform from revengai.models.process import Process from revengai.models.process_dump import ProcessDump @@ -286,6 +293,8 @@ from revengai.models.single_pdb_entry_model import SinglePDBEntryModel from revengai.models.single_section_model import SingleSectionModel from revengai.models.stack_variable import StackVariable +from revengai.models.stage_event import StageEvent +from revengai.models.stage_status import StageStatus from revengai.models.status_input import StatusInput from revengai.models.status_output import StatusOutput from revengai.models.string_functions import StringFunctions diff --git a/revengai/models/analysis_stage.py b/revengai/models/analysis_stage.py new file mode 100644 index 0000000..2e3bbe8 --- /dev/null +++ b/revengai/models/analysis_stage.py @@ -0,0 +1,37 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AnalysisStage(str, Enum): + """ + AnalysisStage + """ + + """ + allowed enum values + """ + ANALYSIS = 'ANALYSIS' + POST_PROCESSING = 'POST_PROCESSING' + INFERENCE = 'INFERENCE' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AnalysisStage from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/models/analysis_stage_status.py b/revengai/models/analysis_stage_status.py new file mode 100644 index 0000000..ad119ce --- /dev/null +++ b/revengai/models/analysis_stage_status.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class AnalysisStageStatus(str, Enum): + """ + AnalysisStageStatus + """ + + """ + allowed enum values + """ + QUEUED = 'QUEUED' + STARTED = 'STARTED' + FINISHED = 'FINISHED' + ERROR = 'ERROR' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of AnalysisStageStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/models/analysis_stages_response.py b/revengai/models/analysis_stages_response.py new file mode 100644 index 0000000..0f0b000 --- /dev/null +++ b/revengai/models/analysis_stages_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from revengai.models.stage_event import StageEvent +from typing import Optional, Set +from typing_extensions import Self + +class AnalysisStagesResponse(BaseModel): + """ + AnalysisStagesResponse + """ # noqa: E501 + events: List[StageEvent] + __properties: ClassVar[List[str]] = ["events"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AnalysisStagesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in events (list) + _items = [] + if self.events: + for _item_events in self.events: + if _item_events: + _items.append(_item_events.to_dict()) + _dict['events'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AnalysisStagesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "events": [StageEvent.from_dict(_item) for _item in obj["events"]] if obj.get("events") is not None else None + }) + return _obj + + diff --git a/revengai/models/base_response_analysis_stages_response.py b/revengai/models/base_response_analysis_stages_response.py new file mode 100644 index 0000000..ac9b835 --- /dev/null +++ b/revengai/models/base_response_analysis_stages_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.analysis_stages_response import AnalysisStagesResponse +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseAnalysisStagesResponse(BaseModel): + """ + BaseResponseAnalysisStagesResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[AnalysisStagesResponse] = None + message: Optional[StrictStr] = None + errors: Optional[List[ErrorModel]] = None + meta: Optional[MetaModel] = Field(default=None, description="Metadata") + __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseResponseAnalysisStagesResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseResponseAnalysisStagesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") if obj.get("status") is not None else True, + "data": AnalysisStagesResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, + "message": obj.get("message"), + "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, + "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/revengai/models/base_response_pipeline_status_response.py b/revengai/models/base_response_pipeline_status_response.py new file mode 100644 index 0000000..f271af6 --- /dev/null +++ b/revengai/models/base_response_pipeline_status_response.py @@ -0,0 +1,125 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.error_model import ErrorModel +from revengai.models.meta_model import MetaModel +from revengai.models.pipeline_status_response import PipelineStatusResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponsePipelineStatusResponse(BaseModel): + """ + BaseResponsePipelineStatusResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[PipelineStatusResponse] = None + message: Optional[StrictStr] = None + errors: Optional[List[ErrorModel]] = None + meta: Optional[MetaModel] = Field(default=None, description="Metadata") + __properties: ClassVar[List[str]] = ["status", "data", "message", "errors", "meta"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of BaseResponsePipelineStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of data + if self.data: + _dict['data'] = self.data.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in errors (list) + _items = [] + if self.errors: + for _item_errors in self.errors: + if _item_errors: + _items.append(_item_errors.to_dict()) + _dict['errors'] = _items + # override the default output from pydantic by calling `to_dict()` of meta + if self.meta: + _dict['meta'] = self.meta.to_dict() + # set to None if data (nullable) is None + # and model_fields_set contains the field + if self.data is None and "data" in self.model_fields_set: + _dict['data'] = None + + # set to None if message (nullable) is None + # and model_fields_set contains the field + if self.message is None and "message" in self.model_fields_set: + _dict['message'] = None + + # set to None if errors (nullable) is None + # and model_fields_set contains the field + if self.errors is None and "errors" in self.model_fields_set: + _dict['errors'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of BaseResponsePipelineStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "status": obj.get("status") if obj.get("status") is not None else True, + "data": PipelineStatusResponse.from_dict(obj["data"]) if obj.get("data") is not None else None, + "message": obj.get("message"), + "errors": [ErrorModel.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, + "meta": MetaModel.from_dict(obj["meta"]) if obj.get("meta") is not None else None + }) + return _obj + + diff --git a/revengai/models/pipeline_stage_status.py b/revengai/models/pipeline_stage_status.py new file mode 100644 index 0000000..e4f7cbc --- /dev/null +++ b/revengai/models/pipeline_stage_status.py @@ -0,0 +1,39 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class PipelineStageStatus(str, Enum): + """ + PipelineStageStatus + """ + + """ + allowed enum values + """ + PENDING = 'PENDING' + QUEUED = 'QUEUED' + STARTED = 'STARTED' + FINISHED = 'FINISHED' + ERROR = 'ERROR' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of PipelineStageStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/models/pipeline_status_response.py b/revengai/models/pipeline_status_response.py new file mode 100644 index 0000000..52b9090 --- /dev/null +++ b/revengai/models/pipeline_status_response.py @@ -0,0 +1,94 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from revengai.models.stage_status import StageStatus +from typing import Optional, Set +from typing_extensions import Self + +class PipelineStatusResponse(BaseModel): + """ + PipelineStatusResponse + """ # noqa: E501 + stages: List[StageStatus] + __properties: ClassVar[List[str]] = ["stages"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PipelineStatusResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of each item in stages (list) + _items = [] + if self.stages: + for _item_stages in self.stages: + if _item_stages: + _items.append(_item_stages.to_dict()) + _dict['stages'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PipelineStatusResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stages": [StageStatus.from_dict(_item) for _item in obj["stages"]] if obj.get("stages") is not None else None + }) + return _obj + + diff --git a/revengai/models/stage_event.py b/revengai/models/stage_event.py new file mode 100644 index 0000000..8308451 --- /dev/null +++ b/revengai/models/stage_event.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List +from revengai.models.analysis_stage import AnalysisStage +from revengai.models.analysis_stage_status import AnalysisStageStatus +from typing import Optional, Set +from typing_extensions import Self + +class StageEvent(BaseModel): + """ + StageEvent + """ # noqa: E501 + stage: AnalysisStage + status: AnalysisStageStatus + timestamp: StrictStr + __properties: ClassVar[List[str]] = ["stage", "status", "timestamp"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StageEvent from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StageEvent from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stage": obj.get("stage"), + "status": obj.get("status"), + "timestamp": obj.get("timestamp") + }) + return _obj + + diff --git a/revengai/models/stage_status.py b/revengai/models/stage_status.py new file mode 100644 index 0000000..1daeef0 --- /dev/null +++ b/revengai/models/stage_status.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictInt +from typing import Any, ClassVar, Dict, List +from revengai.models.analysis_stage import AnalysisStage +from revengai.models.pipeline_stage_status import PipelineStageStatus +from typing import Optional, Set +from typing_extensions import Self + +class StageStatus(BaseModel): + """ + StageStatus + """ # noqa: E501 + stage: AnalysisStage + status: PipelineStageStatus + num_ahead: StrictInt + __properties: ClassVar[List[str]] = ["stage", "status", "num_ahead"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of StageStatus from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of StageStatus from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "stage": obj.get("stage"), + "status": obj.get("status"), + "num_ahead": obj.get("num_ahead") + }) + return _obj + + diff --git a/test/test_analysis_stage.py b/test/test_analysis_stage.py new file mode 100644 index 0000000..32dc722 --- /dev/null +++ b/test/test_analysis_stage.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_stage import AnalysisStage + +class TestAnalysisStage(unittest.TestCase): + """AnalysisStage unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnalysisStage(self): + """Test AnalysisStage""" + # inst = AnalysisStage() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_analysis_stage_status.py b/test/test_analysis_stage_status.py new file mode 100644 index 0000000..76f36e2 --- /dev/null +++ b/test/test_analysis_stage_status.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_stage_status import AnalysisStageStatus + +class TestAnalysisStageStatus(unittest.TestCase): + """AnalysisStageStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testAnalysisStageStatus(self): + """Test AnalysisStageStatus""" + # inst = AnalysisStageStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_analysis_stages_api.py b/test/test_analysis_stages_api.py new file mode 100644 index 0000000..28f1516 --- /dev/null +++ b/test/test_analysis_stages_api.py @@ -0,0 +1,44 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.api.analysis_stages_api import AnalysisStagesApi + + +class TestAnalysisStagesApi(unittest.TestCase): + """AnalysisStagesApi unit test stubs""" + + def setUp(self) -> None: + self.api = AnalysisStagesApi() + + def tearDown(self) -> None: + pass + + def test_get_analysis_stages(self) -> None: + """Test case for get_analysis_stages + + Get Analysis Stages + """ + pass + + def test_get_pipeline_status(self) -> None: + """Test case for get_pipeline_status + + Get Pipeline Status + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_analysis_stages_response.py b/test/test_analysis_stages_response.py new file mode 100644 index 0000000..d182b93 --- /dev/null +++ b/test/test_analysis_stages_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.analysis_stages_response import AnalysisStagesResponse + +class TestAnalysisStagesResponse(unittest.TestCase): + """AnalysisStagesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AnalysisStagesResponse: + """Test AnalysisStagesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AnalysisStagesResponse` + """ + model = AnalysisStagesResponse() + if include_optional: + return AnalysisStagesResponse( + events = [ + revengai.models.stage_event.StageEvent( + stage = 'ANALYSIS', + status = 'QUEUED', + timestamp = '', ) + ] + ) + else: + return AnalysisStagesResponse( + events = [ + revengai.models.stage_event.StageEvent( + stage = 'ANALYSIS', + status = 'QUEUED', + timestamp = '', ) + ], + ) + """ + + def testAnalysisStagesResponse(self): + """Test AnalysisStagesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_response_analysis_stages_response.py b/test/test_base_response_analysis_stages_response.py new file mode 100644 index 0000000..fcc9b33 --- /dev/null +++ b/test/test_base_response_analysis_stages_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_analysis_stages_response import BaseResponseAnalysisStagesResponse + +class TestBaseResponseAnalysisStagesResponse(unittest.TestCase): + """BaseResponseAnalysisStagesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseAnalysisStagesResponse: + """Test BaseResponseAnalysisStagesResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponseAnalysisStagesResponse` + """ + model = BaseResponseAnalysisStagesResponse() + if include_optional: + return BaseResponseAnalysisStagesResponse( + status = True, + data = revengai.models.analysis_stages_response.AnalysisStagesResponse( + events = [ + revengai.models.stage_event.StageEvent( + stage = 'ANALYSIS', + status = 'QUEUED', + timestamp = '', ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponseAnalysisStagesResponse( + ) + """ + + def testBaseResponseAnalysisStagesResponse(self): + """Test BaseResponseAnalysisStagesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_base_response_pipeline_status_response.py b/test/test_base_response_pipeline_status_response.py new file mode 100644 index 0000000..bacc197 --- /dev/null +++ b/test/test_base_response_pipeline_status_response.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_pipeline_status_response import BaseResponsePipelineStatusResponse + +class TestBaseResponsePipelineStatusResponse(unittest.TestCase): + """BaseResponsePipelineStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponsePipelineStatusResponse: + """Test BaseResponsePipelineStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `BaseResponsePipelineStatusResponse` + """ + model = BaseResponsePipelineStatusResponse() + if include_optional: + return BaseResponsePipelineStatusResponse( + status = True, + data = revengai.models.pipeline_status_response.PipelineStatusResponse( + stages = [ + revengai.models.stage_status.StageStatus( + stage = 'ANALYSIS', + status = 'PENDING', + num_ahead = 56, ) + ], ), + message = '', + errors = [ + revengai.models.error_model.ErrorModel( + code = '', + message = '', ) + ], + meta = revengai.models.meta_model.MetaModel( + pagination = revengai.models.pagination_model.PaginationModel( + page_size = 56, + page_number = 56, + has_next_page = True, ), ) + ) + else: + return BaseResponsePipelineStatusResponse( + ) + """ + + def testBaseResponsePipelineStatusResponse(self): + """Test BaseResponsePipelineStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pipeline_stage_status.py b/test/test_pipeline_stage_status.py new file mode 100644 index 0000000..1b7e010 --- /dev/null +++ b/test/test_pipeline_stage_status.py @@ -0,0 +1,32 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.pipeline_stage_status import PipelineStageStatus + +class TestPipelineStageStatus(unittest.TestCase): + """PipelineStageStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testPipelineStageStatus(self): + """Test PipelineStageStatus""" + # inst = PipelineStageStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_pipeline_status_response.py b/test/test_pipeline_status_response.py new file mode 100644 index 0000000..5e651cf --- /dev/null +++ b/test/test_pipeline_status_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.pipeline_status_response import PipelineStatusResponse + +class TestPipelineStatusResponse(unittest.TestCase): + """PipelineStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PipelineStatusResponse: + """Test PipelineStatusResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PipelineStatusResponse` + """ + model = PipelineStatusResponse() + if include_optional: + return PipelineStatusResponse( + stages = [ + revengai.models.stage_status.StageStatus( + stage = 'ANALYSIS', + status = 'PENDING', + num_ahead = 56, ) + ] + ) + else: + return PipelineStatusResponse( + stages = [ + revengai.models.stage_status.StageStatus( + stage = 'ANALYSIS', + status = 'PENDING', + num_ahead = 56, ) + ], + ) + """ + + def testPipelineStatusResponse(self): + """Test PipelineStatusResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stage_event.py b/test/test_stage_event.py new file mode 100644 index 0000000..98995a2 --- /dev/null +++ b/test/test_stage_event.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.stage_event import StageEvent + +class TestStageEvent(unittest.TestCase): + """StageEvent unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StageEvent: + """Test StageEvent + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StageEvent` + """ + model = StageEvent() + if include_optional: + return StageEvent( + stage = 'ANALYSIS', + status = 'QUEUED', + timestamp = '' + ) + else: + return StageEvent( + stage = 'ANALYSIS', + status = 'QUEUED', + timestamp = '', + ) + """ + + def testStageEvent(self): + """Test StageEvent""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_stage_status.py b/test/test_stage_status.py new file mode 100644 index 0000000..04e0fb0 --- /dev/null +++ b/test/test_stage_status.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + 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. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.stage_status import StageStatus + +class TestStageStatus(unittest.TestCase): + """StageStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> StageStatus: + """Test StageStatus + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `StageStatus` + """ + model = StageStatus() + if include_optional: + return StageStatus( + stage = 'ANALYSIS', + status = 'PENDING', + num_ahead = 56 + ) + else: + return StageStatus( + stage = 'ANALYSIS', + status = 'PENDING', + num_ahead = 56, + ) + """ + + def testStageStatus(self): + """Test StageStatus""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()