Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .sdk-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.29.1
v3.30.0
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ Class | Method | HTTP request | Description
- [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md)
- [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md)
- [Argument](docs/Argument.md)
- [AutoRunAgents](docs/AutoRunAgents.md)
- [AutoUnstripRequest](docs/AutoUnstripRequest.md)
- [AutoUnstripResponse](docs/AutoUnstripResponse.md)
- [BaseResponse](docs/BaseResponse.md)
Expand Down
1 change: 1 addition & 0 deletions docs/AnalysisCreateRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Name | Type | Description | Notes
**debug_hash** | **str** | | [optional]
**analysis_config** | [**AnalysisConfig**](AnalysisConfig.md) | The analysis config enables the configuration of optional analysis stages | [optional]
**binary_config** | [**BinaryConfig**](BinaryConfig.md) | The binary config can override automatically determined values such as ISA, Platform, File Format, etc | [optional]
**auto_run_agents** | [**AutoRunAgents**](AutoRunAgents.md) | | [optional]

## Example

Expand Down
1 change: 1 addition & 0 deletions docs/AnalysisDetailResponse.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Name | Type | Description | Notes
**model_name** | **str** | |
**sbom** | **Dict[str, object]** | | [optional]
**sha_256_hash** | **str** | |
**auto_run_agents** | [**AutoRunAgents**](AutoRunAgents.md) | |

## Example

Expand Down
29 changes: 29 additions & 0 deletions docs/AutoRunAgents.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# AutoRunAgents


## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**triage** | **bool** | | [optional] [default to False]

## Example

