diff --git a/.sdk-version b/.sdk-version index 9526e67..5e8f99e 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.74.0 +v2.75.0 diff --git a/docs/FunctionListItem.md b/docs/FunctionListItem.md index af49a44..6fa0601 100644 --- a/docs/FunctionListItem.md +++ b/docs/FunctionListItem.md @@ -7,6 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **int** | Function id | **name** | **str** | Name of the function | +**name_source_type** | **str** | The source (process) the function name came from | **mangled_name** | **str** | Mangled name of the function | **vaddr** | **int** | Function virtual address | **size** | **int** | Function size in bytes | diff --git a/revengai/__init__.py b/revengai/__init__.py index f813835..e8f6f6d 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.74.0" +__version__ = "v2.75.0" # Define package exports __all__ = [ diff --git a/revengai/api/analyses_results_metadata_api.py b/revengai/api/analyses_results_metadata_api.py index 6cd2205..b272e22 100644 --- a/revengai/api/analyses_results_metadata_api.py +++ b/revengai/api/analyses_results_metadata_api.py @@ -901,7 +901,7 @@ def get_functions_list( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> BaseResponseAnalysisFunctions: - """Gets functions from analysis + """(Deprecated) Gets functions from analysis Gets the functions identified during analysis @@ -934,6 +934,7 @@ def get_functions_list( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning) _param = self._get_functions_list_serialize( analysis_id=analysis_id, @@ -981,7 +982,7 @@ def get_functions_list_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[BaseResponseAnalysisFunctions]: - """Gets functions from analysis + """(Deprecated) Gets functions from analysis Gets the functions identified during analysis @@ -1014,6 +1015,7 @@ def get_functions_list_with_http_info( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning) _param = self._get_functions_list_serialize( analysis_id=analysis_id, @@ -1061,7 +1063,7 @@ def get_functions_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """Gets functions from analysis + """(Deprecated) Gets functions from analysis Gets the functions identified during analysis @@ -1094,6 +1096,7 @@ def get_functions_list_without_preload_content( :type _host_index: int, optional :return: Returns the result object. """ # noqa: E501 + warnings.warn("GET /v2/analyses/{analysis_id}/functions/list is deprecated.", DeprecationWarning) _param = self._get_functions_list_serialize( analysis_id=analysis_id, diff --git a/revengai/api_client.py b/revengai/api_client.py index fad501a..5686dd9 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.74.0/python' + self.user_agent = 'OpenAPI-Generator/v2.75.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 9163342..16f8d73 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.74.0\n"\ - "SDK Package Version: v2.74.0".\ + "Version of the API: v2.75.0\n"\ + "SDK Package Version: v2.75.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/function_list_item.py b/revengai/models/function_list_item.py index 7be13c5..596dd68 100644 --- a/revengai/models/function_list_item.py +++ b/revengai/models/function_list_item.py @@ -16,7 +16,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -27,11 +27,19 @@ class FunctionListItem(BaseModel): """ # noqa: E501 id: StrictInt = Field(description="Function id") name: StrictStr = Field(description="Name of the function") + name_source_type: StrictStr = Field(description="The source (process) the function name came from") mangled_name: StrictStr = Field(description="Mangled name of the function") vaddr: StrictInt = Field(description="Function virtual address") size: StrictInt = Field(description="Function size in bytes") debug: StrictBool = Field(description="Whether the function has debug information") - __properties: ClassVar[List[str]] = ["id", "name", "mangled_name", "vaddr", "size", "debug"] + __properties: ClassVar[List[str]] = ["id", "name", "name_source_type", "mangled_name", "vaddr", "size", "debug"] + + @field_validator('name_source_type') + def name_source_type_validate_enum(cls, value): + """Validates the enum""" + if value not in set(['SYSTEM', 'USER', 'AUTO_UNSTRIP', 'EXTERNAL', 'AI_UNSTRIP']): + raise ValueError("must be one of enum values ('SYSTEM', 'USER', 'AUTO_UNSTRIP', 'EXTERNAL', 'AI_UNSTRIP')") + return value model_config = ConfigDict( populate_by_name=True, @@ -86,6 +94,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "name": obj.get("name"), + "name_source_type": obj.get("name_source_type"), "mangled_name": obj.get("mangled_name"), "vaddr": obj.get("vaddr"), "size": obj.get("size"), diff --git a/test/test_analysis_functions_list.py b/test/test_analysis_functions_list.py index 044cf9e..2ed29d3 100644 --- a/test/test_analysis_functions_list.py +++ b/test/test_analysis_functions_list.py @@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionsList: revengai.models.function_list_item.FunctionListItem( id = 56, name = '', + name_source_type = 'SYSTEM', mangled_name = '', vaddr = 56, size = 56, @@ -50,6 +51,7 @@ def make_instance(self, include_optional) -> AnalysisFunctionsList: revengai.models.function_list_item.FunctionListItem( id = 56, name = '', + name_source_type = 'SYSTEM', mangled_name = '', vaddr = 56, size = 56, diff --git a/test/test_base_response_analysis_functions_list.py b/test/test_base_response_analysis_functions_list.py index 8ea1885..b3dcba7 100644 --- a/test/test_base_response_analysis_functions_list.py +++ b/test/test_base_response_analysis_functions_list.py @@ -40,6 +40,7 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisFunctionsList: revengai.models.function_list_item.FunctionListItem( id = 56, name = '', + name_source_type = 'SYSTEM', mangled_name = '', vaddr = 56, size = 56, diff --git a/test/test_function_list_item.py b/test/test_function_list_item.py index 86a4a20..d61fbfb 100644 --- a/test/test_function_list_item.py +++ b/test/test_function_list_item.py @@ -36,6 +36,7 @@ def make_instance(self, include_optional) -> FunctionListItem: return FunctionListItem( id = 56, name = '', + name_source_type = 'SYSTEM', mangled_name = '', vaddr = 56, size = 56, @@ -45,6 +46,7 @@ def make_instance(self, include_optional) -> FunctionListItem: return FunctionListItem( id = 56, name = '', + name_source_type = 'SYSTEM', mangled_name = '', vaddr = 56, size = 56,