diff --git a/.sdk-version b/.sdk-version index 0c29db7..d5475e2 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.16.0 +v2.18.2 diff --git a/README.md b/README.md index b084050..74f6c16 100644 --- a/README.md +++ b/README.md @@ -133,12 +133,9 @@ Class | Method | HTTP request | Description *FunctionsDataTypesApi* | [**list_function_data_types_for_analysis**](docs/FunctionsDataTypesApi.md#list_function_data_types_for_analysis) | **GET** /v2/analyses/{analysis_id}/functions/data_types | List Function Data Types *FunctionsDataTypesApi* | [**list_function_data_types_for_functions**](docs/FunctionsDataTypesApi.md#list_function_data_types_for_functions) | **GET** /v2/functions/data_types | List Function Data Types *FunctionsDataTypesApi* | [**update_function_data_types**](docs/FunctionsDataTypesApi.md#update_function_data_types) | **PUT** /v2/analyses/{analysis_id}/functions/{function_id}/data_types | Update Function Data Types -*FunctionsDecompilationApi* | [**check_function_decompilation_task**](docs/FunctionsDecompilationApi.md#check_function_decompilation_task) | **GET** /v2/functions/{function_id}/decompilation/status | Check the status of a function decompilation *FunctionsDecompilationApi* | [**create_decompilation_comment**](docs/FunctionsDecompilationApi.md#create_decompilation_comment) | **POST** /v2/functions/{function_id}/decompilation/comments | Create a comment for this function -*FunctionsDecompilationApi* | [**create_function_decompilation_task**](docs/FunctionsDecompilationApi.md#create_function_decompilation_task) | **POST** /v2/functions/{function_id}/decompilation | Queues a function decompilation *FunctionsDecompilationApi* | [**delete_decompilation_comment**](docs/FunctionsDecompilationApi.md#delete_decompilation_comment) | **DELETE** /v2/functions/{function_id}/decompilation/comments/{comment_id} | Delete a comment *FunctionsDecompilationApi* | [**get_decompilation_comments**](docs/FunctionsDecompilationApi.md#get_decompilation_comments) | **GET** /v2/functions/{function_id}/decompilation/comments | Get comments for this function -*FunctionsDecompilationApi* | [**get_function_decompilation**](docs/FunctionsDecompilationApi.md#get_function_decompilation) | **GET** /v2/functions/{function_id}/decompilation | Get decompilation result *FunctionsDecompilationApi* | [**update_decompilation_comment**](docs/FunctionsDecompilationApi.md#update_decompilation_comment) | **PATCH** /v2/functions/{function_id}/decompilation/comments/{comment_id} | Update a comment *FunctionsRenamingHistoryApi* | [**batch_rename_function**](docs/FunctionsRenamingHistoryApi.md#batch_rename_function) | **POST** /v2/functions/rename/batch | Batch Rename Functions *FunctionsRenamingHistoryApi* | [**get_function_name_history**](docs/FunctionsRenamingHistoryApi.md#get_function_name_history) | **GET** /v2/functions/history/{function_id} | Get Function Name History @@ -210,7 +207,6 @@ Class | Method | HTTP request | Description - [BaseResponseCommentResponse](docs/BaseResponseCommentResponse.md) - [BaseResponseCommunities](docs/BaseResponseCommunities.md) - [BaseResponseCreated](docs/BaseResponseCreated.md) - - [BaseResponseDecompilationResponse](docs/BaseResponseDecompilationResponse.md) - [BaseResponseDict](docs/BaseResponseDict.md) - [BaseResponseDynamicExecutionStatus](docs/BaseResponseDynamicExecutionStatus.md) - [BaseResponseExternalResponse](docs/BaseResponseExternalResponse.md) @@ -297,7 +293,6 @@ Class | Method | HTTP request | Description - [Context](docs/Context.md) - [Created](docs/Created.md) - [DecompilationCommentContext](docs/DecompilationCommentContext.md) - - [DecompilationResponse](docs/DecompilationResponse.md) - [DieMatch](docs/DieMatch.md) - [DynamicExecutionStatusInput](docs/DynamicExecutionStatusInput.md) - [ELFImportModel](docs/ELFImportModel.md) diff --git a/docs/BaseResponseDecompilationResponse.md b/docs/BaseResponseDecompilationResponse.md deleted file mode 100644 index 5c7d6b0..0000000 --- a/docs/BaseResponseDecompilationResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# BaseResponseDecompilationResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**DecompilationResponse**](DecompilationResponse.md) | | [optional] -**message** | **str** | | [optional] -**errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] -**meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] - -## Example - -```python -from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of BaseResponseDecompilationResponse from a JSON string -base_response_decompilation_response_instance = BaseResponseDecompilationResponse.from_json(json) -# print the JSON string representation of the object -print(BaseResponseDecompilationResponse.to_json()) - -# convert the object into a dict -base_response_decompilation_response_dict = base_response_decompilation_response_instance.to_dict() -# create an instance of BaseResponseDecompilationResponse from a dict -base_response_decompilation_response_from_dict = BaseResponseDecompilationResponse.from_dict(base_response_decompilation_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/DecompilationResponse.md b/docs/DecompilationResponse.md deleted file mode 100644 index d1ace6d..0000000 --- a/docs/DecompilationResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# DecompilationResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**function_id** | **int** | The ID of the function | -**decompilation** | **str** | | -**calling_convention** | **str** | | - -## Example - -```python -from revengai.models.decompilation_response import DecompilationResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of DecompilationResponse from a JSON string -decompilation_response_instance = DecompilationResponse.from_json(json) -# print the JSON string representation of the object -print(DecompilationResponse.to_json()) - -# convert the object into a dict -decompilation_response_dict = decompilation_response_instance.to_dict() -# create an instance of DecompilationResponse from a dict -decompilation_response_from_dict = DecompilationResponse.from_dict(decompilation_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/FunctionsDecompilationApi.md b/docs/FunctionsDecompilationApi.md index a101ec0..5550224 100644 --- a/docs/FunctionsDecompilationApi.md +++ b/docs/FunctionsDecompilationApi.md @@ -4,93 +4,12 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- -[**check_function_decompilation_task**](FunctionsDecompilationApi.md#check_function_decompilation_task) | **GET** /v2/functions/{function_id}/decompilation/status | Check the status of a function decompilation [**create_decompilation_comment**](FunctionsDecompilationApi.md#create_decompilation_comment) | **POST** /v2/functions/{function_id}/decompilation/comments | Create a comment for this function -[**create_function_decompilation_task**](FunctionsDecompilationApi.md#create_function_decompilation_task) | **POST** /v2/functions/{function_id}/decompilation | Queues a function decompilation [**delete_decompilation_comment**](FunctionsDecompilationApi.md#delete_decompilation_comment) | **DELETE** /v2/functions/{function_id}/decompilation/comments/{comment_id} | Delete a comment [**get_decompilation_comments**](FunctionsDecompilationApi.md#get_decompilation_comments) | **GET** /v2/functions/{function_id}/decompilation/comments | Get comments for this function -[**get_function_decompilation**](FunctionsDecompilationApi.md#get_function_decompilation) | **GET** /v2/functions/{function_id}/decompilation | Get decompilation result [**update_decompilation_comment**](FunctionsDecompilationApi.md#update_decompilation_comment) | **PATCH** /v2/functions/{function_id}/decompilation/comments/{comment_id} | Update a comment -# **check_function_decompilation_task** -> BaseResponseFunctionTaskResponse check_function_decompilation_task(function_id) - -Check the status of a function decompilation - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse -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.FunctionsDecompilationApi(api_client) - function_id = 56 # int | - - try: - # Check the status of a function decompilation - api_response = api_instance.check_function_decompilation_task(function_id) - print("The response of FunctionsDecompilationApi->check_function_decompilation_task:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsDecompilationApi->check_function_decompilation_task: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - -### Return type - -[**BaseResponseFunctionTaskResponse**](BaseResponseFunctionTaskResponse.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_decompilation_comment** > BaseResponseCommentResponse create_decompilation_comment(function_id, function_comment_create_request) @@ -175,85 +94,6 @@ Name | Type | Description | Notes [[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_function_decompilation_task** -> BaseResponseStr create_function_decompilation_task(function_id) - -Queues a function decompilation - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_str import BaseResponseStr -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.FunctionsDecompilationApi(api_client) - function_id = 56 # int | - - try: - # Queues a function decompilation - api_response = api_instance.create_function_decompilation_task(function_id) - print("The response of FunctionsDecompilationApi->create_function_decompilation_task:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsDecompilationApi->create_function_decompilation_task: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - -### Return type - -[**BaseResponseStr**](BaseResponseStr.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** | Security checks already extracted 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) - # **delete_decompilation_comment** > BaseResponseBool delete_decompilation_comment(comment_id, function_id) @@ -418,85 +258,6 @@ Name | Type | Description | Notes [[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_function_decompilation** -> BaseResponseDecompilationResponse get_function_decompilation(function_id) - -Get decompilation result - -### Example - -* Api Key Authentication (APIKey): - -```python -import revengai -from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse -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.FunctionsDecompilationApi(api_client) - function_id = 56 # int | - - try: - # Get decompilation result - api_response = api_instance.get_function_decompilation(function_id) - print("The response of FunctionsDecompilationApi->get_function_decompilation:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling FunctionsDecompilationApi->get_function_decompilation: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **function_id** | **int**| | - -### Return type - -[**BaseResponseDecompilationResponse**](BaseResponseDecompilationResponse.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 | - | -**404** | Unable to find a decompilation for the function_id given | - | - -[[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) - # **update_decompilation_comment** > BaseResponseCommentResponse update_decompilation_comment(comment_id, function_id, comment_update_request) diff --git a/docs/ModelName.md b/docs/ModelName.md index aaa0718..e326521 100644 --- a/docs/ModelName.md +++ b/docs/ModelName.md @@ -4,21 +4,17 @@ Custom enum for the model name ## Enum -* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_WINDOWS` (value: `'binnet-0.5-x86-windows'`) +* `BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_64_MINUS_WINDOWS` (value: `'binnet-0.7-x86-64-windows'`) -* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_LINUX` (value: `'binnet-0.5-x86-linux'`) +* `BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_64_MINUS_LINUX` (value: `'binnet-0.7-x86-64-linux'`) -* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_MACOS` (value: `'binnet-0.5-x86-macos'`) +* `BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_32_MINUS_WINDOWS` (value: `'binnet-0.7-x86-32-windows'`) -* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_ANDROID` (value: `'binnet-0.5-x86-android'`) +* `BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_32_MINUS_LINUX` (value: `'binnet-0.7-x86-32-linux'`) -* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_WINDOWS` (value: `'binnet-0.5-x86-32-windows'`) +* `BINNET_MINUS_0_DOT_7_MINUS_ARM_MINUS_64_MINUS_WINDOWS` (value: `'binnet-0.7-arm-64-windows'`) -* `BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_LINUX` (value: `'binnet-0.5-x86-32-linux'`) - -* `BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_WINDOWS` (value: `'binnet-0.5-arm-64-windows'`) - -* `BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_LINUX` (value: `'binnet-0.5-arm-64-linux'`) +* `BINNET_MINUS_0_DOT_7_MINUS_ARM_MINUS_64_MINUS_LINUX` (value: `'binnet-0.7-arm-64-linux'`) [[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 b38b223..a0c1c64 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.16.0" +__version__ = "v2.18.2" # Define package exports __all__ = [ @@ -102,7 +102,6 @@ "BaseResponseCommentResponse", "BaseResponseCommunities", "BaseResponseCreated", - "BaseResponseDecompilationResponse", "BaseResponseDict", "BaseResponseDynamicExecutionStatus", "BaseResponseExternalResponse", @@ -189,7 +188,6 @@ "Context", "Created", "DecompilationCommentContext", - "DecompilationResponse", "DieMatch", "DynamicExecutionStatusInput", "ELFImportModel", @@ -430,7 +428,6 @@ from revengai.models.base_response_comment_response import BaseResponseCommentResponse as BaseResponseCommentResponse from revengai.models.base_response_communities import BaseResponseCommunities as BaseResponseCommunities from revengai.models.base_response_created import BaseResponseCreated as BaseResponseCreated -from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse as BaseResponseDecompilationResponse from revengai.models.base_response_dict import BaseResponseDict as BaseResponseDict from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus as BaseResponseDynamicExecutionStatus from revengai.models.base_response_external_response import BaseResponseExternalResponse as BaseResponseExternalResponse @@ -517,7 +514,6 @@ from revengai.models.context import Context as Context from revengai.models.created import Created as Created from revengai.models.decompilation_comment_context import DecompilationCommentContext as DecompilationCommentContext -from revengai.models.decompilation_response import DecompilationResponse as DecompilationResponse from revengai.models.die_match import DieMatch as DieMatch from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput as DynamicExecutionStatusInput from revengai.models.elf_import_model import ELFImportModel as ELFImportModel diff --git a/revengai/api/functions_decompilation_api.py b/revengai/api/functions_decompilation_api.py index 0e598a2..fce3800 100644 --- a/revengai/api/functions_decompilation_api.py +++ b/revengai/api/functions_decompilation_api.py @@ -19,10 +19,7 @@ from typing_extensions import Annotated from revengai.models.base_response_bool import BaseResponseBool from revengai.models.base_response_comment_response import BaseResponseCommentResponse -from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse -from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse -from revengai.models.base_response_str import BaseResponseStr from revengai.models.comment_update_request import CommentUpdateRequest from revengai.models.function_comment_create_request import FunctionCommentCreateRequest @@ -45,830 +42,10 @@ def __init__(self, api_client=None) -> None: @validate_call - def check_function_decompilation_task( - self, - function_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, - ) -> BaseResponseFunctionTaskResponse: - """Check the status of a function decompilation - - - :param function_id: (required) - :type function_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_function_decompilation_task_serialize( - function_id=function_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '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_function_decompilation_task_with_http_info( - self, - function_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[BaseResponseFunctionTaskResponse]: - """Check the status of a function decompilation - - - :param function_id: (required) - :type function_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_function_decompilation_task_serialize( - function_id=function_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '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_function_decompilation_task_without_preload_content( - self, - function_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 function decompilation - - - :param function_id: (required) - :type function_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_function_decompilation_task_serialize( - function_id=function_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseFunctionTaskResponse", - '422': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _check_function_decompilation_task_serialize( - self, - function_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 function_id is not None: - _path_params['function_id'] = function_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/functions/{function_id}/decompilation/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_decompilation_comment( - self, - function_id: StrictInt, - function_comment_create_request: FunctionCommentCreateRequest, - _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, - ) -> BaseResponseCommentResponse: - """Create a comment for this function - - Creates a comment associated with a specified function). - - :param function_id: (required) - :type function_id: int - :param function_comment_create_request: (required) - :type function_comment_create_request: FunctionCommentCreateRequest - :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_decompilation_comment_serialize( - function_id=function_id, - function_comment_create_request=function_comment_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCommentResponse", - '422': "BaseResponse", - '400': "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_decompilation_comment_with_http_info( - self, - function_id: StrictInt, - function_comment_create_request: FunctionCommentCreateRequest, - _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[BaseResponseCommentResponse]: - """Create a comment for this function - - Creates a comment associated with a specified function). - - :param function_id: (required) - :type function_id: int - :param function_comment_create_request: (required) - :type function_comment_create_request: FunctionCommentCreateRequest - :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_decompilation_comment_serialize( - function_id=function_id, - function_comment_create_request=function_comment_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCommentResponse", - '422': "BaseResponse", - '400': "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_decompilation_comment_without_preload_content( - self, - function_id: StrictInt, - function_comment_create_request: FunctionCommentCreateRequest, - _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: - """Create a comment for this function - - Creates a comment associated with a specified function). - - :param function_id: (required) - :type function_id: int - :param function_comment_create_request: (required) - :type function_comment_create_request: FunctionCommentCreateRequest - :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_decompilation_comment_serialize( - function_id=function_id, - function_comment_create_request=function_comment_create_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "BaseResponseCommentResponse", - '422': "BaseResponse", - '400': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_decompilation_comment_serialize( - self, - function_id, - function_comment_create_request, - _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 function_id is not None: - _path_params['function_id'] = function_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if function_comment_create_request is not None: - _body_params = function_comment_create_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'APIKey' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v2/functions/{function_id}/decompilation/comments', - 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_function_decompilation_task( - self, - function_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, - ) -> BaseResponseStr: - """Queues a function decompilation - - - :param function_id: (required) - :type function_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_function_decompilation_task_serialize( - function_id=function_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseStr", - '422': "BaseResponse", - '409': "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_function_decompilation_task_with_http_info( - self, - function_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[BaseResponseStr]: - """Queues a function decompilation - - - :param function_id: (required) - :type function_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_function_decompilation_task_serialize( - function_id=function_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseStr", - '422': "BaseResponse", - '409': "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_function_decompilation_task_without_preload_content( - self, - function_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 function decompilation - - - :param function_id: (required) - :type function_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_function_decompilation_task_serialize( - function_id=function_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '202': "BaseResponseStr", - '422': "BaseResponse", - '409': "BaseResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_function_decompilation_task_serialize( - self, - function_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 function_id is not None: - _path_params['function_id'] = function_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/functions/{function_id}/decompilation', - 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 delete_decompilation_comment( + def create_decompilation_comment( self, - comment_id: Annotated[int, Field(strict=True, ge=1)], function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -881,15 +58,15 @@ def delete_decompilation_comment( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseBool: - """Delete a comment + ) -> BaseResponseCommentResponse: + """Create a comment for this function - Deletes an existing comment. Users can only delete their own comments. + Creates a comment associated with a specified function). - :param comment_id: (required) - :type comment_id: int :param function_id: (required) :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest :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 @@ -912,9 +89,9 @@ def delete_decompilation_comment( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_decompilation_comment_serialize( - comment_id=comment_id, + _param = self._create_decompilation_comment_serialize( function_id=function_id, + function_comment_create_request=function_comment_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -922,9 +99,8 @@ def delete_decompilation_comment( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseBool", + '201': "BaseResponseCommentResponse", '422': "BaseResponse", - '403': "BaseResponse", '400': "BaseResponse", } response_data = self.api_client.call_api( @@ -939,10 +115,10 @@ def delete_decompilation_comment( @validate_call - def delete_decompilation_comment_with_http_info( + def create_decompilation_comment_with_http_info( self, - comment_id: Annotated[int, Field(strict=True, ge=1)], function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -955,15 +131,15 @@ def delete_decompilation_comment_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseBool]: - """Delete a comment + ) -> ApiResponse[BaseResponseCommentResponse]: + """Create a comment for this function - Deletes an existing comment. Users can only delete their own comments. + Creates a comment associated with a specified function). - :param comment_id: (required) - :type comment_id: int :param function_id: (required) :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest :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 @@ -986,9 +162,9 @@ def delete_decompilation_comment_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_decompilation_comment_serialize( - comment_id=comment_id, + _param = self._create_decompilation_comment_serialize( function_id=function_id, + function_comment_create_request=function_comment_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -996,9 +172,8 @@ def delete_decompilation_comment_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseBool", + '201': "BaseResponseCommentResponse", '422': "BaseResponse", - '403': "BaseResponse", '400': "BaseResponse", } response_data = self.api_client.call_api( @@ -1013,10 +188,10 @@ def delete_decompilation_comment_with_http_info( @validate_call - def delete_decompilation_comment_without_preload_content( + def create_decompilation_comment_without_preload_content( self, - comment_id: Annotated[int, Field(strict=True, ge=1)], function_id: StrictInt, + function_comment_create_request: FunctionCommentCreateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -1030,14 +205,14 @@ def delete_decompilation_comment_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Delete a comment + """Create a comment for this function - Deletes an existing comment. Users can only delete their own comments. + Creates a comment associated with a specified function). - :param comment_id: (required) - :type comment_id: int :param function_id: (required) :type function_id: int + :param function_comment_create_request: (required) + :type function_comment_create_request: FunctionCommentCreateRequest :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 @@ -1060,9 +235,9 @@ def delete_decompilation_comment_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._delete_decompilation_comment_serialize( - comment_id=comment_id, + _param = self._create_decompilation_comment_serialize( function_id=function_id, + function_comment_create_request=function_comment_create_request, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -1070,9 +245,8 @@ def delete_decompilation_comment_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseBool", + '201': "BaseResponseCommentResponse", '422': "BaseResponse", - '403': "BaseResponse", '400': "BaseResponse", } response_data = self.api_client.call_api( @@ -1082,10 +256,10 @@ def delete_decompilation_comment_without_preload_content( return response_data.response - def _delete_decompilation_comment_serialize( + def _create_decompilation_comment_serialize( self, - comment_id, function_id, + function_comment_create_request, _request_auth, _content_type, _headers, @@ -1107,14 +281,14 @@ def _delete_decompilation_comment_serialize( _body_params: Optional[bytes] = None # process the path parameters - if comment_id is not None: - _path_params['comment_id'] = comment_id if function_id is not None: _path_params['function_id'] = function_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + if function_comment_create_request is not None: + _body_params = function_comment_create_request # set the HTTP header `Accept` @@ -1125,6 +299,19 @@ def _delete_decompilation_comment_serialize( ] ) + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -1132,8 +319,8 @@ def _delete_decompilation_comment_serialize( ] return self.api_client.param_serialize( - method='DELETE', - resource_path='/v2/functions/{function_id}/decompilation/comments/{comment_id}', + method='POST', + resource_path='/v2/functions/{function_id}/decompilation/comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1150,8 +337,9 @@ def _delete_decompilation_comment_serialize( @validate_call - def get_decompilation_comments( + def delete_decompilation_comment( self, + comment_id: Annotated[int, Field(strict=True, ge=1)], function_id: StrictInt, _request_timeout: Union[ None, @@ -1165,11 +353,13 @@ def get_decompilation_comments( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseListCommentResponse: - """Get comments for this function + ) -> BaseResponseBool: + """Delete a comment - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + Deletes an existing comment. Users can only delete their own comments. + :param comment_id: (required) + :type comment_id: int :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one @@ -1194,7 +384,8 @@ def get_decompilation_comments( :return: Returns the result object. """ # noqa: E501 - _param = self._get_decompilation_comments_serialize( + _param = self._delete_decompilation_comment_serialize( + comment_id=comment_id, function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1203,8 +394,10 @@ def get_decompilation_comments( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCommentResponse", + '200': "BaseResponseBool", '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1218,8 +411,9 @@ def get_decompilation_comments( @validate_call - def get_decompilation_comments_with_http_info( + def delete_decompilation_comment_with_http_info( self, + comment_id: Annotated[int, Field(strict=True, ge=1)], function_id: StrictInt, _request_timeout: Union[ None, @@ -1233,11 +427,13 @@ def get_decompilation_comments_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseListCommentResponse]: - """Get comments for this function + ) -> ApiResponse[BaseResponseBool]: + """Delete a comment - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + Deletes an existing comment. Users can only delete their own comments. + :param comment_id: (required) + :type comment_id: int :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one @@ -1262,7 +458,8 @@ def get_decompilation_comments_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_decompilation_comments_serialize( + _param = self._delete_decompilation_comment_serialize( + comment_id=comment_id, function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1271,8 +468,10 @@ def get_decompilation_comments_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCommentResponse", + '200': "BaseResponseBool", '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1286,8 +485,9 @@ def get_decompilation_comments_with_http_info( @validate_call - def get_decompilation_comments_without_preload_content( + def delete_decompilation_comment_without_preload_content( self, + comment_id: Annotated[int, Field(strict=True, ge=1)], function_id: StrictInt, _request_timeout: Union[ None, @@ -1302,10 +502,12 @@ def get_decompilation_comments_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get comments for this function + """Delete a comment - Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. + Deletes an existing comment. Users can only delete their own comments. + :param comment_id: (required) + :type comment_id: int :param function_id: (required) :type function_id: int :param _request_timeout: timeout setting for this request. If one @@ -1330,7 +532,8 @@ def get_decompilation_comments_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_decompilation_comments_serialize( + _param = self._delete_decompilation_comment_serialize( + comment_id=comment_id, function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1339,8 +542,10 @@ def get_decompilation_comments_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseListCommentResponse", + '200': "BaseResponseBool", '422': "BaseResponse", + '403': "BaseResponse", + '400': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1349,8 +554,9 @@ def get_decompilation_comments_without_preload_content( return response_data.response - def _get_decompilation_comments_serialize( + def _delete_decompilation_comment_serialize( self, + comment_id, function_id, _request_auth, _content_type, @@ -1373,6 +579,8 @@ def _get_decompilation_comments_serialize( _body_params: Optional[bytes] = None # process the path parameters + if comment_id is not None: + _path_params['comment_id'] = comment_id if function_id is not None: _path_params['function_id'] = function_id # process the query parameters @@ -1396,8 +604,8 @@ def _get_decompilation_comments_serialize( ] return self.api_client.param_serialize( - method='GET', - resource_path='/v2/functions/{function_id}/decompilation/comments', + method='DELETE', + resource_path='/v2/functions/{function_id}/decompilation/comments/{comment_id}', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -1414,7 +622,7 @@ def _get_decompilation_comments_serialize( @validate_call - def get_function_decompilation( + def get_decompilation_comments( self, function_id: StrictInt, _request_timeout: Union[ @@ -1429,9 +637,10 @@ def get_function_decompilation( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseDecompilationResponse: - """Get decompilation result + ) -> BaseResponseListCommentResponse: + """Get comments for this function + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. :param function_id: (required) :type function_id: int @@ -1457,7 +666,7 @@ def get_function_decompilation( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_decompilation_serialize( + _param = self._get_decompilation_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1466,9 +675,8 @@ def get_function_decompilation( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseDecompilationResponse", + '200': "BaseResponseListCommentResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1482,7 +690,7 @@ def get_function_decompilation( @validate_call - def get_function_decompilation_with_http_info( + def get_decompilation_comments_with_http_info( self, function_id: StrictInt, _request_timeout: Union[ @@ -1497,9 +705,10 @@ def get_function_decompilation_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[BaseResponseDecompilationResponse]: - """Get decompilation result + ) -> ApiResponse[BaseResponseListCommentResponse]: + """Get comments for this function + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. :param function_id: (required) :type function_id: int @@ -1525,7 +734,7 @@ def get_function_decompilation_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_decompilation_serialize( + _param = self._get_decompilation_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1534,9 +743,8 @@ def get_function_decompilation_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseDecompilationResponse", + '200': "BaseResponseListCommentResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1550,7 +758,7 @@ def get_function_decompilation_with_http_info( @validate_call - def get_function_decompilation_without_preload_content( + def get_decompilation_comments_without_preload_content( self, function_id: StrictInt, _request_timeout: Union[ @@ -1566,8 +774,9 @@ def get_function_decompilation_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Get decompilation result + """Get comments for this function + Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to. :param function_id: (required) :type function_id: int @@ -1593,7 +802,7 @@ def get_function_decompilation_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._get_function_decompilation_serialize( + _param = self._get_decompilation_comments_serialize( function_id=function_id, _request_auth=_request_auth, _content_type=_content_type, @@ -1602,9 +811,8 @@ def get_function_decompilation_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseDecompilationResponse", + '200': "BaseResponseListCommentResponse", '422': "BaseResponse", - '404': "BaseResponse", } response_data = self.api_client.call_api( *_param, @@ -1613,7 +821,7 @@ def get_function_decompilation_without_preload_content( return response_data.response - def _get_function_decompilation_serialize( + def _get_decompilation_comments_serialize( self, function_id, _request_auth, @@ -1661,7 +869,7 @@ def _get_function_decompilation_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/v2/functions/{function_id}/decompilation', + resource_path='/v2/functions/{function_id}/decompilation/comments', path_params=_path_params, query_params=_query_params, header_params=_header_params, diff --git a/revengai/api_client.py b/revengai/api_client.py index 3635a2e..a491af2 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/v2.16.0/python' + self.user_agent = 'OpenAPI-Generator/v2.18.2/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index d28cc4a..42d06ab 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: v2.16.0\n"\ - "SDK Package Version: v2.16.0".\ + "Version of the API: v2.18.2\n"\ + "SDK Package Version: v2.18.2".\ 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 8f6d792..3a29aa9 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -69,7 +69,6 @@ from revengai.models.base_response_comment_response import BaseResponseCommentResponse from revengai.models.base_response_communities import BaseResponseCommunities from revengai.models.base_response_created import BaseResponseCreated -from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse from revengai.models.base_response_dict import BaseResponseDict from revengai.models.base_response_dynamic_execution_status import BaseResponseDynamicExecutionStatus from revengai.models.base_response_external_response import BaseResponseExternalResponse @@ -156,7 +155,6 @@ from revengai.models.context import Context from revengai.models.created import Created from revengai.models.decompilation_comment_context import DecompilationCommentContext -from revengai.models.decompilation_response import DecompilationResponse from revengai.models.die_match import DieMatch from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput from revengai.models.elf_import_model import ELFImportModel diff --git a/revengai/models/base_response_decompilation_response.py b/revengai/models/base_response_decompilation_response.py deleted file mode 100644 index 9517d5c..0000000 --- a/revengai/models/base_response_decompilation_response.py +++ /dev/null @@ -1,125 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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.decompilation_response import DecompilationResponse -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 BaseResponseDecompilationResponse(BaseModel): - """ - BaseResponseDecompilationResponse - """ # noqa: E501 - status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[DecompilationResponse] = 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 BaseResponseDecompilationResponse 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 BaseResponseDecompilationResponse 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": DecompilationResponse.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/decompilation_response.py b/revengai/models/decompilation_response.py deleted file mode 100644 index dbcda5e..0000000 --- a/revengai/models/decompilation_response.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - 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 DecompilationResponse(BaseModel): - """ - DecompilationResponse - """ # noqa: E501 - function_id: StrictInt = Field(description="The ID of the function") - decompilation: StrictStr - calling_convention: StrictStr - __properties: ClassVar[List[str]] = ["function_id", "decompilation", "calling_convention"] - - 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 DecompilationResponse 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 DecompilationResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "function_id": obj.get("function_id"), - "decompilation": obj.get("decompilation"), - "calling_convention": obj.get("calling_convention") - }) - return _obj - - diff --git a/revengai/models/model_name.py b/revengai/models/model_name.py index 61826de..b7fa438 100644 --- a/revengai/models/model_name.py +++ b/revengai/models/model_name.py @@ -25,14 +25,12 @@ class ModelName(str, Enum): """ allowed enum values """ - BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_WINDOWS = 'binnet-0.5-x86-windows' - BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_LINUX = 'binnet-0.5-x86-linux' - BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_MACOS = 'binnet-0.5-x86-macos' - BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_ANDROID = 'binnet-0.5-x86-android' - BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_WINDOWS = 'binnet-0.5-x86-32-windows' - BINNET_MINUS_0_DOT_5_MINUS_X86_MINUS_32_MINUS_LINUX = 'binnet-0.5-x86-32-linux' - BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_WINDOWS = 'binnet-0.5-arm-64-windows' - BINNET_MINUS_0_DOT_5_MINUS_ARM_MINUS_64_MINUS_LINUX = 'binnet-0.5-arm-64-linux' + BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_64_MINUS_WINDOWS = 'binnet-0.7-x86-64-windows' + BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_64_MINUS_LINUX = 'binnet-0.7-x86-64-linux' + BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_32_MINUS_WINDOWS = 'binnet-0.7-x86-32-windows' + BINNET_MINUS_0_DOT_7_MINUS_X86_MINUS_32_MINUS_LINUX = 'binnet-0.7-x86-32-linux' + BINNET_MINUS_0_DOT_7_MINUS_ARM_MINUS_64_MINUS_WINDOWS = 'binnet-0.7-arm-64-windows' + BINNET_MINUS_0_DOT_7_MINUS_ARM_MINUS_64_MINUS_LINUX = 'binnet-0.7-arm-64-linux' @classmethod def from_json(cls, json_str: str) -> Self: diff --git a/test/test_base_response_decompilation_response.py b/test/test_base_response_decompilation_response.py deleted file mode 100644 index 0cc0919..0000000 --- a/test/test_base_response_decompilation_response.py +++ /dev/null @@ -1,65 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_decompilation_response import BaseResponseDecompilationResponse - -class TestBaseResponseDecompilationResponse(unittest.TestCase): - """BaseResponseDecompilationResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseDecompilationResponse: - """Test BaseResponseDecompilationResponse - 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 `BaseResponseDecompilationResponse` - """ - model = BaseResponseDecompilationResponse() - if include_optional: - return BaseResponseDecompilationResponse( - status = True, - data = revengai.models.decompilation_response.DecompilationResponse( - function_id = 56, - decompilation = '', - calling_convention = '', ), - 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 BaseResponseDecompilationResponse( - ) - """ - - def testBaseResponseDecompilationResponse(self): - """Test BaseResponseDecompilationResponse""" - # 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_decompilation_response.py b/test/test_decompilation_response.py deleted file mode 100644 index fa412d4..0000000 --- a/test/test_decompilation_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is Similarity Search Engine for executable binaries - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.decompilation_response import DecompilationResponse - -class TestDecompilationResponse(unittest.TestCase): - """DecompilationResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> DecompilationResponse: - """Test DecompilationResponse - 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 `DecompilationResponse` - """ - model = DecompilationResponse() - if include_optional: - return DecompilationResponse( - function_id = 56, - decompilation = '', - calling_convention = '' - ) - else: - return DecompilationResponse( - function_id = 56, - decompilation = '', - calling_convention = '', - ) - """ - - def testDecompilationResponse(self): - """Test DecompilationResponse""" - # 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_functions_decompilation_api.py b/test/test_functions_decompilation_api.py index 9149563..a72c532 100644 --- a/test/test_functions_decompilation_api.py +++ b/test/test_functions_decompilation_api.py @@ -25,13 +25,6 @@ def setUp(self) -> None: def tearDown(self) -> None: pass - def test_check_function_decompilation_task(self) -> None: - """Test case for check_function_decompilation_task - - Check the status of a function decompilation - """ - pass - def test_create_decompilation_comment(self) -> None: """Test case for create_decompilation_comment @@ -39,13 +32,6 @@ def test_create_decompilation_comment(self) -> None: """ pass - def test_create_function_decompilation_task(self) -> None: - """Test case for create_function_decompilation_task - - Queues a function decompilation - """ - pass - def test_delete_decompilation_comment(self) -> None: """Test case for delete_decompilation_comment @@ -60,13 +46,6 @@ def test_get_decompilation_comments(self) -> None: """ pass - def test_get_function_decompilation(self) -> None: - """Test case for get_function_decompilation - - Get decompilation result - """ - pass - def test_update_decompilation_comment(self) -> None: """Test case for update_decompilation_comment