diff --git a/.sdk-version b/.sdk-version index ba6ff6b..c757c98 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.12.1 +v2.13.0 diff --git a/README.md b/README.md index 55c4697..b084050 100644 --- a/README.md +++ b/README.md @@ -346,6 +346,7 @@ Class | Method | HTTP request | Description - [FunctionRenameMap](docs/FunctionRenameMap.md) - [FunctionSearchResponse](docs/FunctionSearchResponse.md) - [FunctionSearchResult](docs/FunctionSearchResult.md) + - [FunctionSourceType](docs/FunctionSourceType.md) - [FunctionString](docs/FunctionString.md) - [FunctionStringsResponse](docs/FunctionStringsResponse.md) - [FunctionTaskResponse](docs/FunctionTaskResponse.md) diff --git a/docs/FunctionNameHistory.md b/docs/FunctionNameHistory.md index cb9c9d3..72675b4 100644 --- a/docs/FunctionNameHistory.md +++ b/docs/FunctionNameHistory.md @@ -8,8 +8,9 @@ Name | Type | Description | Notes **history_id** | **int** | The ID of the history record | **change_made_by** | **str** | The user who made the change | **function_name** | **str** | The name of the function | +**mangled_name** | **str** | The mangled name of the function | **is_debug** | **bool** | Whether the function is debugged | -**source_type** | **str** | The source type of the function | +**source_type** | [**FunctionSourceType**](FunctionSourceType.md) | The source type of the function | **created_at** | **str** | The timestamp when the function name was created | ## Example diff --git a/docs/FunctionSourceType.md b/docs/FunctionSourceType.md new file mode 100644 index 0000000..91c3006 --- /dev/null +++ b/docs/FunctionSourceType.md @@ -0,0 +1,18 @@ +# FunctionSourceType + + +## Enum + +* `SYSTEM` (value: `'SYSTEM'`) + +* `USER` (value: `'USER'`) + +* `EXTERNAL` (value: `'EXTERNAL'`) + +* `AUTO_UNSTRIP` (value: `'AUTO_UNSTRIP'`) + +* `AI_UNSTRIP` (value: `'AI_UNSTRIP'`) + +[[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 3ac6422..365d702 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.12.1" +__version__ = "v2.13.0" # Define package exports __all__ = [ @@ -238,6 +238,7 @@ "FunctionRenameMap", "FunctionSearchResponse", "FunctionSearchResult", + "FunctionSourceType", "FunctionString", "FunctionStringsResponse", "FunctionTaskResponse", @@ -565,6 +566,7 @@ from revengai.models.function_rename_map import FunctionRenameMap as FunctionRenameMap from revengai.models.function_search_response import FunctionSearchResponse as FunctionSearchResponse from revengai.models.function_search_result import FunctionSearchResult as FunctionSearchResult +from revengai.models.function_source_type import FunctionSourceType as FunctionSourceType from revengai.models.function_string import FunctionString as FunctionString from revengai.models.function_strings_response import FunctionStringsResponse as FunctionStringsResponse from revengai.models.function_task_response import FunctionTaskResponse as FunctionTaskResponse diff --git a/revengai/api_client.py b/revengai/api_client.py index 96ee503..2965fd0 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.12.1/python' + self.user_agent = 'OpenAPI-Generator/v2.13.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 506b274..85e04e2 100644 --- a/revengai/configuration.py +++ b/revengai/configuration.py @@ -529,8 +529,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.12.1\n"\ - "SDK Package Version: v2.12.1".\ + "Version of the API: v2.13.0\n"\ + "SDK Package Version: v2.13.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 0cf6497..8f6d792 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -205,6 +205,7 @@ from revengai.models.function_rename_map import FunctionRenameMap from revengai.models.function_search_response import FunctionSearchResponse from revengai.models.function_search_result import FunctionSearchResult +from revengai.models.function_source_type import FunctionSourceType from revengai.models.function_string import FunctionString from revengai.models.function_strings_response import FunctionStringsResponse from revengai.models.function_task_response import FunctionTaskResponse diff --git a/revengai/models/function_name_history.py b/revengai/models/function_name_history.py index 764deed..2342c40 100644 --- a/revengai/models/function_name_history.py +++ b/revengai/models/function_name_history.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List +from revengai.models.function_source_type import FunctionSourceType from typing import Optional, Set from typing_extensions import Self @@ -28,10 +29,11 @@ class FunctionNameHistory(BaseModel): history_id: StrictInt = Field(description="The ID of the history record") change_made_by: StrictStr = Field(description="The user who made the change") function_name: StrictStr = Field(description="The name of the function") + mangled_name: StrictStr = Field(description="The mangled name of the function") is_debug: StrictBool = Field(description="Whether the function is debugged") - source_type: StrictStr = Field(description="The source type of the function") + source_type: FunctionSourceType = Field(description="The source type of the function") created_at: StrictStr = Field(description="The timestamp when the function name was created") - __properties: ClassVar[List[str]] = ["history_id", "change_made_by", "function_name", "is_debug", "source_type", "created_at"] + __properties: ClassVar[List[str]] = ["history_id", "change_made_by", "function_name", "mangled_name", "is_debug", "source_type", "created_at"] model_config = ConfigDict( populate_by_name=True, @@ -87,6 +89,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "history_id": obj.get("history_id"), "change_made_by": obj.get("change_made_by"), "function_name": obj.get("function_name"), + "mangled_name": obj.get("mangled_name"), "is_debug": obj.get("is_debug"), "source_type": obj.get("source_type"), "created_at": obj.get("created_at") diff --git a/revengai/models/function_source_type.py b/revengai/models/function_source_type.py new file mode 100644 index 0000000..d10f016 --- /dev/null +++ b/revengai/models/function_source_type.py @@ -0,0 +1,39 @@ +# 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 json +from enum import Enum +from typing_extensions import Self + + +class FunctionSourceType(str, Enum): + """ + FunctionSourceType + """ + + """ + allowed enum values + """ + SYSTEM = 'SYSTEM' + USER = 'USER' + EXTERNAL = 'EXTERNAL' + AUTO_UNSTRIP = 'AUTO_UNSTRIP' + AI_UNSTRIP = 'AI_UNSTRIP' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of FunctionSourceType from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/test/test_base_response_list_function_name_history.py b/test/test_base_response_list_function_name_history.py index f50c5c0..784f6c1 100644 --- a/test/test_base_response_list_function_name_history.py +++ b/test/test_base_response_list_function_name_history.py @@ -40,8 +40,9 @@ def make_instance(self, include_optional) -> BaseResponseListFunctionNameHistory history_id = 56, change_made_by = '', function_name = '', + mangled_name = '', is_debug = True, - source_type = '', + source_type = 'SYSTEM', created_at = '', ) ], message = '', diff --git a/test/test_function_name_history.py b/test/test_function_name_history.py index 752f144..e2cfade 100644 --- a/test/test_function_name_history.py +++ b/test/test_function_name_history.py @@ -37,8 +37,9 @@ def make_instance(self, include_optional) -> FunctionNameHistory: history_id = 56, change_made_by = '', function_name = '', + mangled_name = '', is_debug = True, - source_type = '', + source_type = 'SYSTEM', created_at = '' ) else: @@ -46,8 +47,9 @@ def make_instance(self, include_optional) -> FunctionNameHistory: history_id = 56, change_made_by = '', function_name = '', + mangled_name = '', is_debug = True, - source_type = '', + source_type = 'SYSTEM', created_at = '', ) """ diff --git a/test/test_function_source_type.py b/test/test_function_source_type.py new file mode 100644 index 0000000..8be1574 --- /dev/null +++ b/test/test_function_source_type.py @@ -0,0 +1,32 @@ +# 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.function_source_type import FunctionSourceType + +class TestFunctionSourceType(unittest.TestCase): + """FunctionSourceType unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testFunctionSourceType(self): + """Test FunctionSourceType""" + # inst = FunctionSourceType() + +if __name__ == '__main__': + unittest.main()