diff --git a/.sdk-version b/.sdk-version index 0217dae..75a91e0 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.67.0 +v3.70.0 diff --git a/README.md b/README.md index b87006b..d160758 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,15 @@ All URIs are relative to *https://api.reveng.ai* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- +*AgentApi* | [**check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get**](docs/AgentApi.md#check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities/status | Check the status of a capabilities analysis workflow +*AgentApi* | [**check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get**](docs/AgentApi.md#check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis/status | Check the status of a report analysis workflow +*AgentApi* | [**check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get**](docs/AgentApi.md#check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get) | **GET** /v2/analyses/{analysis_id}/agent/triage/status | Check the status of a triage analysis workflow +*AgentApi* | [**create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post**](docs/AgentApi.md#create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post) | **POST** /v2/analyses/{analysis_id}/agent/capabilities | Queues a capabilities analysis workflow process +*AgentApi* | [**create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post**](docs/AgentApi.md#create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post) | **POST** /v2/analyses/{analysis_id}/agent/report-analysis | Queues a combined report analysis workflow process +*AgentApi* | [**create_triage_task_v2_analyses_analysis_id_agent_triage_post**](docs/AgentApi.md#create_triage_task_v2_analyses_analysis_id_agent_triage_post) | **POST** /v2/analyses/{analysis_id}/agent/triage | Queues a triage analysis workflow process +*AgentApi* | [**get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get**](docs/AgentApi.md#get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities | Get Capabilities Result +*AgentApi* | [**get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get**](docs/AgentApi.md#get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis | Get Report Analysis Result +*AgentApi* | [**get_triage_result_v2_analyses_analysis_id_agent_triage_get**](docs/AgentApi.md#get_triage_result_v2_analyses_analysis_id_agent_triage_get) | **GET** /v2/analyses/{analysis_id}/agent/triage | Get Triage Result *AnalysesCommentsApi* | [**create_analysis_comment**](docs/AnalysesCommentsApi.md#create_analysis_comment) | **POST** /v2/analyses/{analysis_id}/comments | Create a comment for this analysis *AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment *AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis @@ -177,11 +186,13 @@ Class | Method | HTTP request | Description - [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md) - [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md) - [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md) + - [AppApiRestV2AgentSchemaCapability](docs/AppApiRestV2AgentSchemaCapability.md) - [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md) - [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md) - [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md) - [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md) - [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md) + - [AppApiRestV2InfoTypesCapability](docs/AppApiRestV2InfoTypesCapability.md) - [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md) - [Argument](docs/Argument.md) - [AutoRunAgents](docs/AutoRunAgents.md) @@ -209,6 +220,7 @@ Class | Method | HTTP request | Description - [BaseResponseBool](docs/BaseResponseBool.md) - [BaseResponseCalleesCallerFunctionsResponse](docs/BaseResponseCalleesCallerFunctionsResponse.md) - [BaseResponseCapabilities](docs/BaseResponseCapabilities.md) + - [BaseResponseCapabilitiesAgentResponse](docs/BaseResponseCapabilitiesAgentResponse.md) - [BaseResponseChildBinariesResponse](docs/BaseResponseChildBinariesResponse.md) - [BaseResponseCollectionBinariesUpdateResponse](docs/BaseResponseCollectionBinariesUpdateResponse.md) - [BaseResponseCollectionResponse](docs/BaseResponseCollectionResponse.md) @@ -249,12 +261,16 @@ Class | Method | HTTP request | Description - [BaseResponseProcessDumps](docs/BaseResponseProcessDumps.md) - [BaseResponseProcessRegistry](docs/BaseResponseProcessRegistry.md) - [BaseResponseProcessTree](docs/BaseResponseProcessTree.md) + - [BaseResponseQueuedWorkflowTaskResponse](docs/BaseResponseQueuedWorkflowTaskResponse.md) - [BaseResponseRecent](docs/BaseResponseRecent.md) + - [BaseResponseReportAnalysisResponse](docs/BaseResponseReportAnalysisResponse.md) - [BaseResponseStatus](docs/BaseResponseStatus.md) - [BaseResponseStr](docs/BaseResponseStr.md) - [BaseResponseTTPS](docs/BaseResponseTTPS.md) - [BaseResponseTagSearchResponse](docs/BaseResponseTagSearchResponse.md) - [BaseResponseTaskResponse](docs/BaseResponseTaskResponse.md) + - [BaseResponseTaskStatusResponse](docs/BaseResponseTaskStatusResponse.md) + - [BaseResponseTriageReportResponse](docs/BaseResponseTriageReportResponse.md) - [BaseResponseUnionGetAiDecompilationRatingResponseNoneType](docs/BaseResponseUnionGetAiDecompilationRatingResponseNoneType.md) - [BaseResponseUploadResponse](docs/BaseResponseUploadResponse.md) - [BaseResponseVulnerabilities](docs/BaseResponseVulnerabilities.md) @@ -269,12 +285,13 @@ Class | Method | HTTP request | Description - [BinaryExternalsResponse](docs/BinaryExternalsResponse.md) - [BinarySearchResponse](docs/BinarySearchResponse.md) - [BinarySearchResult](docs/BinarySearchResult.md) + - [BinaryTaskStatus](docs/BinaryTaskStatus.md) - [BulkDeleteAnalysesRequest](docs/BulkDeleteAnalysesRequest.md) - [CalleeFunctionInfo](docs/CalleeFunctionInfo.md) - [CalleesCallerFunctionsResponse](docs/CalleesCallerFunctionsResponse.md) - [CallerFunctionInfo](docs/CallerFunctionInfo.md) - [Capabilities](docs/Capabilities.md) - - [Capability](docs/Capability.md) + - [CapabilitiesAgentResponse](docs/CapabilitiesAgentResponse.md) - [ChildBinariesResponse](docs/ChildBinariesResponse.md) - [CodeSignatureModel](docs/CodeSignatureModel.md) - [CollectionBinariesUpdateRequest](docs/CollectionBinariesUpdateRequest.md) @@ -361,6 +378,7 @@ Class | Method | HTTP request | Description - [GetMeResponse](docs/GetMeResponse.md) - [GetPublicUserResponse](docs/GetPublicUserResponse.md) - [GlobalVariable](docs/GlobalVariable.md) + - [IOC](docs/IOC.md) - [ISA](docs/ISA.md) - [IconModel](docs/IconModel.md) - [ImportModel](docs/ImportModel.md) @@ -372,6 +390,7 @@ Class | Method | HTTP request | Description - [LoginRequest](docs/LoginRequest.md) - [LoginResponse](docs/LoginResponse.md) - [Logs](docs/Logs.md) + - [MITRETechnique](docs/MITRETechnique.md) - [MatchedFunction](docs/MatchedFunction.md) - [MatchedFunctionSuggestion](docs/MatchedFunctionSuggestion.md) - [MetaModel](docs/MetaModel.md) @@ -399,10 +418,12 @@ Class | Method | HTTP request | Description - [ProcessRegistry](docs/ProcessRegistry.md) - [ProcessTree](docs/ProcessTree.md) - [PutAnalysisStringsRequest](docs/PutAnalysisStringsRequest.md) + - [QueuedWorkflowTaskResponse](docs/QueuedWorkflowTaskResponse.md) - [ReAnalysisForm](docs/ReAnalysisForm.md) - [Recent](docs/Recent.md) - [Registry](docs/Registry.md) - [RelativeBinaryResponse](docs/RelativeBinaryResponse.md) + - [ReportAnalysisResponse](docs/ReportAnalysisResponse.md) - [SBOM](docs/SBOM.md) - [SBOMPackage](docs/SBOMPackage.md) - [SandboxOptions](docs/SandboxOptions.md) @@ -437,7 +458,10 @@ Class | Method | HTTP request | Description - [TagSearchResult](docs/TagSearchResult.md) - [TaskResponse](docs/TaskResponse.md) - [TaskStatus](docs/TaskStatus.md) + - [TaskStatusResponse](docs/TaskStatusResponse.md) - [TimestampModel](docs/TimestampModel.md) + - [TriageFunctionResponse](docs/TriageFunctionResponse.md) + - [TriageReportResponse](docs/TriageReportResponse.md) - [TypeDefinition](docs/TypeDefinition.md) - [UpdateFunctionDataTypes](docs/UpdateFunctionDataTypes.md) - [UploadFileType](docs/UploadFileType.md) diff --git a/docs/AgentApi.md b/docs/AgentApi.md new file mode 100644 index 0000000..92831b7 --- /dev/null +++ b/docs/AgentApi.md @@ -0,0 +1,720 @@ +# revengai.AgentApi + +All URIs are relative to *https://api.reveng.ai* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get**](AgentApi.md#check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities/status | Check the status of a capabilities analysis workflow +[**check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get**](AgentApi.md#check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis/status | Check the status of a report analysis workflow +[**check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get**](AgentApi.md#check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get) | **GET** /v2/analyses/{analysis_id}/agent/triage/status | Check the status of a triage analysis workflow +[**create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post**](AgentApi.md#create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post) | **POST** /v2/analyses/{analysis_id}/agent/capabilities | Queues a capabilities analysis workflow process +[**create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post**](AgentApi.md#create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post) | **POST** /v2/analyses/{analysis_id}/agent/report-analysis | Queues a combined report analysis workflow process +[**create_triage_task_v2_analyses_analysis_id_agent_triage_post**](AgentApi.md#create_triage_task_v2_analyses_analysis_id_agent_triage_post) | **POST** /v2/analyses/{analysis_id}/agent/triage | Queues a triage analysis workflow process +[**get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get**](AgentApi.md#get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get) | **GET** /v2/analyses/{analysis_id}/agent/capabilities | Get Capabilities Result +[**get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get**](AgentApi.md#get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get) | **GET** /v2/analyses/{analysis_id}/agent/report-analysis | Get Report Analysis Result +[**get_triage_result_v2_analyses_analysis_id_agent_triage_get**](AgentApi.md#get_triage_result_v2_analyses_analysis_id_agent_triage_get) | **GET** /v2/analyses/{analysis_id}/agent/triage | Get Triage Result + + +# **check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get** +> TaskStatusResponse check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get(analysis_id) + +Check the status of a capabilities analysis workflow + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.task_status_response import TaskStatusResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Check the status of a capabilities analysis workflow + api_response = api_instance.check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get(analysis_id) + print("The response of AgentApi->check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**TaskStatusResponse**](TaskStatusResponse.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) + +# **check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get** +> TaskStatusResponse check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get(analysis_id) + +Check the status of a report analysis workflow + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.task_status_response import TaskStatusResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Check the status of a report analysis workflow + api_response = api_instance.check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get(analysis_id) + print("The response of AgentApi->check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**TaskStatusResponse**](TaskStatusResponse.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) + +# **check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get** +> TaskStatusResponse check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get(analysis_id) + +Check the status of a triage analysis workflow + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.task_status_response import TaskStatusResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Check the status of a triage analysis workflow + api_response = api_instance.check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get(analysis_id) + print("The response of AgentApi->check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**TaskStatusResponse**](TaskStatusResponse.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) + +# **create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post** +> BaseResponseQueuedWorkflowTaskResponse create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post(analysis_id) + +Queues a capabilities analysis workflow process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Queues a capabilities analysis workflow process + api_response = api_instance.create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post(analysis_id) + print("The response of AgentApi->create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseQueuedWorkflowTaskResponse**](BaseResponseQueuedWorkflowTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | 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) + +# **create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post** +> QueuedWorkflowTaskResponse create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post(analysis_id) + +Queues a combined report analysis workflow process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Queues a combined report analysis workflow process + api_response = api_instance.create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post(analysis_id) + print("The response of AgentApi->create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**QueuedWorkflowTaskResponse**](QueuedWorkflowTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | Successful Response | - | +**422** | Invalid request parameters | - | +**409** | Task already completed or queued | - | + +[[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) + +# **create_triage_task_v2_analyses_analysis_id_agent_triage_post** +> BaseResponseQueuedWorkflowTaskResponse create_triage_task_v2_analyses_analysis_id_agent_triage_post(analysis_id) + +Queues a triage analysis workflow process + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Queues a triage analysis workflow process + api_response = api_instance.create_triage_task_v2_analyses_analysis_id_agent_triage_post(analysis_id) + print("The response of AgentApi->create_triage_task_v2_analyses_analysis_id_agent_triage_post:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->create_triage_task_v2_analyses_analysis_id_agent_triage_post: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseQueuedWorkflowTaskResponse**](BaseResponseQueuedWorkflowTaskResponse.md) + +### Authorization + +[APIKey](../README.md#APIKey) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**202** | 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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get** +> BaseResponseCapabilitiesAgentResponse get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(analysis_id) + +Get Capabilities Result + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Capabilities Result + api_response = api_instance.get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(analysis_id) + print("The response of AgentApi->get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseCapabilitiesAgentResponse**](BaseResponseCapabilitiesAgentResponse.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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get** +> BaseResponseReportAnalysisResponse get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(analysis_id) + +Get Report Analysis Result + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Report Analysis Result + api_response = api_instance.get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(analysis_id) + print("The response of AgentApi->get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseReportAnalysisResponse**](BaseResponseReportAnalysisResponse.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_triage_result_v2_analyses_analysis_id_agent_triage_get** +> BaseResponseTriageReportResponse get_triage_result_v2_analyses_analysis_id_agent_triage_get(analysis_id) + +Get Triage Result + +### Example + +* Api Key Authentication (APIKey): + +```python +import revengai +from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse +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.AgentApi(api_client) + analysis_id = 56 # int | + + try: + # Get Triage Result + api_response = api_instance.get_triage_result_v2_analyses_analysis_id_agent_triage_get(analysis_id) + print("The response of AgentApi->get_triage_result_v2_analyses_analysis_id_agent_triage_get:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling AgentApi->get_triage_result_v2_analyses_analysis_id_agent_triage_get: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **analysis_id** | **int**| | + +### Return type + +[**BaseResponseTriageReportResponse**](BaseResponseTriageReportResponse.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/AppApiRestV2AgentSchemaCapability.md b/docs/AppApiRestV2AgentSchemaCapability.md new file mode 100644 index 0000000..cf38866 --- /dev/null +++ b/docs/AppApiRestV2AgentSchemaCapability.md @@ -0,0 +1,34 @@ +# AppApiRestV2AgentSchemaCapability + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**function_vaddr** | **str** | Vaddr of the function containing the capability | +**description** | **str** | Description of the capability | +**capability** | **str** | Name of the capability | +**type** | **str** | Type of the capability | +**function_name** | **str** | Name of the function containing the capability | +**function_id** | **int** | ID of the function containing the capability | + +## Example + +```python +from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability + +# TODO update the JSON string below +json = "{}" +# create an instance of AppApiRestV2AgentSchemaCapability from a JSON string +app_api_rest_v2_agent_schema_capability_instance = AppApiRestV2AgentSchemaCapability.from_json(json) +# print the JSON string representation of the object +print(AppApiRestV2AgentSchemaCapability.to_json()) + +# convert the object into a dict +app_api_rest_v2_agent_schema_capability_dict = app_api_rest_v2_agent_schema_capability_instance.to_dict() +# create an instance of AppApiRestV2AgentSchemaCapability from a dict +app_api_rest_v2_agent_schema_capability_from_dict = AppApiRestV2AgentSchemaCapability.from_dict(app_api_rest_v2_agent_schema_capability_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/Capability.md b/docs/AppApiRestV2InfoTypesCapability.md similarity index 51% rename from docs/Capability.md rename to docs/AppApiRestV2InfoTypesCapability.md index dd222ff..35d2d53 100644 --- a/docs/Capability.md +++ b/docs/AppApiRestV2InfoTypesCapability.md @@ -1,4 +1,4 @@ -# Capability +# AppApiRestV2InfoTypesCapability ## Properties @@ -12,19 +12,19 @@ Name | Type | Description | Notes ## Example ```python -from revengai.models.capability import Capability +from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability # TODO update the JSON string below json = "{}" -# create an instance of Capability from a JSON string -capability_instance = Capability.from_json(json) +# create an instance of AppApiRestV2InfoTypesCapability from a JSON string +app_api_rest_v2_info_types_capability_instance = AppApiRestV2InfoTypesCapability.from_json(json) # print the JSON string representation of the object -print(Capability.to_json()) +print(AppApiRestV2InfoTypesCapability.to_json()) # convert the object into a dict -capability_dict = capability_instance.to_dict() -# create an instance of Capability from a dict -capability_from_dict = Capability.from_dict(capability_dict) +app_api_rest_v2_info_types_capability_dict = app_api_rest_v2_info_types_capability_instance.to_dict() +# create an instance of AppApiRestV2InfoTypesCapability from a dict +app_api_rest_v2_info_types_capability_from_dict = AppApiRestV2InfoTypesCapability.from_dict(app_api_rest_v2_info_types_capability_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/BaseResponseCapabilitiesAgentResponse.md b/docs/BaseResponseCapabilitiesAgentResponse.md new file mode 100644 index 0000000..153b0db --- /dev/null +++ b/docs/BaseResponseCapabilitiesAgentResponse.md @@ -0,0 +1,33 @@ +# BaseResponseCapabilitiesAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**CapabilitiesAgentResponse**](CapabilitiesAgentResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseCapabilitiesAgentResponse from a JSON string +base_response_capabilities_agent_response_instance = BaseResponseCapabilitiesAgentResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseCapabilitiesAgentResponse.to_json()) + +# convert the object into a dict +base_response_capabilities_agent_response_dict = base_response_capabilities_agent_response_instance.to_dict() +# create an instance of BaseResponseCapabilitiesAgentResponse from a dict +base_response_capabilities_agent_response_from_dict = BaseResponseCapabilitiesAgentResponse.from_dict(base_response_capabilities_agent_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/BaseResponseQueuedWorkflowTaskResponse.md b/docs/BaseResponseQueuedWorkflowTaskResponse.md new file mode 100644 index 0000000..51049f0 --- /dev/null +++ b/docs/BaseResponseQueuedWorkflowTaskResponse.md @@ -0,0 +1,33 @@ +# BaseResponseQueuedWorkflowTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**QueuedWorkflowTaskResponse**](QueuedWorkflowTaskResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseQueuedWorkflowTaskResponse from a JSON string +base_response_queued_workflow_task_response_instance = BaseResponseQueuedWorkflowTaskResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseQueuedWorkflowTaskResponse.to_json()) + +# convert the object into a dict +base_response_queued_workflow_task_response_dict = base_response_queued_workflow_task_response_instance.to_dict() +# create an instance of BaseResponseQueuedWorkflowTaskResponse from a dict +base_response_queued_workflow_task_response_from_dict = BaseResponseQueuedWorkflowTaskResponse.from_dict(base_response_queued_workflow_task_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/BaseResponseReportAnalysisResponse.md b/docs/BaseResponseReportAnalysisResponse.md new file mode 100644 index 0000000..f5dd6b3 --- /dev/null +++ b/docs/BaseResponseReportAnalysisResponse.md @@ -0,0 +1,33 @@ +# BaseResponseReportAnalysisResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**ReportAnalysisResponse**](ReportAnalysisResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseReportAnalysisResponse from a JSON string +base_response_report_analysis_response_instance = BaseResponseReportAnalysisResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseReportAnalysisResponse.to_json()) + +# convert the object into a dict +base_response_report_analysis_response_dict = base_response_report_analysis_response_instance.to_dict() +# create an instance of BaseResponseReportAnalysisResponse from a dict +base_response_report_analysis_response_from_dict = BaseResponseReportAnalysisResponse.from_dict(base_response_report_analysis_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/BaseResponseTaskStatusResponse.md b/docs/BaseResponseTaskStatusResponse.md new file mode 100644 index 0000000..9265c9e --- /dev/null +++ b/docs/BaseResponseTaskStatusResponse.md @@ -0,0 +1,33 @@ +# BaseResponseTaskStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**TaskStatusResponse**](TaskStatusResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_task_status_response import BaseResponseTaskStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseTaskStatusResponse from a JSON string +base_response_task_status_response_instance = BaseResponseTaskStatusResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseTaskStatusResponse.to_json()) + +# convert the object into a dict +base_response_task_status_response_dict = base_response_task_status_response_instance.to_dict() +# create an instance of BaseResponseTaskStatusResponse from a dict +base_response_task_status_response_from_dict = BaseResponseTaskStatusResponse.from_dict(base_response_task_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/BaseResponseTriageReportResponse.md b/docs/BaseResponseTriageReportResponse.md new file mode 100644 index 0000000..903a2e7 --- /dev/null +++ b/docs/BaseResponseTriageReportResponse.md @@ -0,0 +1,33 @@ +# BaseResponseTriageReportResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] +**data** | [**TriageReportResponse**](TriageReportResponse.md) | | [optional] +**message** | **str** | | [optional] +**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] +**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] + +## Example + +```python +from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of BaseResponseTriageReportResponse from a JSON string +base_response_triage_report_response_instance = BaseResponseTriageReportResponse.from_json(json) +# print the JSON string representation of the object +print(BaseResponseTriageReportResponse.to_json()) + +# convert the object into a dict +base_response_triage_report_response_dict = base_response_triage_report_response_instance.to_dict() +# create an instance of BaseResponseTriageReportResponse from a dict +base_response_triage_report_response_from_dict = BaseResponseTriageReportResponse.from_dict(base_response_triage_report_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/BinaryTaskStatus.md b/docs/BinaryTaskStatus.md new file mode 100644 index 0000000..77688a0 --- /dev/null +++ b/docs/BinaryTaskStatus.md @@ -0,0 +1,18 @@ +# BinaryTaskStatus + + +## Enum + +* `UNINITIALISED` (value: `'UNINITIALISED'`) + +* `PENDING` (value: `'PENDING'`) + +* `RUNNING` (value: `'RUNNING'`) + +* `COMPLETED` (value: `'COMPLETED'`) + +* `FAILED` (value: `'FAILED'`) + +[[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/Capabilities.md b/docs/Capabilities.md index d4ed9a3..6f4da6c 100644 --- a/docs/Capabilities.md +++ b/docs/Capabilities.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**capabilities** | [**List[Capability]**](Capability.md) | List of capabilities for a given analysis | +**capabilities** | [**List[AppApiRestV2InfoTypesCapability]**](AppApiRestV2InfoTypesCapability.md) | List of capabilities for a given analysis | ## Example diff --git a/docs/CapabilitiesAgentResponse.md b/docs/CapabilitiesAgentResponse.md new file mode 100644 index 0000000..e9e7272 --- /dev/null +++ b/docs/CapabilitiesAgentResponse.md @@ -0,0 +1,29 @@ +# CapabilitiesAgentResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**capabilities** | [**List[AppApiRestV2AgentSchemaCapability]**](AppApiRestV2AgentSchemaCapability.md) | List of enriched capability data | + +## Example + +```python +from revengai.models.capabilities_agent_response import CapabilitiesAgentResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of CapabilitiesAgentResponse from a JSON string +capabilities_agent_response_instance = CapabilitiesAgentResponse.from_json(json) +# print the JSON string representation of the object +print(CapabilitiesAgentResponse.to_json()) + +# convert the object into a dict +capabilities_agent_response_dict = capabilities_agent_response_instance.to_dict() +# create an instance of CapabilitiesAgentResponse from a dict +capabilities_agent_response_from_dict = CapabilitiesAgentResponse.from_dict(capabilities_agent_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/IOC.md b/docs/IOC.md new file mode 100644 index 0000000..3c2822c --- /dev/null +++ b/docs/IOC.md @@ -0,0 +1,34 @@ +# IOC + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**type** | **str** | Type of the IOC | +**value** | **str** | Value of the IOC | +**description** | **str** | Description of the IOC | +**source** | **str** | | [optional] +**function_id** | **int** | | [optional] +**function_name** | **str** | | [optional] + +## Example + +```python +from revengai.models.ioc import IOC + +# TODO update the JSON string below +json = "{}" +# create an instance of IOC from a JSON string +ioc_instance = IOC.from_json(json) +# print the JSON string representation of the object +print(IOC.to_json()) + +# convert the object into a dict +ioc_dict = ioc_instance.to_dict() +# create an instance of IOC from a dict +ioc_from_dict = IOC.from_dict(ioc_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/MITRETechnique.md b/docs/MITRETechnique.md new file mode 100644 index 0000000..5980344 --- /dev/null +++ b/docs/MITRETechnique.md @@ -0,0 +1,38 @@ +# MITRETechnique + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**start_addr** | **str** | Starting address of the technique | +**end_addr** | **str** | Ending address of the technique | +**function_addr** | **str** | Function address where the technique is found | +**technique_id** | **str** | MITRE technique identifier | +**technique_name** | **str** | Name of the MITRE technique | +**description** | **str** | Description of the technique | +**function_id** | **int** | Unique identifier of the function containing the technique | +**function_name** | **str** | Name of the function containing the technique | +**technique_url** | **str** | URL to the MITRE ATT&CK technique page | +**technique_description** | **str** | Full description of the MITRE technique from ATT&CK | + +## Example + +```python +from revengai.models.mitre_technique import MITRETechnique + +# TODO update the JSON string below +json = "{}" +# create an instance of MITRETechnique from a JSON string +mitre_technique_instance = MITRETechnique.from_json(json) +# print the JSON string representation of the object +print(MITRETechnique.to_json()) + +# convert the object into a dict +mitre_technique_dict = mitre_technique_instance.to_dict() +# create an instance of MITRETechnique from a dict +mitre_technique_from_dict = MITRETechnique.from_dict(mitre_technique_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/QueuedWorkflowTaskResponse.md b/docs/QueuedWorkflowTaskResponse.md new file mode 100644 index 0000000..0ff47ba --- /dev/null +++ b/docs/QueuedWorkflowTaskResponse.md @@ -0,0 +1,29 @@ +# QueuedWorkflowTaskResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**task_id** | **str** | | + +## Example + +```python +from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of QueuedWorkflowTaskResponse from a JSON string +queued_workflow_task_response_instance = QueuedWorkflowTaskResponse.from_json(json) +# print the JSON string representation of the object +print(QueuedWorkflowTaskResponse.to_json()) + +# convert the object into a dict +queued_workflow_task_response_dict = queued_workflow_task_response_instance.to_dict() +# create an instance of QueuedWorkflowTaskResponse from a dict +queued_workflow_task_response_from_dict = QueuedWorkflowTaskResponse.from_dict(queued_workflow_task_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/ReportAnalysisResponse.md b/docs/ReportAnalysisResponse.md new file mode 100644 index 0000000..096dff7 --- /dev/null +++ b/docs/ReportAnalysisResponse.md @@ -0,0 +1,36 @@ +# ReportAnalysisResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**summary** | **str** | A markdown summary of the report | +**software_type** | **str** | The type of software being analyzed | +**total_number_of_functions** | **int** | The total number of functions identified in the binary | +**number_of_analysed_functions** | **int** | The number of functions that were analyzed in the binary | +**attack_flow_summary** | **str** | A summary in markdown format of the attack flow | +**iocs** | [**List[IOC]**](IOC.md) | A list of IOCs (Indicators of Compromise) found in the analysis | +**executable_techniques** | [**List[MITRETechnique]**](MITRETechnique.md) | A series of MITRE Techniques found | +**yara_rule** | **str** | The YARA rule generated for the binary | + +## Example + +```python +from revengai.models.report_analysis_response import ReportAnalysisResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ReportAnalysisResponse from a JSON string +report_analysis_response_instance = ReportAnalysisResponse.from_json(json) +# print the JSON string representation of the object +print(ReportAnalysisResponse.to_json()) + +# convert the object into a dict +report_analysis_response_dict = report_analysis_response_instance.to_dict() +# create an instance of ReportAnalysisResponse from a dict +report_analysis_response_from_dict = ReportAnalysisResponse.from_dict(report_analysis_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/TaskStatusResponse.md b/docs/TaskStatusResponse.md new file mode 100644 index 0000000..a327df9 --- /dev/null +++ b/docs/TaskStatusResponse.md @@ -0,0 +1,29 @@ +# TaskStatusResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**status** | [**BinaryTaskStatus**](BinaryTaskStatus.md) | | + +## Example + +```python +from revengai.models.task_status_response import TaskStatusResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TaskStatusResponse from a JSON string +task_status_response_instance = TaskStatusResponse.from_json(json) +# print the JSON string representation of the object +print(TaskStatusResponse.to_json()) + +# convert the object into a dict +task_status_response_dict = task_status_response_instance.to_dict() +# create an instance of TaskStatusResponse from a dict +task_status_response_from_dict = TaskStatusResponse.from_dict(task_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/TriageFunctionResponse.md b/docs/TriageFunctionResponse.md new file mode 100644 index 0000000..62653ff --- /dev/null +++ b/docs/TriageFunctionResponse.md @@ -0,0 +1,33 @@ +# TriageFunctionResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | Unique identifier of the function | +**address** | **int** | Address of the function in the binary | +**summary** | **str** | Summary of the function's behaviour | +**score** | **float** | Score indicating the function's relevance | +**capabilities** | **List[str]** | List of capabilities exhibited by the function | + +## Example + +```python +from revengai.models.triage_function_response import TriageFunctionResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TriageFunctionResponse from a JSON string +triage_function_response_instance = TriageFunctionResponse.from_json(json) +# print the JSON string representation of the object +print(TriageFunctionResponse.to_json()) + +# convert the object into a dict +triage_function_response_dict = triage_function_response_instance.to_dict() +# create an instance of TriageFunctionResponse from a dict +triage_function_response_from_dict = TriageFunctionResponse.from_dict(triage_function_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/TriageReportResponse.md b/docs/TriageReportResponse.md new file mode 100644 index 0000000..31ddeda --- /dev/null +++ b/docs/TriageReportResponse.md @@ -0,0 +1,31 @@ +# TriageReportResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**software_score** | **float** | Overall triage score for the software | +**summary** | **str** | Summary of the triage analysis | +**functions** | [**List[TriageFunctionResponse]**](TriageFunctionResponse.md) | List of triaged functions | + +## Example + +```python +from revengai.models.triage_report_response import TriageReportResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TriageReportResponse from a JSON string +triage_report_response_instance = TriageReportResponse.from_json(json) +# print the JSON string representation of the object +print(TriageReportResponse.to_json()) + +# convert the object into a dict +triage_report_response_dict = triage_report_response_instance.to_dict() +# create an instance of TriageReportResponse from a dict +triage_report_response_from_dict = TriageReportResponse.from_dict(triage_report_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/revengai/__init__.py b/revengai/__init__.py index 211ff9c..8d6330d 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,10 +13,11 @@ """ # noqa: E501 -__version__ = "v3.67.0" +__version__ = "v3.70.0" # Define package exports __all__ = [ + "AgentApi", "AnalysesCommentsApi", "AnalysesCoreApi", "AnalysesDynamicExecutionApi", @@ -73,11 +74,13 @@ "AnalysisUpdateRequest", "AnalysisUpdateTagsRequest", "AnalysisUpdateTagsResponse", + "AppApiRestV2AgentSchemaCapability", "AppApiRestV2AnalysesEnumsDynamicExecutionStatus", "AppApiRestV2AnalysesEnumsOrderBy", "AppApiRestV2CollectionsEnumsOrderBy", "AppApiRestV2FunctionsResponsesFunction", "AppApiRestV2FunctionsTypesFunction", + "AppApiRestV2InfoTypesCapability", "AppServicesDynamicExecutionSchemasDynamicExecutionStatus", "Argument", "AutoRunAgents", @@ -105,6 +108,7 @@ "BaseResponseBool", "BaseResponseCalleesCallerFunctionsResponse", "BaseResponseCapabilities", + "BaseResponseCapabilitiesAgentResponse", "BaseResponseChildBinariesResponse", "BaseResponseCollectionBinariesUpdateResponse", "BaseResponseCollectionResponse", @@ -145,12 +149,16 @@ "BaseResponseProcessDumps", "BaseResponseProcessRegistry", "BaseResponseProcessTree", + "BaseResponseQueuedWorkflowTaskResponse", "BaseResponseRecent", + "BaseResponseReportAnalysisResponse", "BaseResponseStatus", "BaseResponseStr", "BaseResponseTTPS", "BaseResponseTagSearchResponse", "BaseResponseTaskResponse", + "BaseResponseTaskStatusResponse", + "BaseResponseTriageReportResponse", "BaseResponseUnionGetAiDecompilationRatingResponseNoneType", "BaseResponseUploadResponse", "BaseResponseVulnerabilities", @@ -165,12 +173,13 @@ "BinaryExternalsResponse", "BinarySearchResponse", "BinarySearchResult", + "BinaryTaskStatus", "BulkDeleteAnalysesRequest", "CalleeFunctionInfo", "CalleesCallerFunctionsResponse", "CallerFunctionInfo", "Capabilities", - "Capability", + "CapabilitiesAgentResponse", "ChildBinariesResponse", "CodeSignatureModel", "CollectionBinariesUpdateRequest", @@ -257,6 +266,7 @@ "GetMeResponse", "GetPublicUserResponse", "GlobalVariable", + "IOC", "ISA", "IconModel", "ImportModel", @@ -268,6 +278,7 @@ "LoginRequest", "LoginResponse", "Logs", + "MITRETechnique", "MatchedFunction", "MatchedFunctionSuggestion", "MetaModel", @@ -295,10 +306,12 @@ "ProcessRegistry", "ProcessTree", "PutAnalysisStringsRequest", + "QueuedWorkflowTaskResponse", "ReAnalysisForm", "Recent", "Registry", "RelativeBinaryResponse", + "ReportAnalysisResponse", "SBOM", "SBOMPackage", "SandboxOptions", @@ -333,7 +346,10 @@ "TagSearchResult", "TaskResponse", "TaskStatus", + "TaskStatusResponse", "TimestampModel", + "TriageFunctionResponse", + "TriageReportResponse", "TypeDefinition", "UpdateFunctionDataTypes", "UploadFileType", @@ -349,6 +365,7 @@ ] # import apis into sdk package +from revengai.api.agent_api import AgentApi as AgentApi from revengai.api.analyses_comments_api import AnalysesCommentsApi as AnalysesCommentsApi from revengai.api.analyses_core_api import AnalysesCoreApi as AnalysesCoreApi from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi as AnalysesDynamicExecutionApi @@ -409,11 +426,13 @@ from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest as AnalysisUpdateTagsRequest from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse as AnalysisUpdateTagsResponse +from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability as AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus as AppApiRestV2AnalysesEnumsDynamicExecutionStatus from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction as AppApiRestV2FunctionsResponsesFunction from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction +from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability as AppApiRestV2InfoTypesCapability from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus as AppServicesDynamicExecutionSchemasDynamicExecutionStatus from revengai.models.argument import Argument as Argument from revengai.models.auto_run_agents import AutoRunAgents as AutoRunAgents @@ -441,6 +460,7 @@ from revengai.models.base_response_bool import BaseResponseBool as BaseResponseBool from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse as BaseResponseCalleesCallerFunctionsResponse from revengai.models.base_response_capabilities import BaseResponseCapabilities as BaseResponseCapabilities +from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse as BaseResponseCapabilitiesAgentResponse from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse as BaseResponseChildBinariesResponse from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse as BaseResponseCollectionBinariesUpdateResponse from revengai.models.base_response_collection_response import BaseResponseCollectionResponse as BaseResponseCollectionResponse @@ -481,12 +501,16 @@ 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 +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse as BaseResponseQueuedWorkflowTaskResponse from revengai.models.base_response_recent import BaseResponseRecent as BaseResponseRecent +from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse as BaseResponseReportAnalysisResponse from revengai.models.base_response_status import BaseResponseStatus as BaseResponseStatus from revengai.models.base_response_str import BaseResponseStr as BaseResponseStr from revengai.models.base_response_ttps import BaseResponseTTPS as BaseResponseTTPS from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse as BaseResponseTagSearchResponse from revengai.models.base_response_task_response import BaseResponseTaskResponse as BaseResponseTaskResponse +from revengai.models.base_response_task_status_response import BaseResponseTaskStatusResponse as BaseResponseTaskStatusResponse +from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse as BaseResponseTriageReportResponse from revengai.models.base_response_union_get_ai_decompilation_rating_response_none_type import BaseResponseUnionGetAiDecompilationRatingResponseNoneType as BaseResponseUnionGetAiDecompilationRatingResponseNoneType from revengai.models.base_response_upload_response import BaseResponseUploadResponse as BaseResponseUploadResponse from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities as BaseResponseVulnerabilities @@ -501,12 +525,13 @@ from revengai.models.binary_externals_response import BinaryExternalsResponse as BinaryExternalsResponse from revengai.models.binary_search_response import BinarySearchResponse as BinarySearchResponse from revengai.models.binary_search_result import BinarySearchResult as BinarySearchResult +from revengai.models.binary_task_status import BinaryTaskStatus as BinaryTaskStatus from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest as BulkDeleteAnalysesRequest from revengai.models.callee_function_info import CalleeFunctionInfo as CalleeFunctionInfo from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse as CalleesCallerFunctionsResponse from revengai.models.caller_function_info import CallerFunctionInfo as CallerFunctionInfo from revengai.models.capabilities import Capabilities as Capabilities -from revengai.models.capability import Capability as Capability +from revengai.models.capabilities_agent_response import CapabilitiesAgentResponse as CapabilitiesAgentResponse from revengai.models.child_binaries_response import ChildBinariesResponse as ChildBinariesResponse from revengai.models.code_signature_model import CodeSignatureModel as CodeSignatureModel from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest as CollectionBinariesUpdateRequest @@ -593,6 +618,7 @@ from revengai.models.get_me_response import GetMeResponse as GetMeResponse from revengai.models.get_public_user_response import GetPublicUserResponse as GetPublicUserResponse from revengai.models.global_variable import GlobalVariable as GlobalVariable +from revengai.models.ioc import IOC as IOC from revengai.models.isa import ISA as ISA from revengai.models.icon_model import IconModel as IconModel from revengai.models.import_model import ImportModel as ImportModel @@ -604,6 +630,7 @@ from revengai.models.login_request import LoginRequest as LoginRequest from revengai.models.login_response import LoginResponse as LoginResponse from revengai.models.logs import Logs as Logs +from revengai.models.mitre_technique import MITRETechnique as MITRETechnique from revengai.models.matched_function import MatchedFunction as MatchedFunction from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion as MatchedFunctionSuggestion from revengai.models.meta_model import MetaModel as MetaModel @@ -631,10 +658,12 @@ from revengai.models.process_registry import ProcessRegistry as ProcessRegistry from revengai.models.process_tree import ProcessTree as ProcessTree from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest as PutAnalysisStringsRequest +from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse as QueuedWorkflowTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm as ReAnalysisForm from revengai.models.recent import Recent as Recent from revengai.models.registry import Registry as Registry from revengai.models.relative_binary_response import RelativeBinaryResponse as RelativeBinaryResponse +from revengai.models.report_analysis_response import ReportAnalysisResponse as ReportAnalysisResponse from revengai.models.sbom import SBOM as SBOM from revengai.models.sbom_package import SBOMPackage as SBOMPackage from revengai.models.sandbox_options import SandboxOptions as SandboxOptions @@ -669,7 +698,10 @@ from revengai.models.tag_search_result import TagSearchResult as TagSearchResult from revengai.models.task_response import TaskResponse as TaskResponse from revengai.models.task_status import TaskStatus as TaskStatus +from revengai.models.task_status_response import TaskStatusResponse as TaskStatusResponse from revengai.models.timestamp_model import TimestampModel as TimestampModel +from revengai.models.triage_function_response import TriageFunctionResponse as TriageFunctionResponse +from revengai.models.triage_report_response import TriageReportResponse as TriageReportResponse from revengai.models.type_definition import TypeDefinition as TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes from revengai.models.upload_file_type import UploadFileType as UploadFileType diff --git a/revengai/api/__init__.py b/revengai/api/__init__.py index b2542d8..9f7f5aa 100644 --- a/revengai/api/__init__.py +++ b/revengai/api/__init__.py @@ -1,6 +1,7 @@ # flake8: noqa # import apis into api package +from revengai.api.agent_api import AgentApi from revengai.api.analyses_comments_api import AnalysesCommentsApi from revengai.api.analyses_core_api import AnalysesCoreApi from revengai.api.analyses_dynamic_execution_api import AnalysesDynamicExecutionApi diff --git a/revengai/api/agent_api.py b/revengai/api/agent_api.py new file mode 100644 index 0000000..d48e85d --- /dev/null +++ b/revengai/api/agent_api.py @@ -0,0 +1,2393 @@ +# 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_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse +from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse +from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse +from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse +from revengai.models.task_status_response import TaskStatusResponse + +from revengai.api_client import ApiClient, RequestSerialized +from revengai.api_response import ApiResponse +from revengai.rest import RESTResponseType + + +class AgentApi: + """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 check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get( + 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, + ) -> TaskStatusResponse: + """Check the status of a capabilities analysis workflow + + + :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._check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_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': "TaskStatusResponse", + '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 check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_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[TaskStatusResponse]: + """Check the status of a capabilities analysis workflow + + + :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._check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_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': "TaskStatusResponse", + '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 check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_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: + """Check the status of a capabilities analysis workflow + + + :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._check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_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': "TaskStatusResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get_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/analyses/{analysis_id}/agent/capabilities/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 + ) + + + + + @validate_call + def check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get( + 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, + ) -> TaskStatusResponse: + """Check the status of a report analysis workflow + + + :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._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_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': "TaskStatusResponse", + '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 check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_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[TaskStatusResponse]: + """Check the status of a report analysis workflow + + + :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._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_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': "TaskStatusResponse", + '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 check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_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: + """Check the status of a report analysis workflow + + + :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._check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_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': "TaskStatusResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get_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/analyses/{analysis_id}/agent/report-analysis/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 + ) + + + + + @validate_call + def check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get( + 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, + ) -> TaskStatusResponse: + """Check the status of a triage analysis workflow + + + :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._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_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': "TaskStatusResponse", + '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 check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_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[TaskStatusResponse]: + """Check the status of a triage analysis workflow + + + :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._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_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': "TaskStatusResponse", + '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 check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_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: + """Check the status of a triage analysis workflow + + + :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._check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_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': "TaskStatusResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get_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/analyses/{analysis_id}/agent/triage/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 + ) + + + + + @validate_call + def create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post( + 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, + ) -> BaseResponseQueuedWorkflowTaskResponse: + """Queues a capabilities analysis workflow process + + + :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._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_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]] = { + '202': "BaseResponseQueuedWorkflowTaskResponse", + '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 create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_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[BaseResponseQueuedWorkflowTaskResponse]: + """Queues a capabilities analysis workflow process + + + :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._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_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]] = { + '202': "BaseResponseQueuedWorkflowTaskResponse", + '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 create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_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: + """Queues a capabilities analysis workflow process + + + :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._create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_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]] = { + '202': "BaseResponseQueuedWorkflowTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post_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='POST', + resource_path='/v2/analyses/{analysis_id}/agent/capabilities', + 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 create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post( + 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, + ) -> QueuedWorkflowTaskResponse: + """Queues a combined report analysis workflow process + + + :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._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_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]] = { + '202': "QueuedWorkflowTaskResponse", + '422': "BaseResponse", + '409': "ErrorModel", + } + 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 create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_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[QueuedWorkflowTaskResponse]: + """Queues a combined report analysis workflow process + + + :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._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_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]] = { + '202': "QueuedWorkflowTaskResponse", + '422': "BaseResponse", + '409': "ErrorModel", + } + 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 create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_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: + """Queues a combined report analysis workflow process + + + :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._create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_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]] = { + '202': "QueuedWorkflowTaskResponse", + '422': "BaseResponse", + '409': "ErrorModel", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post_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='POST', + resource_path='/v2/analyses/{analysis_id}/agent/report-analysis', + 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 create_triage_task_v2_analyses_analysis_id_agent_triage_post( + 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, + ) -> BaseResponseQueuedWorkflowTaskResponse: + """Queues a triage analysis workflow process + + + :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._create_triage_task_v2_analyses_analysis_id_agent_triage_post_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]] = { + '202': "BaseResponseQueuedWorkflowTaskResponse", + '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 create_triage_task_v2_analyses_analysis_id_agent_triage_post_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[BaseResponseQueuedWorkflowTaskResponse]: + """Queues a triage analysis workflow process + + + :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._create_triage_task_v2_analyses_analysis_id_agent_triage_post_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]] = { + '202': "BaseResponseQueuedWorkflowTaskResponse", + '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 create_triage_task_v2_analyses_analysis_id_agent_triage_post_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: + """Queues a triage analysis workflow process + + + :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._create_triage_task_v2_analyses_analysis_id_agent_triage_post_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]] = { + '202': "BaseResponseQueuedWorkflowTaskResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_triage_task_v2_analyses_analysis_id_agent_triage_post_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='POST', + resource_path='/v2/analyses/{analysis_id}/agent/triage', + 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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get( + 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, + ) -> BaseResponseCapabilitiesAgentResponse: + """Get Capabilities Result + + + :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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_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': "BaseResponseCapabilitiesAgentResponse", + '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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_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[BaseResponseCapabilitiesAgentResponse]: + """Get Capabilities Result + + + :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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_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': "BaseResponseCapabilitiesAgentResponse", + '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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_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 Capabilities Result + + + :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_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_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': "BaseResponseCapabilitiesAgentResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get_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/analyses/{analysis_id}/agent/capabilities', + 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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get( + 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, + ) -> BaseResponseReportAnalysisResponse: + """Get Report Analysis Result + + + :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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_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': "BaseResponseReportAnalysisResponse", + '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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_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[BaseResponseReportAnalysisResponse]: + """Get Report Analysis Result + + + :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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_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': "BaseResponseReportAnalysisResponse", + '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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_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 Report Analysis Result + + + :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_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_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': "BaseResponseReportAnalysisResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get_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/analyses/{analysis_id}/agent/report-analysis', + 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_triage_result_v2_analyses_analysis_id_agent_triage_get( + 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, + ) -> BaseResponseTriageReportResponse: + """Get Triage Result + + + :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_triage_result_v2_analyses_analysis_id_agent_triage_get_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': "BaseResponseTriageReportResponse", + '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_triage_result_v2_analyses_analysis_id_agent_triage_get_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[BaseResponseTriageReportResponse]: + """Get Triage Result + + + :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_triage_result_v2_analyses_analysis_id_agent_triage_get_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': "BaseResponseTriageReportResponse", + '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_triage_result_v2_analyses_analysis_id_agent_triage_get_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 Triage Result + + + :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_triage_result_v2_analyses_analysis_id_agent_triage_get_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': "BaseResponseTriageReportResponse", + '422': "BaseResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _get_triage_result_v2_analyses_analysis_id_agent_triage_get_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/analyses/{analysis_id}/agent/triage', + 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 6e2bb90..eaa0ba1 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.67.0/python' + self.user_agent = 'OpenAPI-Generator/v3.70.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 3e83ca4..a9f7683 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.67.0\n"\ - "SDK Package Version: v3.67.0".\ + "Version of the API: v3.70.0\n"\ + "SDK Package Version: v3.70.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 3c1cd66..c8f2b1b 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -41,11 +41,13 @@ from revengai.models.analysis_update_request import AnalysisUpdateRequest from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse +from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction +from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus from revengai.models.argument import Argument from revengai.models.auto_run_agents import AutoRunAgents @@ -73,6 +75,7 @@ from revengai.models.base_response_bool import BaseResponseBool from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse from revengai.models.base_response_capabilities import BaseResponseCapabilities +from revengai.models.base_response_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse from revengai.models.base_response_child_binaries_response import BaseResponseChildBinariesResponse from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse from revengai.models.base_response_collection_response import BaseResponseCollectionResponse @@ -113,12 +116,16 @@ 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 +from revengai.models.base_response_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse from revengai.models.base_response_recent import BaseResponseRecent +from revengai.models.base_response_report_analysis_response import BaseResponseReportAnalysisResponse from revengai.models.base_response_status import BaseResponseStatus from revengai.models.base_response_str import BaseResponseStr from revengai.models.base_response_ttps import BaseResponseTTPS from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse from revengai.models.base_response_task_response import BaseResponseTaskResponse +from revengai.models.base_response_task_status_response import BaseResponseTaskStatusResponse +from revengai.models.base_response_triage_report_response import BaseResponseTriageReportResponse from revengai.models.base_response_union_get_ai_decompilation_rating_response_none_type import BaseResponseUnionGetAiDecompilationRatingResponseNoneType from revengai.models.base_response_upload_response import BaseResponseUploadResponse from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities @@ -133,12 +140,13 @@ from revengai.models.binary_externals_response import BinaryExternalsResponse from revengai.models.binary_search_response import BinarySearchResponse from revengai.models.binary_search_result import BinarySearchResult +from revengai.models.binary_task_status import BinaryTaskStatus from revengai.models.bulk_delete_analyses_request import BulkDeleteAnalysesRequest from revengai.models.callee_function_info import CalleeFunctionInfo from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse from revengai.models.caller_function_info import CallerFunctionInfo from revengai.models.capabilities import Capabilities -from revengai.models.capability import Capability +from revengai.models.capabilities_agent_response import CapabilitiesAgentResponse from revengai.models.child_binaries_response import ChildBinariesResponse from revengai.models.code_signature_model import CodeSignatureModel from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest @@ -225,6 +233,7 @@ from revengai.models.get_me_response import GetMeResponse from revengai.models.get_public_user_response import GetPublicUserResponse from revengai.models.global_variable import GlobalVariable +from revengai.models.ioc import IOC from revengai.models.isa import ISA from revengai.models.icon_model import IconModel from revengai.models.import_model import ImportModel @@ -236,6 +245,7 @@ from revengai.models.login_request import LoginRequest from revengai.models.login_response import LoginResponse from revengai.models.logs import Logs +from revengai.models.mitre_technique import MITRETechnique from revengai.models.matched_function import MatchedFunction from revengai.models.matched_function_suggestion import MatchedFunctionSuggestion from revengai.models.meta_model import MetaModel @@ -263,10 +273,12 @@ from revengai.models.process_registry import ProcessRegistry from revengai.models.process_tree import ProcessTree from revengai.models.put_analysis_strings_request import PutAnalysisStringsRequest +from revengai.models.queued_workflow_task_response import QueuedWorkflowTaskResponse from revengai.models.re_analysis_form import ReAnalysisForm from revengai.models.recent import Recent from revengai.models.registry import Registry from revengai.models.relative_binary_response import RelativeBinaryResponse +from revengai.models.report_analysis_response import ReportAnalysisResponse from revengai.models.sbom import SBOM from revengai.models.sbom_package import SBOMPackage from revengai.models.sandbox_options import SandboxOptions @@ -301,7 +313,10 @@ from revengai.models.tag_search_result import TagSearchResult from revengai.models.task_response import TaskResponse from revengai.models.task_status import TaskStatus +from revengai.models.task_status_response import TaskStatusResponse from revengai.models.timestamp_model import TimestampModel +from revengai.models.triage_function_response import TriageFunctionResponse +from revengai.models.triage_report_response import TriageReportResponse from revengai.models.type_definition import TypeDefinition from revengai.models.update_function_data_types import UpdateFunctionDataTypes from revengai.models.upload_file_type import UploadFileType diff --git a/revengai/models/app_api_rest_v2_agent_schema_capability.py b/revengai/models/app_api_rest_v2_agent_schema_capability.py new file mode 100644 index 0000000..b53ad63 --- /dev/null +++ b/revengai/models/app_api_rest_v2_agent_schema_capability.py @@ -0,0 +1,103 @@ +# 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class AppApiRestV2AgentSchemaCapability(BaseModel): + """ + AppApiRestV2AgentSchemaCapability + """ # noqa: E501 + function_vaddr: StrictStr = Field(description="Vaddr of the function containing the capability") + description: StrictStr = Field(description="Description of the capability") + capability: StrictStr = Field(description="Name of the capability") + type: StrictStr = Field(description="Type of the capability") + function_name: StrictStr = Field(description="Name of the function containing the capability") + function_id: StrictInt = Field(description="ID of the function containing the capability") + __properties: ClassVar[List[str]] = ["function_vaddr", "description", "capability", "type", "function_name", "function_id"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Execute', 'Crypto', 'Network', 'Files', 'Memory', 'String', 'Environment', 'File Header', 'Other']): + raise ValueError("must be one of enum values ('Execute', 'Crypto', 'Network', 'Files', 'Memory', 'String', 'Environment', 'File Header', 'Other')") + return value + + 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 AppApiRestV2AgentSchemaCapability 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 AppApiRestV2AgentSchemaCapability from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "function_vaddr": obj.get("function_vaddr"), + "description": obj.get("description"), + "capability": obj.get("capability"), + "type": obj.get("type"), + "function_name": obj.get("function_name"), + "function_id": obj.get("function_id") + }) + return _obj + + diff --git a/revengai/models/capability.py b/revengai/models/app_api_rest_v2_info_types_capability.py similarity index 92% rename from revengai/models/capability.py rename to revengai/models/app_api_rest_v2_info_types_capability.py index 57ff1ee..30b9a03 100644 --- a/revengai/models/capability.py +++ b/revengai/models/app_api_rest_v2_info_types_capability.py @@ -21,9 +21,9 @@ from typing import Optional, Set from typing_extensions import Self -class Capability(BaseModel): +class AppApiRestV2InfoTypesCapability(BaseModel): """ - Capability + AppApiRestV2InfoTypesCapability """ # noqa: E501 function_name: StrictStr = Field(description="The name of the function with a capability") function_vaddr: StrictInt = Field(description="The virtual address of the function where the capability comes from") @@ -48,7 +48,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of Capability from a JSON string""" + """Create an instance of AppApiRestV2InfoTypesCapability from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -73,7 +73,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of Capability from a dict""" + """Create an instance of AppApiRestV2InfoTypesCapability from a dict""" if obj is None: return None diff --git a/revengai/models/base_response_capabilities_agent_response.py b/revengai/models/base_response_capabilities_agent_response.py new file mode 100644 index 0000000..86a16c2 --- /dev/null +++ b/revengai/models/base_response_capabilities_agent_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.capabilities_agent_response import CapabilitiesAgentResponse +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 BaseResponseCapabilitiesAgentResponse(BaseModel): + """ + BaseResponseCapabilitiesAgentResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[CapabilitiesAgentResponse] = 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 BaseResponseCapabilitiesAgentResponse 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 BaseResponseCapabilitiesAgentResponse 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": CapabilitiesAgentResponse.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_queued_workflow_task_response.py b/revengai/models/base_response_queued_workflow_task_response.py new file mode 100644 index 0000000..316775a --- /dev/null +++ b/revengai/models/base_response_queued_workflow_task_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.queued_workflow_task_response import QueuedWorkflowTaskResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseQueuedWorkflowTaskResponse(BaseModel): + """ + BaseResponseQueuedWorkflowTaskResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[QueuedWorkflowTaskResponse] = 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 BaseResponseQueuedWorkflowTaskResponse 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 BaseResponseQueuedWorkflowTaskResponse 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": QueuedWorkflowTaskResponse.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_report_analysis_response.py b/revengai/models/base_response_report_analysis_response.py new file mode 100644 index 0000000..cc76210 --- /dev/null +++ b/revengai/models/base_response_report_analysis_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.report_analysis_response import ReportAnalysisResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseReportAnalysisResponse(BaseModel): + """ + BaseResponseReportAnalysisResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[ReportAnalysisResponse] = 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 BaseResponseReportAnalysisResponse 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 BaseResponseReportAnalysisResponse 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": ReportAnalysisResponse.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_task_status_response.py b/revengai/models/base_response_task_status_response.py new file mode 100644 index 0000000..e86f287 --- /dev/null +++ b/revengai/models/base_response_task_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.task_status_response import TaskStatusResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseTaskStatusResponse(BaseModel): + """ + BaseResponseTaskStatusResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[TaskStatusResponse] = 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 BaseResponseTaskStatusResponse 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 BaseResponseTaskStatusResponse 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": TaskStatusResponse.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_triage_report_response.py b/revengai/models/base_response_triage_report_response.py new file mode 100644 index 0000000..f918565 --- /dev/null +++ b/revengai/models/base_response_triage_report_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.triage_report_response import TriageReportResponse +from typing import Optional, Set +from typing_extensions import Self + +class BaseResponseTriageReportResponse(BaseModel): + """ + BaseResponseTriageReportResponse + """ # noqa: E501 + status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") + data: Optional[TriageReportResponse] = 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 BaseResponseTriageReportResponse 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 BaseResponseTriageReportResponse 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": TriageReportResponse.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/binary_task_status.py b/revengai/models/binary_task_status.py new file mode 100644 index 0000000..c6b9c4b --- /dev/null +++ b/revengai/models/binary_task_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 BinaryTaskStatus(str, Enum): + """ + BinaryTaskStatus + """ + + """ + allowed enum values + """ + UNINITIALISED = 'UNINITIALISED' + PENDING = 'PENDING' + RUNNING = 'RUNNING' + COMPLETED = 'COMPLETED' + FAILED = 'FAILED' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of BinaryTaskStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/revengai/models/capabilities.py b/revengai/models/capabilities.py index 2a43dde..2151393 100644 --- a/revengai/models/capabilities.py +++ b/revengai/models/capabilities.py @@ -18,7 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from revengai.models.capability import Capability +from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability from typing import Optional, Set from typing_extensions import Self @@ -26,7 +26,7 @@ class Capabilities(BaseModel): """ Capabilities """ # noqa: E501 - capabilities: List[Capability] = Field(description="List of capabilities for a given analysis") + capabilities: List[AppApiRestV2InfoTypesCapability] = Field(description="List of capabilities for a given analysis") __properties: ClassVar[List[str]] = ["capabilities"] model_config = ConfigDict( @@ -87,7 +87,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "capabilities": [Capability.from_dict(_item) for _item in obj["capabilities"]] if obj.get("capabilities") is not None else None + "capabilities": [AppApiRestV2InfoTypesCapability.from_dict(_item) for _item in obj["capabilities"]] if obj.get("capabilities") is not None else None }) return _obj diff --git a/revengai/models/capabilities_agent_response.py b/revengai/models/capabilities_agent_response.py new file mode 100644 index 0000000..71166c7 --- /dev/null +++ b/revengai/models/capabilities_agent_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, Field +from typing import Any, ClassVar, Dict, List +from revengai.models.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability +from typing import Optional, Set +from typing_extensions import Self + +class CapabilitiesAgentResponse(BaseModel): + """ + CapabilitiesAgentResponse + """ # noqa: E501 + capabilities: List[AppApiRestV2AgentSchemaCapability] = Field(description="List of enriched capability data") + __properties: ClassVar[List[str]] = ["capabilities"] + + 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 CapabilitiesAgentResponse 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 capabilities (list) + _items = [] + if self.capabilities: + for _item_capabilities in self.capabilities: + if _item_capabilities: + _items.append(_item_capabilities.to_dict()) + _dict['capabilities'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CapabilitiesAgentResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "capabilities": [AppApiRestV2AgentSchemaCapability.from_dict(_item) for _item in obj["capabilities"]] if obj.get("capabilities") is not None else None + }) + return _obj + + diff --git a/revengai/models/ioc.py b/revengai/models/ioc.py new file mode 100644 index 0000000..d387d8c --- /dev/null +++ b/revengai/models/ioc.py @@ -0,0 +1,118 @@ +# 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class IOC(BaseModel): + """ + IOC + """ # noqa: E501 + type: StrictStr = Field(description="Type of the IOC") + value: StrictStr = Field(description="Value of the IOC") + description: StrictStr = Field(description="Description of the IOC") + source: Optional[StrictStr] = None + function_id: Optional[StrictInt] = None + function_name: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["type", "value", "description", "source", "function_id", "function_name"] + + @field_validator('type') + def type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['ip', 'domain', 'url', 'usernames', 'passwords', 'file_hash', 'mutex', 'registry_key', 'filename', 'email', 'c2_endpoint', 'user_agent', 'pem_key', 'ssh_key', 'network_port', 'ja3', 'ssl_cert_fingerprint', 'http_header', 'service', 'scheduled_task', 'pe_header', 'entropy', 'other']): + raise ValueError("must be one of enum values ('ip', 'domain', 'url', 'usernames', 'passwords', 'file_hash', 'mutex', 'registry_key', 'filename', 'email', 'c2_endpoint', 'user_agent', 'pem_key', 'ssh_key', 'network_port', 'ja3', 'ssl_cert_fingerprint', 'http_header', 'service', 'scheduled_task', 'pe_header', 'entropy', 'other')") + return value + + 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 IOC 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, + ) + # set to None if source (nullable) is None + # and model_fields_set contains the field + if self.source is None and "source" in self.model_fields_set: + _dict['source'] = None + + # set to None if function_id (nullable) is None + # and model_fields_set contains the field + if self.function_id is None and "function_id" in self.model_fields_set: + _dict['function_id'] = None + + # set to None if function_name (nullable) is None + # and model_fields_set contains the field + if self.function_name is None and "function_name" in self.model_fields_set: + _dict['function_name'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IOC from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "type": obj.get("type"), + "value": obj.get("value"), + "description": obj.get("description"), + "source": obj.get("source"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name") + }) + return _obj + + diff --git a/revengai/models/mitre_technique.py b/revengai/models/mitre_technique.py new file mode 100644 index 0000000..7595af3 --- /dev/null +++ b/revengai/models/mitre_technique.py @@ -0,0 +1,104 @@ +# 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class MITRETechnique(BaseModel): + """ + MITRETechnique + """ # noqa: E501 + start_addr: StrictStr = Field(description="Starting address of the technique") + end_addr: StrictStr = Field(description="Ending address of the technique") + function_addr: StrictStr = Field(description="Function address where the technique is found") + technique_id: StrictStr = Field(description="MITRE technique identifier") + technique_name: StrictStr = Field(description="Name of the MITRE technique") + description: StrictStr = Field(description="Description of the technique") + function_id: StrictInt = Field(description="Unique identifier of the function containing the technique") + function_name: StrictStr = Field(description="Name of the function containing the technique") + technique_url: StrictStr = Field(description="URL to the MITRE ATT&CK technique page") + technique_description: StrictStr = Field(description="Full description of the MITRE technique from ATT&CK") + __properties: ClassVar[List[str]] = ["start_addr", "end_addr", "function_addr", "technique_id", "technique_name", "description", "function_id", "function_name", "technique_url", "technique_description"] + + 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 MITRETechnique 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 MITRETechnique from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "start_addr": obj.get("start_addr"), + "end_addr": obj.get("end_addr"), + "function_addr": obj.get("function_addr"), + "technique_id": obj.get("technique_id"), + "technique_name": obj.get("technique_name"), + "description": obj.get("description"), + "function_id": obj.get("function_id"), + "function_name": obj.get("function_name"), + "technique_url": obj.get("technique_url"), + "technique_description": obj.get("technique_description") + }) + return _obj + + diff --git a/revengai/models/queued_workflow_task_response.py b/revengai/models/queued_workflow_task_response.py new file mode 100644 index 0000000..c609142 --- /dev/null +++ b/revengai/models/queued_workflow_task_response.py @@ -0,0 +1,86 @@ +# 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 typing import Optional, Set +from typing_extensions import Self + +class QueuedWorkflowTaskResponse(BaseModel): + """ + QueuedWorkflowTaskResponse + """ # noqa: E501 + task_id: StrictStr + __properties: ClassVar[List[str]] = ["task_id"] + + 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 QueuedWorkflowTaskResponse 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 QueuedWorkflowTaskResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "task_id": obj.get("task_id") + }) + return _obj + + diff --git a/revengai/models/report_analysis_response.py b/revengai/models/report_analysis_response.py new file mode 100644 index 0000000..6b21ad6 --- /dev/null +++ b/revengai/models/report_analysis_response.py @@ -0,0 +1,123 @@ +# 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List +from revengai.models.ioc import IOC +from revengai.models.mitre_technique import MITRETechnique +from typing import Optional, Set +from typing_extensions import Self + +class ReportAnalysisResponse(BaseModel): + """ + ReportAnalysisResponse + """ # noqa: E501 + summary: StrictStr = Field(description="A markdown summary of the report") + software_type: StrictStr = Field(description="The type of software being analyzed") + total_number_of_functions: StrictInt = Field(description="The total number of functions identified in the binary") + number_of_analysed_functions: StrictInt = Field(description="The number of functions that were analyzed in the binary") + attack_flow_summary: StrictStr = Field(description="A summary in markdown format of the attack flow") + iocs: List[IOC] = Field(description="A list of IOCs (Indicators of Compromise) found in the analysis", alias="IOCs") + executable_techniques: List[MITRETechnique] = Field(description="A series of MITRE Techniques found") + yara_rule: StrictStr = Field(description="The YARA rule generated for the binary") + __properties: ClassVar[List[str]] = ["summary", "software_type", "total_number_of_functions", "number_of_analysed_functions", "attack_flow_summary", "IOCs", "executable_techniques", "yara_rule"] + + @field_validator('software_type') + def software_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['Malicious', 'Benign', 'Potentially Unwanted Application (PUA)', 'Legitimate', 'Backdoored Legitimate Software']): + raise ValueError("must be one of enum values ('Malicious', 'Benign', 'Potentially Unwanted Application (PUA)', 'Legitimate', 'Backdoored Legitimate Software')") + return value + + 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 ReportAnalysisResponse 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 iocs (list) + _items = [] + if self.iocs: + for _item_iocs in self.iocs: + if _item_iocs: + _items.append(_item_iocs.to_dict()) + _dict['IOCs'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in executable_techniques (list) + _items = [] + if self.executable_techniques: + for _item_executable_techniques in self.executable_techniques: + if _item_executable_techniques: + _items.append(_item_executable_techniques.to_dict()) + _dict['executable_techniques'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ReportAnalysisResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "summary": obj.get("summary"), + "software_type": obj.get("software_type"), + "total_number_of_functions": obj.get("total_number_of_functions"), + "number_of_analysed_functions": obj.get("number_of_analysed_functions"), + "attack_flow_summary": obj.get("attack_flow_summary"), + "IOCs": [IOC.from_dict(_item) for _item in obj["IOCs"]] if obj.get("IOCs") is not None else None, + "executable_techniques": [MITRETechnique.from_dict(_item) for _item in obj["executable_techniques"]] if obj.get("executable_techniques") is not None else None, + "yara_rule": obj.get("yara_rule") + }) + return _obj + + diff --git a/revengai/models/task_status_response.py b/revengai/models/task_status_response.py new file mode 100644 index 0000000..a1c3f3f --- /dev/null +++ b/revengai/models/task_status_response.py @@ -0,0 +1,87 @@ +# 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.binary_task_status import BinaryTaskStatus +from typing import Optional, Set +from typing_extensions import Self + +class TaskStatusResponse(BaseModel): + """ + TaskStatusResponse + """ # noqa: E501 + status: BinaryTaskStatus + __properties: ClassVar[List[str]] = ["status"] + + 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 TaskStatusResponse 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 TaskStatusResponse 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") + }) + return _obj + + diff --git a/revengai/models/triage_function_response.py b/revengai/models/triage_function_response.py new file mode 100644 index 0000000..2210859 --- /dev/null +++ b/revengai/models/triage_function_response.py @@ -0,0 +1,103 @@ +# 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, StrictInt, StrictStr, field_validator +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class TriageFunctionResponse(BaseModel): + """ + TriageFunctionResponse + """ # noqa: E501 + id: StrictInt = Field(description="Unique identifier of the function") + address: StrictInt = Field(description="Address of the function in the binary") + summary: StrictStr = Field(description="Summary of the function's behaviour") + score: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Score indicating the function's relevance") + capabilities: List[StrictStr] = Field(description="List of capabilities exhibited by the function") + __properties: ClassVar[List[str]] = ["id", "address", "summary", "score", "capabilities"] + + @field_validator('capabilities') + def capabilities_validate_enum(cls, value): + """Validates the enum""" + for i in value: + if i not in set(['packing_and_obfuscation', 'defense_evasion', 'privilege_escalation', 'persistence_mechanisms', 'discovery_and_reconnaissance', 'credential_and_data_collection', 'communication_and_c2', 'cryptographic_operations', 'process_and_memory_manipulation', 'process_and_command_execution', 'file_activity']): + raise ValueError("each list item must be one of ('packing_and_obfuscation', 'defense_evasion', 'privilege_escalation', 'persistence_mechanisms', 'discovery_and_reconnaissance', 'credential_and_data_collection', 'communication_and_c2', 'cryptographic_operations', 'process_and_memory_manipulation', 'process_and_command_execution', 'file_activity')") + return value + + 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 TriageFunctionResponse 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 TriageFunctionResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "address": obj.get("address"), + "summary": obj.get("summary"), + "score": obj.get("score"), + "capabilities": obj.get("capabilities") + }) + return _obj + + diff --git a/revengai/models/triage_report_response.py b/revengai/models/triage_report_response.py new file mode 100644 index 0000000..89da961 --- /dev/null +++ b/revengai/models/triage_report_response.py @@ -0,0 +1,99 @@ +# 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, StrictStr +from typing import Any, ClassVar, Dict, List, Union +from typing_extensions import Annotated +from revengai.models.triage_function_response import TriageFunctionResponse +from typing import Optional, Set +from typing_extensions import Self + +class TriageReportResponse(BaseModel): + """ + TriageReportResponse + """ # noqa: E501 + software_score: Union[Annotated[float, Field(le=1, strict=True, ge=0)], Annotated[int, Field(le=1, strict=True, ge=0)]] = Field(description="Overall triage score for the software") + summary: StrictStr = Field(description="Summary of the triage analysis") + functions: List[TriageFunctionResponse] = Field(description="List of triaged functions") + __properties: ClassVar[List[str]] = ["software_score", "summary", "functions"] + + 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 TriageReportResponse 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 functions (list) + _items = [] + if self.functions: + for _item_functions in self.functions: + if _item_functions: + _items.append(_item_functions.to_dict()) + _dict['functions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TriageReportResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "software_score": obj.get("software_score"), + "summary": obj.get("summary"), + "functions": [TriageFunctionResponse.from_dict(_item) for _item in obj["functions"]] if obj.get("functions") is not None else None + }) + return _obj + + diff --git a/test/test_agent_api.py b/test/test_agent_api.py new file mode 100644 index 0000000..ca76840 --- /dev/null +++ b/test/test_agent_api.py @@ -0,0 +1,93 @@ +# 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.agent_api import AgentApi + + +class TestAgentApi(unittest.TestCase): + """AgentApi unit test stubs""" + + def setUp(self) -> None: + self.api = AgentApi() + + def tearDown(self) -> None: + pass + + def test_check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get(self) -> None: + """Test case for check_capabilities_task_status_v2_analyses_analysis_id_agent_capabilities_status_get + + Check the status of a capabilities analysis workflow + """ + pass + + def test_check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get(self) -> None: + """Test case for check_report_analysis_task_status_v2_analyses_analysis_id_agent_report_analysis_status_get + + Check the status of a report analysis workflow + """ + pass + + def test_check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get(self) -> None: + """Test case for check_triage_task_status_v2_analyses_analysis_id_agent_triage_status_get + + Check the status of a triage analysis workflow + """ + pass + + def test_create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post(self) -> None: + """Test case for create_capabilities_task_v2_analyses_analysis_id_agent_capabilities_post + + Queues a capabilities analysis workflow process + """ + pass + + def test_create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post(self) -> None: + """Test case for create_report_analysis_task_v2_analyses_analysis_id_agent_report_analysis_post + + Queues a combined report analysis workflow process + """ + pass + + def test_create_triage_task_v2_analyses_analysis_id_agent_triage_post(self) -> None: + """Test case for create_triage_task_v2_analyses_analysis_id_agent_triage_post + + Queues a triage analysis workflow process + """ + pass + + def test_get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get(self) -> None: + """Test case for get_capabilities_result_v2_analyses_analysis_id_agent_capabilities_get + + Get Capabilities Result + """ + pass + + def test_get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get(self) -> None: + """Test case for get_report_analysis_result_v2_analyses_analysis_id_agent_report_analysis_get + + Get Report Analysis Result + """ + pass + + def test_get_triage_result_v2_analyses_analysis_id_agent_triage_get(self) -> None: + """Test case for get_triage_result_v2_analyses_analysis_id_agent_triage_get + + Get Triage Result + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_app_api_rest_v2_agent_schema_capability.py b/test/test_app_api_rest_v2_agent_schema_capability.py new file mode 100644 index 0000000..5522fef --- /dev/null +++ b/test/test_app_api_rest_v2_agent_schema_capability.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.app_api_rest_v2_agent_schema_capability import AppApiRestV2AgentSchemaCapability + +class TestAppApiRestV2AgentSchemaCapability(unittest.TestCase): + """AppApiRestV2AgentSchemaCapability unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AppApiRestV2AgentSchemaCapability: + """Test AppApiRestV2AgentSchemaCapability + 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 `AppApiRestV2AgentSchemaCapability` + """ + model = AppApiRestV2AgentSchemaCapability() + if include_optional: + return AppApiRestV2AgentSchemaCapability( + function_vaddr = '', + description = '', + capability = '', + type = 'Execute', + function_name = '', + function_id = 56 + ) + else: + return AppApiRestV2AgentSchemaCapability( + function_vaddr = '', + description = '', + capability = '', + type = 'Execute', + function_name = '', + function_id = 56, + ) + """ + + def testAppApiRestV2AgentSchemaCapability(self): + """Test AppApiRestV2AgentSchemaCapability""" + # 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_capability.py b/test/test_app_api_rest_v2_info_types_capability.py similarity index 66% rename from test/test_capability.py rename to test/test_app_api_rest_v2_info_types_capability.py index fb59671..b0527b9 100644 --- a/test/test_capability.py +++ b/test/test_app_api_rest_v2_info_types_capability.py @@ -13,10 +13,10 @@ import unittest -from revengai.models.capability import Capability +from revengai.models.app_api_rest_v2_info_types_capability import AppApiRestV2InfoTypesCapability -class TestCapability(unittest.TestCase): - """Capability unit test stubs""" +class TestAppApiRestV2InfoTypesCapability(unittest.TestCase): + """AppApiRestV2InfoTypesCapability unit test stubs""" def setUp(self): pass @@ -24,16 +24,16 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> Capability: - """Test Capability + def make_instance(self, include_optional) -> AppApiRestV2InfoTypesCapability: + """Test AppApiRestV2InfoTypesCapability 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 `Capability` + # uncomment below to create an instance of `AppApiRestV2InfoTypesCapability` """ - model = Capability() + model = AppApiRestV2InfoTypesCapability() if include_optional: - return Capability( + return AppApiRestV2InfoTypesCapability( function_name = '', function_vaddr = 56, capabilities = [ @@ -41,7 +41,7 @@ def make_instance(self, include_optional) -> Capability: ] ) else: - return Capability( + return AppApiRestV2InfoTypesCapability( function_name = '', function_vaddr = 56, capabilities = [ @@ -50,8 +50,8 @@ def make_instance(self, include_optional) -> Capability: ) """ - def testCapability(self): - """Test Capability""" + def testAppApiRestV2InfoTypesCapability(self): + """Test AppApiRestV2InfoTypesCapability""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_base_response_capabilities_agent_response.py b/test/test_base_response_capabilities_agent_response.py new file mode 100644 index 0000000..8ce30d6 --- /dev/null +++ b/test/test_base_response_capabilities_agent_response.py @@ -0,0 +1,71 @@ +# 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_capabilities_agent_response import BaseResponseCapabilitiesAgentResponse + +class TestBaseResponseCapabilitiesAgentResponse(unittest.TestCase): + """BaseResponseCapabilitiesAgentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseCapabilitiesAgentResponse: + """Test BaseResponseCapabilitiesAgentResponse + 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 `BaseResponseCapabilitiesAgentResponse` + """ + model = BaseResponseCapabilitiesAgentResponse() + if include_optional: + return BaseResponseCapabilitiesAgentResponse( + status = True, + data = revengai.models.capabilities_agent_response.CapabilitiesAgentResponse( + capabilities = [ + revengai.models.capability.Capability( + function_vaddr = '', + description = '', + capability = '', + type = 'Execute', + function_name = '', + function_id = 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 BaseResponseCapabilitiesAgentResponse( + ) + """ + + def testBaseResponseCapabilitiesAgentResponse(self): + """Test BaseResponseCapabilitiesAgentResponse""" + # 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_queued_workflow_task_response.py b/test/test_base_response_queued_workflow_task_response.py new file mode 100644 index 0000000..b570c94 --- /dev/null +++ b/test/test_base_response_queued_workflow_task_response.py @@ -0,0 +1,63 @@ +# 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_queued_workflow_task_response import BaseResponseQueuedWorkflowTaskResponse + +class TestBaseResponseQueuedWorkflowTaskResponse(unittest.TestCase): + """BaseResponseQueuedWorkflowTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseQueuedWorkflowTaskResponse: + """Test BaseResponseQueuedWorkflowTaskResponse + 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 `BaseResponseQueuedWorkflowTaskResponse` + """ + model = BaseResponseQueuedWorkflowTaskResponse() + if include_optional: + return BaseResponseQueuedWorkflowTaskResponse( + status = True, + data = revengai.models.queued_workflow_task_response.QueuedWorkflowTaskResponse( + task_id = '', ), + 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 BaseResponseQueuedWorkflowTaskResponse( + ) + """ + + def testBaseResponseQueuedWorkflowTaskResponse(self): + """Test BaseResponseQueuedWorkflowTaskResponse""" + # 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_report_analysis_response.py b/test/test_base_response_report_analysis_response.py new file mode 100644 index 0000000..25b274b --- /dev/null +++ b/test/test_base_response_report_analysis_response.py @@ -0,0 +1,90 @@ +# 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_report_analysis_response import BaseResponseReportAnalysisResponse + +class TestBaseResponseReportAnalysisResponse(unittest.TestCase): + """BaseResponseReportAnalysisResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseReportAnalysisResponse: + """Test BaseResponseReportAnalysisResponse + 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 `BaseResponseReportAnalysisResponse` + """ + model = BaseResponseReportAnalysisResponse() + if include_optional: + return BaseResponseReportAnalysisResponse( + status = True, + data = revengai.models.report_analysis_response.ReportAnalysisResponse( + summary = '', + software_type = 'Malicious', + total_number_of_functions = 56, + number_of_analysed_functions = 56, + attack_flow_summary = '', + iocs = [ + revengai.models.ioc.IOC( + type = 'ip', + value = '', + description = '', + source = '', + function_id = 56, + function_name = '', ) + ], + executable_techniques = [ + revengai.models.mitre_technique.MITRETechnique( + start_addr = '', + end_addr = '', + function_addr = '', + technique_id = '', + technique_name = '', + description = '', + function_id = 56, + function_name = '', + technique_url = '', + technique_description = '', ) + ], + yara_rule = '', ), + 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 BaseResponseReportAnalysisResponse( + ) + """ + + def testBaseResponseReportAnalysisResponse(self): + """Test BaseResponseReportAnalysisResponse""" + # 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_task_status_response.py b/test/test_base_response_task_status_response.py new file mode 100644 index 0000000..b757097 --- /dev/null +++ b/test/test_base_response_task_status_response.py @@ -0,0 +1,63 @@ +# 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_task_status_response import BaseResponseTaskStatusResponse + +class TestBaseResponseTaskStatusResponse(unittest.TestCase): + """BaseResponseTaskStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseTaskStatusResponse: + """Test BaseResponseTaskStatusResponse + 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 `BaseResponseTaskStatusResponse` + """ + model = BaseResponseTaskStatusResponse() + if include_optional: + return BaseResponseTaskStatusResponse( + status = True, + data = revengai.models.task_status_response.TaskStatusResponse( + status = 'UNINITIALISED', ), + 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 BaseResponseTaskStatusResponse( + ) + """ + + def testBaseResponseTaskStatusResponse(self): + """Test BaseResponseTaskStatusResponse""" + # 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_triage_report_response.py b/test/test_base_response_triage_report_response.py new file mode 100644 index 0000000..5e6cfec --- /dev/null +++ b/test/test_base_response_triage_report_response.py @@ -0,0 +1,74 @@ +# 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_triage_report_response import BaseResponseTriageReportResponse + +class TestBaseResponseTriageReportResponse(unittest.TestCase): + """BaseResponseTriageReportResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseTriageReportResponse: + """Test BaseResponseTriageReportResponse + 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 `BaseResponseTriageReportResponse` + """ + model = BaseResponseTriageReportResponse() + if include_optional: + return BaseResponseTriageReportResponse( + status = True, + data = revengai.models.triage_report_response.TriageReportResponse( + software_score = 0, + summary = '', + functions = [ + revengai.models.triage_function_response.TriageFunctionResponse( + id = 56, + address = 56, + summary = '', + score = 0, + capabilities = [ + 'packing_and_obfuscation' + ], ) + ], ), + 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 BaseResponseTriageReportResponse( + ) + """ + + def testBaseResponseTriageReportResponse(self): + """Test BaseResponseTriageReportResponse""" + # 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_binary_task_status.py b/test/test_binary_task_status.py new file mode 100644 index 0000000..0bf0b42 --- /dev/null +++ b/test/test_binary_task_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.binary_task_status import BinaryTaskStatus + +class TestBinaryTaskStatus(unittest.TestCase): + """BinaryTaskStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testBinaryTaskStatus(self): + """Test BinaryTaskStatus""" + # inst = BinaryTaskStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_capabilities_agent_response.py b/test/test_capabilities_agent_response.py new file mode 100644 index 0000000..35bfd82 --- /dev/null +++ b/test/test_capabilities_agent_response.py @@ -0,0 +1,67 @@ +# 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.capabilities_agent_response import CapabilitiesAgentResponse + +class TestCapabilitiesAgentResponse(unittest.TestCase): + """CapabilitiesAgentResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CapabilitiesAgentResponse: + """Test CapabilitiesAgentResponse + 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 `CapabilitiesAgentResponse` + """ + model = CapabilitiesAgentResponse() + if include_optional: + return CapabilitiesAgentResponse( + capabilities = [ + revengai.models.capability.Capability( + function_vaddr = '', + description = '', + capability = '', + type = 'Execute', + function_name = '', + function_id = 56, ) + ] + ) + else: + return CapabilitiesAgentResponse( + capabilities = [ + revengai.models.capability.Capability( + function_vaddr = '', + description = '', + capability = '', + type = 'Execute', + function_name = '', + function_id = 56, ) + ], + ) + """ + + def testCapabilitiesAgentResponse(self): + """Test CapabilitiesAgentResponse""" + # 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_ioc.py b/test/test_ioc.py new file mode 100644 index 0000000..014e778 --- /dev/null +++ b/test/test_ioc.py @@ -0,0 +1,58 @@ +# 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.ioc import IOC + +class TestIOC(unittest.TestCase): + """IOC unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IOC: + """Test IOC + 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 `IOC` + """ + model = IOC() + if include_optional: + return IOC( + type = 'ip', + value = '', + description = '', + source = '', + function_id = 56, + function_name = '' + ) + else: + return IOC( + type = 'ip', + value = '', + description = '', + ) + """ + + def testIOC(self): + """Test IOC""" + # 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_mitre_technique.py b/test/test_mitre_technique.py new file mode 100644 index 0000000..eef280c --- /dev/null +++ b/test/test_mitre_technique.py @@ -0,0 +1,69 @@ +# 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.mitre_technique import MITRETechnique + +class TestMITRETechnique(unittest.TestCase): + """MITRETechnique unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> MITRETechnique: + """Test MITRETechnique + 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 `MITRETechnique` + """ + model = MITRETechnique() + if include_optional: + return MITRETechnique( + start_addr = '', + end_addr = '', + function_addr = '', + technique_id = '', + technique_name = '', + description = '', + function_id = 56, + function_name = '', + technique_url = '', + technique_description = '' + ) + else: + return MITRETechnique( + start_addr = '', + end_addr = '', + function_addr = '', + technique_id = '', + technique_name = '', + description = '', + function_id = 56, + function_name = '', + technique_url = '', + technique_description = '', + ) + """ + + def testMITRETechnique(self): + """Test MITRETechnique""" + # 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_queued_workflow_task_response.py b/test/test_queued_workflow_task_response.py new file mode 100644 index 0000000..670f209 --- /dev/null +++ b/test/test_queued_workflow_task_response.py @@ -0,0 +1,51 @@ +# 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.queued_workflow_task_response import QueuedWorkflowTaskResponse + +class TestQueuedWorkflowTaskResponse(unittest.TestCase): + """QueuedWorkflowTaskResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> QueuedWorkflowTaskResponse: + """Test QueuedWorkflowTaskResponse + 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 `QueuedWorkflowTaskResponse` + """ + model = QueuedWorkflowTaskResponse() + if include_optional: + return QueuedWorkflowTaskResponse( + task_id = '' + ) + else: + return QueuedWorkflowTaskResponse( + task_id = '', + ) + """ + + def testQueuedWorkflowTaskResponse(self): + """Test QueuedWorkflowTaskResponse""" + # 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_report_analysis_response.py b/test/test_report_analysis_response.py new file mode 100644 index 0000000..5c44bd0 --- /dev/null +++ b/test/test_report_analysis_response.py @@ -0,0 +1,105 @@ +# 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.report_analysis_response import ReportAnalysisResponse + +class TestReportAnalysisResponse(unittest.TestCase): + """ReportAnalysisResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ReportAnalysisResponse: + """Test ReportAnalysisResponse + 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 `ReportAnalysisResponse` + """ + model = ReportAnalysisResponse() + if include_optional: + return ReportAnalysisResponse( + summary = '', + software_type = 'Malicious', + total_number_of_functions = 56, + number_of_analysed_functions = 56, + attack_flow_summary = '', + iocs = [ + revengai.models.ioc.IOC( + type = 'ip', + value = '', + description = '', + source = '', + function_id = 56, + function_name = '', ) + ], + executable_techniques = [ + revengai.models.mitre_technique.MITRETechnique( + start_addr = '', + end_addr = '', + function_addr = '', + technique_id = '', + technique_name = '', + description = '', + function_id = 56, + function_name = '', + technique_url = '', + technique_description = '', ) + ], + yara_rule = '' + ) + else: + return ReportAnalysisResponse( + summary = '', + software_type = 'Malicious', + total_number_of_functions = 56, + number_of_analysed_functions = 56, + attack_flow_summary = '', + iocs = [ + revengai.models.ioc.IOC( + type = 'ip', + value = '', + description = '', + source = '', + function_id = 56, + function_name = '', ) + ], + executable_techniques = [ + revengai.models.mitre_technique.MITRETechnique( + start_addr = '', + end_addr = '', + function_addr = '', + technique_id = '', + technique_name = '', + description = '', + function_id = 56, + function_name = '', + technique_url = '', + technique_description = '', ) + ], + yara_rule = '', + ) + """ + + def testReportAnalysisResponse(self): + """Test ReportAnalysisResponse""" + # 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_task_status_response.py b/test/test_task_status_response.py new file mode 100644 index 0000000..4403d34 --- /dev/null +++ b/test/test_task_status_response.py @@ -0,0 +1,51 @@ +# 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.task_status_response import TaskStatusResponse + +class TestTaskStatusResponse(unittest.TestCase): + """TaskStatusResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TaskStatusResponse: + """Test TaskStatusResponse + 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 `TaskStatusResponse` + """ + model = TaskStatusResponse() + if include_optional: + return TaskStatusResponse( + status = 'UNINITIALISED' + ) + else: + return TaskStatusResponse( + status = 'UNINITIALISED', + ) + """ + + def testTaskStatusResponse(self): + """Test TaskStatusResponse""" + # 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_triage_function_response.py b/test/test_triage_function_response.py new file mode 100644 index 0000000..935b213 --- /dev/null +++ b/test/test_triage_function_response.py @@ -0,0 +1,63 @@ +# 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.triage_function_response import TriageFunctionResponse + +class TestTriageFunctionResponse(unittest.TestCase): + """TriageFunctionResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TriageFunctionResponse: + """Test TriageFunctionResponse + 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 `TriageFunctionResponse` + """ + model = TriageFunctionResponse() + if include_optional: + return TriageFunctionResponse( + id = 56, + address = 56, + summary = '', + score = 0, + capabilities = [ + 'packing_and_obfuscation' + ] + ) + else: + return TriageFunctionResponse( + id = 56, + address = 56, + summary = '', + score = 0, + capabilities = [ + 'packing_and_obfuscation' + ], + ) + """ + + def testTriageFunctionResponse(self): + """Test TriageFunctionResponse""" + # 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_triage_report_response.py b/test/test_triage_report_response.py new file mode 100644 index 0000000..4993661 --- /dev/null +++ b/test/test_triage_report_response.py @@ -0,0 +1,73 @@ +# 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.triage_report_response import TriageReportResponse + +class TestTriageReportResponse(unittest.TestCase): + """TriageReportResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TriageReportResponse: + """Test TriageReportResponse + 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 `TriageReportResponse` + """ + model = TriageReportResponse() + if include_optional: + return TriageReportResponse( + software_score = 0, + summary = '', + functions = [ + revengai.models.triage_function_response.TriageFunctionResponse( + id = 56, + address = 56, + summary = '', + score = 0, + capabilities = [ + 'packing_and_obfuscation' + ], ) + ] + ) + else: + return TriageReportResponse( + software_score = 0, + summary = '', + functions = [ + revengai.models.triage_function_response.TriageFunctionResponse( + id = 56, + address = 56, + summary = '', + score = 0, + capabilities = [ + 'packing_and_obfuscation' + ], ) + ], + ) + """ + + def testTriageReportResponse(self): + """Test TriageReportResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()