diff --git a/.sdk-version b/.sdk-version index 7227c77..b0c3c5c 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v2.9.1 +v2.11.0 diff --git a/docs/Basic.md b/docs/Basic.md index 81cab49..9b0d3de 100644 --- a/docs/Basic.md +++ b/docs/Basic.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **creation** | **datetime** | When the binary was uploaded | **sha_256_hash** | **str** | The hash of the binary uploaded | **model_name** | **str** | The model name used for analysis | +**model_id** | **int** | The model ID used for analysis | **owner_username** | **str** | The name of the owner of the binary | **analysis_scope** | **str** | The scope of the analysis | **is_owner** | **bool** | Whether the current user is the owner | diff --git a/docs/FunctionRename.md b/docs/FunctionRename.md index 3a9a021..482ac81 100644 --- a/docs/FunctionRename.md +++ b/docs/FunctionRename.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**new_name** | **str** | The new name for the function | [optional] [default to ''] -**new_mangled_name** | **str** | | [optional] +**new_name** | **str** | The new name for the function | +**new_mangled_name** | **str** | The new mangled name for the function | ## Example diff --git a/docs/FunctionRenameMap.md b/docs/FunctionRenameMap.md index 3355c02..3c21185 100644 --- a/docs/FunctionRenameMap.md +++ b/docs/FunctionRenameMap.md @@ -6,8 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **function_id** | **int** | The ID of the function to rename | -**new_name** | **str** | The new name for the function | [optional] [default to ''] -**new_mangled_name** | **str** | | [optional] +**new_name** | **str** | The new name for the function | +**new_mangled_name** | **str** | The new mangled name for the function | ## Example diff --git a/revengai/__init__.py b/revengai/__init__.py index b95a5b8..f122a7a 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v2.9.1" +__version__ = "v2.11.0" # Define package exports __all__ = [ diff --git a/revengai/api_client.py b/revengai/api_client.py index 97d1328..2028b1f 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.9.1/python' + self.user_agent = 'OpenAPI-Generator/v2.11.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index bb4d10b..3a0f012 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.9.1\n"\ - "SDK Package Version: v2.9.1".\ + "Version of the API: v2.11.0\n"\ + "SDK Package Version: v2.11.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self) -> List[HostSetting]: diff --git a/revengai/models/basic.py b/revengai/models/basic.py index c9287bb..635a6f6 100644 --- a/revengai/models/basic.py +++ b/revengai/models/basic.py @@ -31,6 +31,7 @@ class Basic(BaseModel): creation: datetime = Field(description="When the binary was uploaded") sha_256_hash: StrictStr = Field(description="The hash of the binary uploaded") model_name: StrictStr = Field(description="The model name used for analysis") + model_id: StrictInt = Field(description="The model ID used for analysis") owner_username: StrictStr = Field(description="The name of the owner of the binary") analysis_scope: StrictStr = Field(description="The scope of the analysis") is_owner: StrictBool = Field(description="Whether the current user is the owner") @@ -38,7 +39,7 @@ class Basic(BaseModel): function_count: StrictInt = Field(description="The number of functions in the binary") is_advanced: StrictBool = Field(description="Whether the analysis was advanced") base_address: Optional[StrictInt] - __properties: ClassVar[List[str]] = ["binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "owner_username", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced", "base_address"] + __properties: ClassVar[List[str]] = ["binary_name", "binary_size", "creation", "sha_256_hash", "model_name", "model_id", "owner_username", "analysis_scope", "is_owner", "debug", "function_count", "is_advanced", "base_address"] model_config = ConfigDict( populate_by_name=True, @@ -101,6 +102,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "creation": obj.get("creation"), "sha_256_hash": obj.get("sha_256_hash"), "model_name": obj.get("model_name"), + "model_id": obj.get("model_id"), "owner_username": obj.get("owner_username"), "analysis_scope": obj.get("analysis_scope"), "is_owner": obj.get("is_owner"), diff --git a/revengai/models/function_rename.py b/revengai/models/function_rename.py index fc92402..56c3902 100644 --- a/revengai/models/function_rename.py +++ b/revengai/models/function_rename.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -25,8 +25,8 @@ class FunctionRename(BaseModel): """ FunctionRename """ # noqa: E501 - new_name: Optional[StrictStr] = Field(default='', description="The new name for the function") - new_mangled_name: Optional[StrictStr] = None + new_name: StrictStr = Field(description="The new name for the function") + new_mangled_name: StrictStr = Field(description="The new mangled name for the function") __properties: ClassVar[List[str]] = ["new_name", "new_mangled_name"] model_config = ConfigDict( @@ -68,11 +68,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if new_mangled_name (nullable) is None - # and model_fields_set contains the field - if self.new_mangled_name is None and "new_mangled_name" in self.model_fields_set: - _dict['new_mangled_name'] = None - return _dict @classmethod @@ -85,7 +80,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "new_name": obj.get("new_name") if obj.get("new_name") is not None else '', + "new_name": obj.get("new_name"), "new_mangled_name": obj.get("new_mangled_name") }) return _obj diff --git a/revengai/models/function_rename_map.py b/revengai/models/function_rename_map.py index d4f8629..d383dfb 100644 --- a/revengai/models/function_rename_map.py +++ b/revengai/models/function_rename_map.py @@ -17,7 +17,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from typing import Any, ClassVar, Dict, List from typing import Optional, Set from typing_extensions import Self @@ -26,8 +26,8 @@ class FunctionRenameMap(BaseModel): FunctionRenameMap """ # noqa: E501 function_id: StrictInt = Field(description="The ID of the function to rename") - new_name: Optional[StrictStr] = Field(default='', description="The new name for the function") - new_mangled_name: Optional[StrictStr] = None + new_name: StrictStr = Field(description="The new name for the function") + new_mangled_name: StrictStr = Field(description="The new mangled name for the function") __properties: ClassVar[List[str]] = ["function_id", "new_name", "new_mangled_name"] model_config = ConfigDict( @@ -69,11 +69,6 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # set to None if new_mangled_name (nullable) is None - # and model_fields_set contains the field - if self.new_mangled_name is None and "new_mangled_name" in self.model_fields_set: - _dict['new_mangled_name'] = None - return _dict @classmethod @@ -87,7 +82,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "function_id": obj.get("function_id"), - "new_name": obj.get("new_name") if obj.get("new_name") is not None else '', + "new_name": obj.get("new_name"), "new_mangled_name": obj.get("new_mangled_name") }) return _obj diff --git a/test/test_base_response_basic.py b/test/test_base_response_basic.py index 4cf3746..12f120c 100644 --- a/test/test_base_response_basic.py +++ b/test/test_base_response_basic.py @@ -41,6 +41,7 @@ def make_instance(self, include_optional) -> BaseResponseBasic: creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sha_256_hash = '', model_name = '', + model_id = 56, owner_username = '', analysis_scope = '', is_owner = True, diff --git a/test/test_basic.py b/test/test_basic.py index 23ee497..993bfba 100644 --- a/test/test_basic.py +++ b/test/test_basic.py @@ -39,6 +39,7 @@ def make_instance(self, include_optional) -> Basic: creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sha_256_hash = '', model_name = '', + model_id = 56, owner_username = '', analysis_scope = '', is_owner = True, @@ -54,6 +55,7 @@ def make_instance(self, include_optional) -> Basic: creation = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), sha_256_hash = '', model_name = '', + model_id = 56, owner_username = '', analysis_scope = '', is_owner = True, diff --git a/test/test_function_rename.py b/test/test_function_rename.py index e27b1ed..c7a01dc 100644 --- a/test/test_function_rename.py +++ b/test/test_function_rename.py @@ -39,6 +39,8 @@ def make_instance(self, include_optional) -> FunctionRename: ) else: return FunctionRename( + new_name = '', + new_mangled_name = '', ) """ diff --git a/test/test_function_rename_map.py b/test/test_function_rename_map.py index 54ec13f..f558e9b 100644 --- a/test/test_function_rename_map.py +++ b/test/test_function_rename_map.py @@ -41,6 +41,8 @@ def make_instance(self, include_optional) -> FunctionRenameMap: else: return FunctionRenameMap( function_id = 56, + new_name = '', + new_mangled_name = '', ) """