```python
from revengai.models.auto_run_agents import AutoRunAgents

# TODO update the JSON string below
json = "{}"
# create an instance of AutoRunAgents from a JSON string
auto_run_agents_instance = AutoRunAgents.from_json(json)
# print the JSON string representation of the object
print(AutoRunAgents.to_json())

# convert the object into a dict
auto_run_agents_dict = auto_run_agents_instance.to_dict()
# create an instance of AutoRunAgents from a dict
auto_run_agents_from_dict = AutoRunAgents.from_dict(auto_run_agents_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)


4 changes: 3 additions & 1 deletion revengai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
""" # noqa: E501


__version__ = "v3.29.1"
__version__ = "v3.30.0"

# Define package exports
__all__ = [
Expand Down Expand Up @@ -77,6 +77,7 @@
"AppApiRestV2FunctionsTypesFunction",
"AppServicesDynamicExecutionSchemasDynamicExecutionStatus",
"Argument",
"AutoRunAgents",
"AutoUnstripRequest",
"AutoUnstripResponse",
"BaseResponse",
Expand Down Expand Up @@ -411,6 +412,7 @@
from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction
from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus as AppServicesDynamicExecutionSchemasDynamicExecutionStatus
from revengai.models.argument import Argument as Argument
from revengai.models.auto_run_agents import AutoRunAgents as AutoRunAgents
from revengai.models.auto_unstrip_request import AutoUnstripRequest as AutoUnstripRequest
from revengai.models.auto_unstrip_response import AutoUnstripResponse as AutoUnstripResponse
from revengai.models.base_response import BaseResponse as BaseResponse
Expand Down
2 changes: 1 addition & 1 deletion revengai/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/v3.29.1/python'
self.user_agent = 'OpenAPI-Generator/v3.30.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
4 changes: 2 additions & 2 deletions revengai/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ def to_debug_report(self) -> str:
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: v3.29.1\n"\
"SDK Package Version: v3.29.1".\
"Version of the API: v3.30.0\n"\
"SDK Package Version: v3.30.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self) -> List[HostSetting]:
Expand Down
1 change: 1 addition & 0 deletions revengai/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction
from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus
from revengai.models.argument import Argument
from revengai.models.auto_run_agents import AutoRunAgents
from revengai.models.auto_unstrip_request import AutoUnstripRequest
from revengai.models.auto_unstrip_response import AutoUnstripResponse
from revengai.models.base_response import BaseResponse
Expand Down
10 changes: 8 additions & 2 deletions revengai/models/analysis_create_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from typing import Any, ClassVar, Dict, List, Optional
from revengai.models.analysis_config import AnalysisConfig
from revengai.models.analysis_scope import AnalysisScope
from revengai.models.auto_run_agents import AutoRunAgents
from revengai.models.binary_config import BinaryConfig
from revengai.models.symbols import Symbols
from revengai.models.tag import Tag
Expand All @@ -38,7 +39,8 @@ class AnalysisCreateRequest(BaseModel):
debug_hash: Optional[StrictStr] = None
analysis_config: Optional[AnalysisConfig] = Field(default=None, description="The analysis config enables the configuration of optional analysis stages")
binary_config: Optional[BinaryConfig] = Field(default=None, description="The binary config can override automatically determined values such as ISA, Platform, File Format, etc")
__properties: ClassVar[List[str]] = ["filename", "sha_256_hash", "tags", "analysis_scope", "symbols", "debug_hash", "analysis_config", "binary_config"]
auto_run_agents: Optional[AutoRunAgents] = None
__properties: ClassVar[List[str]] = ["filename", "sha_256_hash", "tags", "analysis_scope", "symbols", "debug_hash", "analysis_config", "binary_config", "auto_run_agents"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -95,6 +97,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of binary_config
if self.binary_config:
_dict['binary_config'] = self.binary_config.to_dict()
# override the default output from pydantic by calling `to_dict()` of auto_run_agents
if self.auto_run_agents:
_dict['auto_run_agents'] = self.auto_run_agents.to_dict()
# set to None if symbols (nullable) is None
# and model_fields_set contains the field
if self.symbols is None and "symbols" in self.model_fields_set:
Expand Down Expand Up @@ -124,7 +129,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"symbols": Symbols.from_dict(obj["symbols"]) if obj.get("symbols") is not None else None,
"debug_hash": obj.get("debug_hash"),
"analysis_config": AnalysisConfig.from_dict(obj["analysis_config"]) if obj.get("analysis_config") is not None else None,
"binary_config": BinaryConfig.from_dict(obj["binary_config"]) if obj.get("binary_config") is not None else None
"binary_config": BinaryConfig.from_dict(obj["binary_config"]) if obj.get("binary_config") is not None else None,
"auto_run_agents": AutoRunAgents.from_dict(obj["auto_run_agents"]) if obj.get("auto_run_agents") is not None else None
})
return _obj

Expand Down
10 changes: 8 additions & 2 deletions revengai/models/analysis_detail_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr
from typing import Any, ClassVar, Dict, List, Optional
from revengai.models.analysis_access_info import AnalysisAccessInfo
from revengai.models.auto_run_agents import AutoRunAgents
from typing import Optional, Set
from typing_extensions import Self

Expand All @@ -41,7 +42,8 @@ class AnalysisDetailResponse(BaseModel):
model_name: StrictStr
sbom: Optional[Dict[str, Any]] = None
sha_256_hash: StrictStr
__properties: ClassVar[List[str]] = ["access", "analysis_id", "analysis_scope", "architecture", "binary_dynamic", "binary_format", "binary_name", "binary_size", "binary_type", "creation", "dashboard_url", "debug", "model_name", "sbom", "sha_256_hash"]
auto_run_agents: AutoRunAgents
__properties: ClassVar[List[str]] = ["access", "analysis_id", "analysis_scope", "architecture", "binary_dynamic", "binary_format", "binary_name", "binary_size", "binary_type", "creation", "dashboard_url", "debug", "model_name", "sbom", "sha_256_hash", "auto_run_agents"]

model_config = ConfigDict(
populate_by_name=True,
Expand Down Expand Up @@ -85,6 +87,9 @@ def to_dict(self) -> Dict[str, Any]:
# override the default output from pydantic by calling `to_dict()` of access
if self.access:
_dict['access'] = self.access.to_dict()
# override the default output from pydantic by calling `to_dict()` of auto_run_agents
if self.auto_run_agents:
_dict['auto_run_agents'] = self.auto_run_agents.to_dict()
# set to None if sbom (nullable) is None
# and model_fields_set contains the field
if self.sbom is None and "sbom" in self.model_fields_set:
Expand Down Expand Up @@ -116,7 +121,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
"debug": obj.get("debug"),
"model_name": obj.get("model_name"),
"sbom": obj.get("sbom"),
"sha_256_hash": obj.get("sha_256_hash")
"sha_256_hash": obj.get("sha_256_hash"),
"auto_run_agents": AutoRunAgents.from_dict(obj["auto_run_agents"]) if obj.get("auto_run_agents") is not None else None
})
return _obj

Expand Down
86 changes: 86 additions & 0 deletions revengai/models/auto_run_agents.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# 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, StrictBool
from typing import Any, ClassVar, Dict, List, Optional
from typing import Optional, Set
from typing_extensions import Self

class AutoRunAgents(BaseModel):
"""
AutoRunAgents
""" # noqa: E501
triage: Optional[StrictBool] = False
__properties: ClassVar[List[str]] = ["triage"]

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 AutoRunAgents 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 AutoRunAgents from a dict"""
if obj is None:
return None

if not isinstance(obj, dict):
return cls.model_validate(obj)

_obj = cls.model_validate({
"triage": obj.get("triage") if obj.get("triage") is not None else False
})
return _obj


4 changes: 3 additions & 1 deletion test/test_analysis_create_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@ def make_instance(self, include_optional) -> AnalysisCreateRequest:
binary_config = revengai.models.binary_config.BinaryConfig(
isa = 'x86',
platform = 'linux',
file_format = 'pe', )
file_format = 'pe', ),
auto_run_agents = revengai.models.auto_run_agents.AutoRunAgents(
triage = True, )
)
else:
return AnalysisCreateRequest(
Expand Down
6 changes: 5 additions & 1 deletion test/test_analysis_detail_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,9 @@ def make_instance(self, include_optional) -> AnalysisDetailResponse:
sbom = {
'key' : null
},
sha_256_hash = ''
sha_256_hash = '',
auto_run_agents = revengai.models.auto_run_agents.AutoRunAgents(
triage = True, )
)
else:
return AnalysisDetailResponse(
Expand All @@ -72,6 +74,8 @@ def make_instance(self, include_optional) -> AnalysisDetailResponse:
debug = True,
model_name = '',
sha_256_hash = '',
auto_run_agents = revengai.models.auto_run_agents.AutoRunAgents(
triage = True, ),
)
"""

Expand Down
50 changes: 50 additions & 0 deletions test/test_auto_run_agents.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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.auto_run_agents import AutoRunAgents

class TestAutoRunAgents(unittest.TestCase):
"""AutoRunAgents unit test stubs"""

def setUp(self):
pass

def tearDown(self):
pass

def make_instance(self, include_optional) -> AutoRunAgents:
"""Test AutoRunAgents
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 `AutoRunAgents`
"""
model = AutoRunAgents()
if include_optional:
return AutoRunAgents(
triage = True
)
else:
return AutoRunAgents(
)
"""

def testAutoRunAgents(self):
"""Test AutoRunAgents"""
# inst_req_only = self.make_instance(include_optional=False)
# inst_req_and_optional = self.make_instance(include_optional=True)

if __name__ == '__main__':
unittest.main()
4 changes: 3 additions & 1 deletion test/test_base_response_analysis_detail_response.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ def make_instance(self, include_optional) -> BaseResponseAnalysisDetailResponse:
sbom = {
'key' : null
},
sha_256_hash = '', ),
sha_256_hash = '',
auto_run_agents = revengai.models.auto_run_agents.AutoRunAgents(
triage = True, ), ),
message = '',
errors = [
revengai.models.error_model.ErrorModel(
Expand Down