From bc03b2fd69d45140357b91a477e7316d5df63232 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 18 Mar 2026 06:32:00 +0000 Subject: [PATCH] Update SDK to version v3.43.0 - Generated from OpenAPI spec version v3.43.0 - Auto-generated by GitHub Actions --- .sdk-version | 2 +- README.md | 8 +- docs/AnalysesXRefsApi.md | 16 +- ...nseXRef.md => BaseResponseXrefResponse.md} | 18 +-- docs/{XRef.md => XrefFromResponse.md} | 20 +-- docs/XrefResponse.md | 30 ++++ docs/XrefToResponse.md | 37 +++++ revengai/__init__.py | 14 +- revengai/api/analyses_x_refs_api.py | 30 ++-- revengai/api_client.py | 2 +- revengai/configuration.py | 4 +- revengai/models/__init__.py | 6 +- ..._ref.py => base_response_xref_response.py} | 14 +- .../{x_ref.py => xref_from_response.py} | 32 ++-- revengai/models/xref_response.py | 104 ++++++++++++ revengai/models/xref_to_response.py | 151 ++++++++++++++++++ test/test_analyses_x_refs_api.py | 2 +- test/test_base_response_x_ref.py | 77 --------- test/test_base_response_xref_response.py | 91 +++++++++++ ...st_x_ref.py => test_xref_from_response.py} | 28 ++-- test/test_xref_response.py | 121 ++++++++++++++ test/test_xref_to_response.py | 66 ++++++++ 22 files changed, 702 insertions(+), 171 deletions(-) rename docs/{BaseResponseXRef.md => BaseResponseXrefResponse.md} (53%) rename docs/{XRef.md => XrefFromResponse.md} (61%) create mode 100644 docs/XrefResponse.md create mode 100644 docs/XrefToResponse.md rename revengai/models/{base_response_x_ref.py => base_response_xref_response.py} (91%) rename revengai/models/{x_ref.py => xref_from_response.py} (88%) create mode 100644 revengai/models/xref_response.py create mode 100644 revengai/models/xref_to_response.py delete mode 100644 test/test_base_response_x_ref.py create mode 100644 test/test_base_response_xref_response.py rename test/{test_x_ref.py => test_xref_from_response.py} (71%) create mode 100644 test/test_xref_response.py create mode 100644 test/test_xref_to_response.py diff --git a/.sdk-version b/.sdk-version index 235075b..005235b 100644 --- a/.sdk-version +++ b/.sdk-version @@ -1 +1 @@ -v3.42.1 +v3.43.0 diff --git a/README.md b/README.md index 964d177..82eb918 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,7 @@ Class | Method | HTTP request | Description *AnalysesSecurityChecksApi* | [**create_scurity_checks_task**](docs/AnalysesSecurityChecksApi.md#create_scurity_checks_task) | **POST** /v2/analyses/{analysis_id}/security-checks | Queues a security check process *AnalysesSecurityChecksApi* | [**get_security_checks**](docs/AnalysesSecurityChecksApi.md#get_security_checks) | **GET** /v2/analyses/{analysis_id}/security-checks | Get Security Checks *AnalysesSecurityChecksApi* | [**get_security_checks_task_status**](docs/AnalysesSecurityChecksApi.md#get_security_checks_task_status) | **GET** /v2/analyses/{analysis_id}/security-checks/status | Check the status of a security check process -*AnalysesXRefsApi* | [**get_xref_by_vaddr**](docs/AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up an xref by virtual address +*AnalysesXRefsApi* | [**get_xref_by_vaddr**](docs/AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address *AuthenticationUsersApi* | [**get_requester_user_info**](docs/AuthenticationUsersApi.md#get_requester_user_info) | **GET** /v2/users/me | Get the requesters user information *AuthenticationUsersApi* | [**get_user**](docs/AuthenticationUsersApi.md#get_user) | **GET** /v2/users/{user_id} | Get a user's public information *AuthenticationUsersApi* | [**get_user_activity**](docs/AuthenticationUsersApi.md#get_user_activity) | **GET** /v2/users/activity | Get auth user activity @@ -264,7 +264,7 @@ Class | Method | HTTP request | Description - [BaseResponseTaskResponse](docs/BaseResponseTaskResponse.md) - [BaseResponseUploadResponse](docs/BaseResponseUploadResponse.md) - [BaseResponseVulnerabilities](docs/BaseResponseVulnerabilities.md) - - [BaseResponseXRef](docs/BaseResponseXRef.md) + - [BaseResponseXrefResponse](docs/BaseResponseXrefResponse.md) - [Basic](docs/Basic.md) - [BinariesRelatedStatusResponse](docs/BinariesRelatedStatusResponse.md) - [BinariesTaskStatus](docs/BinariesTaskStatus.md) @@ -457,4 +457,6 @@ Class | Method | HTTP request | Description - [Vulnerability](docs/Vulnerability.md) - [VulnerabilityType](docs/VulnerabilityType.md) - [Workspace](docs/Workspace.md) - - [XRef](docs/XRef.md) + - [XrefFromResponse](docs/XrefFromResponse.md) + - [XrefResponse](docs/XrefResponse.md) + - [XrefToResponse](docs/XrefToResponse.md) diff --git a/docs/AnalysesXRefsApi.md b/docs/AnalysesXRefsApi.md index 9aee5e3..db3e3db 100644 --- a/docs/AnalysesXRefsApi.md +++ b/docs/AnalysesXRefsApi.md @@ -4,13 +4,13 @@ All URIs are relative to *https://api.reveng.ai* Method | HTTP request | Description ------------- | ------------- | ------------- -[**get_xref_by_vaddr**](AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up an xref by virtual address +[**get_xref_by_vaddr**](AnalysesXRefsApi.md#get_xref_by_vaddr) | **GET** /v2/analyses/{analysis_id}/xrefs/{vaddr} | [Beta] Look up xrefs by virtual address # **get_xref_by_vaddr** -> BaseResponseXRef get_xref_by_vaddr(analysis_id, vaddr) +> BaseResponseXrefResponse get_xref_by_vaddr(analysis_id, vaddr) -[Beta] Look up an xref by virtual address +[Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** @@ -20,7 +20,7 @@ Method | HTTP request | Description ```python import revengai -from revengai.models.base_response_x_ref import BaseResponseXRef +from revengai.models.base_response_xref_response import BaseResponseXrefResponse from revengai.rest import ApiException from pprint import pprint @@ -46,10 +46,10 @@ with revengai.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = revengai.AnalysesXRefsApi(api_client) analysis_id = 56 # int | - vaddr = 56 # int | Virtual address to match against xref_to + vaddr = 56 # int | Virtual address to match against xrefs try: - # [Beta] Look up an xref by virtual address + # [Beta] Look up xrefs by virtual address api_response = api_instance.get_xref_by_vaddr(analysis_id, vaddr) print("The response of AnalysesXRefsApi->get_xref_by_vaddr:\n") pprint(api_response) @@ -65,11 +65,11 @@ with revengai.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **analysis_id** | **int**| | - **vaddr** | **int**| Virtual address to match against xref_to | + **vaddr** | **int**| Virtual address to match against xrefs | ### Return type -[**BaseResponseXRef**](BaseResponseXRef.md) +[**BaseResponseXrefResponse**](BaseResponseXrefResponse.md) ### Authorization diff --git a/docs/BaseResponseXRef.md b/docs/BaseResponseXrefResponse.md similarity index 53% rename from docs/BaseResponseXRef.md rename to docs/BaseResponseXrefResponse.md index 4d05a09..66fb9d4 100644 --- a/docs/BaseResponseXRef.md +++ b/docs/BaseResponseXrefResponse.md @@ -1,4 +1,4 @@ -# BaseResponseXRef +# BaseResponseXrefResponse ## Properties @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **status** | **bool** | Response status on whether the request succeeded | [optional] [default to True] -**data** | [**XRef**](XRef.md) | | [optional] +**data** | [**XrefResponse**](XrefResponse.md) | | [optional] **message** | **str** | | [optional] **errors** | [**List[ErrorModel]**](ErrorModel.md) | | [optional] **meta** | [**MetaModel**](MetaModel.md) | Metadata | [optional] @@ -14,19 +14,19 @@ Name | Type | Description | Notes ## Example ```python -from revengai.models.base_response_x_ref import BaseResponseXRef +from revengai.models.base_response_xref_response import BaseResponseXrefResponse # TODO update the JSON string below json = "{}" -# create an instance of BaseResponseXRef from a JSON string -base_response_x_ref_instance = BaseResponseXRef.from_json(json) +# create an instance of BaseResponseXrefResponse from a JSON string +base_response_xref_response_instance = BaseResponseXrefResponse.from_json(json) # print the JSON string representation of the object -print(BaseResponseXRef.to_json()) +print(BaseResponseXrefResponse.to_json()) # convert the object into a dict -base_response_x_ref_dict = base_response_x_ref_instance.to_dict() -# create an instance of BaseResponseXRef from a dict -base_response_x_ref_from_dict = BaseResponseXRef.from_dict(base_response_x_ref_dict) +base_response_xref_response_dict = base_response_xref_response_instance.to_dict() +# create an instance of BaseResponseXrefResponse from a dict +base_response_xref_response_from_dict = BaseResponseXrefResponse.from_dict(base_response_xref_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/XRef.md b/docs/XrefFromResponse.md similarity index 61% rename from docs/XRef.md rename to docs/XrefFromResponse.md index 70c30fb..b06c89e 100644 --- a/docs/XRef.md +++ b/docs/XrefFromResponse.md @@ -1,4 +1,4 @@ -# XRef +# XrefFromResponse ## Properties @@ -6,31 +6,31 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **value** | **str** | | -**xref_to** | **str** | | **is_scalar** | **bool** | | [optional] **is_call** | **bool** | | [optional] **is_data** | **bool** | | [optional] **is_string** | **bool** | | [optional] -**raw_data** | **bytearray** | | [optional] +**raw_data** | **str** | | [optional] **segment** | [**SegmentInfo**](SegmentInfo.md) | | [optional] **orig_str_encoding** | **str** | | [optional] +**xref_to** | **str** | | ## Example ```python -from revengai.models.x_ref import XRef +from revengai.models.xref_from_response import XrefFromResponse # TODO update the JSON string below json = "{}" -# create an instance of XRef from a JSON string -x_ref_instance = XRef.from_json(json) +# create an instance of XrefFromResponse from a JSON string +xref_from_response_instance = XrefFromResponse.from_json(json) # print the JSON string representation of the object -print(XRef.to_json()) +print(XrefFromResponse.to_json()) # convert the object into a dict -x_ref_dict = x_ref_instance.to_dict() -# create an instance of XRef from a dict -x_ref_from_dict = XRef.from_dict(x_ref_dict) +xref_from_response_dict = xref_from_response_instance.to_dict() +# create an instance of XrefFromResponse from a dict +xref_from_response_from_dict = XrefFromResponse.from_dict(xref_from_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/XrefResponse.md b/docs/XrefResponse.md new file mode 100644 index 0000000..f9a7e47 --- /dev/null +++ b/docs/XrefResponse.md @@ -0,0 +1,30 @@ +# XrefResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**xref_to_list** | [**List[XrefToResponse]**](XrefToResponse.md) | | +**xref_from_list** | [**List[XrefFromResponse]**](XrefFromResponse.md) | | + +## Example + +```python +from revengai.models.xref_response import XrefResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of XrefResponse from a JSON string +xref_response_instance = XrefResponse.from_json(json) +# print the JSON string representation of the object +print(XrefResponse.to_json()) + +# convert the object into a dict +xref_response_dict = xref_response_instance.to_dict() +# create an instance of XrefResponse from a dict +xref_response_from_dict = XrefResponse.from_dict(xref_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/XrefToResponse.md b/docs/XrefToResponse.md new file mode 100644 index 0000000..91b3bc3 --- /dev/null +++ b/docs/XrefToResponse.md @@ -0,0 +1,37 @@ +# XrefToResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | | +**is_scalar** | **bool** | | [optional] +**is_call** | **bool** | | [optional] +**is_data** | **bool** | | [optional] +**is_string** | **bool** | | [optional] +**raw_data** | **str** | | [optional] +**segment** | [**SegmentInfo**](SegmentInfo.md) | | [optional] +**orig_str_encoding** | **str** | | [optional] +**xref_from** | **str** | | + +## Example + +```python +from revengai.models.xref_to_response import XrefToResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of XrefToResponse from a JSON string +xref_to_response_instance = XrefToResponse.from_json(json) +# print the JSON string representation of the object +print(XrefToResponse.to_json()) + +# convert the object into a dict +xref_to_response_dict = xref_to_response_instance.to_dict() +# create an instance of XrefToResponse from a dict +xref_to_response_from_dict = XrefToResponse.from_dict(xref_to_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/revengai/__init__.py b/revengai/__init__.py index 935a6a8..6ca93e4 100644 --- a/revengai/__init__.py +++ b/revengai/__init__.py @@ -13,7 +13,7 @@ """ # noqa: E501 -__version__ = "v3.42.1" +__version__ = "v3.43.0" # Define package exports __all__ = [ @@ -156,7 +156,7 @@ "BaseResponseTaskResponse", "BaseResponseUploadResponse", "BaseResponseVulnerabilities", - "BaseResponseXRef", + "BaseResponseXrefResponse", "Basic", "BinariesRelatedStatusResponse", "BinariesTaskStatus", @@ -349,7 +349,9 @@ "Vulnerability", "VulnerabilityType", "Workspace", - "XRef", + "XrefFromResponse", + "XrefResponse", + "XrefToResponse", ] # import apis into sdk package @@ -496,7 +498,7 @@ from revengai.models.base_response_task_response import BaseResponseTaskResponse as BaseResponseTaskResponse from revengai.models.base_response_upload_response import BaseResponseUploadResponse as BaseResponseUploadResponse from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities as BaseResponseVulnerabilities -from revengai.models.base_response_x_ref import BaseResponseXRef as BaseResponseXRef +from revengai.models.base_response_xref_response import BaseResponseXrefResponse as BaseResponseXrefResponse from revengai.models.basic import Basic as Basic from revengai.models.binaries_related_status_response import BinariesRelatedStatusResponse as BinariesRelatedStatusResponse from revengai.models.binaries_task_status import BinariesTaskStatus as BinariesTaskStatus @@ -689,5 +691,7 @@ from revengai.models.vulnerability import Vulnerability as Vulnerability from revengai.models.vulnerability_type import VulnerabilityType as VulnerabilityType from revengai.models.workspace import Workspace as Workspace -from revengai.models.x_ref import XRef as XRef +from revengai.models.xref_from_response import XrefFromResponse as XrefFromResponse +from revengai.models.xref_response import XrefResponse as XrefResponse +from revengai.models.xref_to_response import XrefToResponse as XrefToResponse diff --git a/revengai/api/analyses_x_refs_api.py b/revengai/api/analyses_x_refs_api.py index 0e2968f..d6ad56c 100644 --- a/revengai/api/analyses_x_refs_api.py +++ b/revengai/api/analyses_x_refs_api.py @@ -17,7 +17,7 @@ from pydantic import Field, StrictInt from typing_extensions import Annotated -from revengai.models.base_response_x_ref import BaseResponseXRef +from revengai.models.base_response_xref_response import BaseResponseXrefResponse from revengai.api_client import ApiClient, RequestSerialized from revengai.api_response import ApiResponse @@ -41,7 +41,7 @@ def __init__(self, api_client=None) -> None: def get_xref_by_vaddr( self, analysis_id: StrictInt, - vaddr: Annotated[StrictInt, Field(description="Virtual address to match against xref_to")], + vaddr: Annotated[StrictInt, Field(description="Virtual address to match against xrefs")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -54,14 +54,14 @@ def get_xref_by_vaddr( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> BaseResponseXRef: - """[Beta] Look up an xref by virtual address + ) -> BaseResponseXrefResponse: + """[Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** :param analysis_id: (required) :type analysis_id: int - :param vaddr: Virtual address to match against xref_to (required) + :param vaddr: Virtual address to match against xrefs (required) :type vaddr: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -95,7 +95,7 @@ def get_xref_by_vaddr( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseXRef", + '200': "BaseResponseXrefResponse", '422': "BaseResponse", '404': "ErrorModel", } @@ -114,7 +114,7 @@ def get_xref_by_vaddr( def get_xref_by_vaddr_with_http_info( self, analysis_id: StrictInt, - vaddr: Annotated[StrictInt, Field(description="Virtual address to match against xref_to")], + vaddr: Annotated[StrictInt, Field(description="Virtual address to match against xrefs")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -127,14 +127,14 @@ def get_xref_by_vaddr_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[BaseResponseXRef]: - """[Beta] Look up an xref by virtual address + ) -> ApiResponse[BaseResponseXrefResponse]: + """[Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** :param analysis_id: (required) :type analysis_id: int - :param vaddr: Virtual address to match against xref_to (required) + :param vaddr: Virtual address to match against xrefs (required) :type vaddr: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -168,7 +168,7 @@ def get_xref_by_vaddr_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseXRef", + '200': "BaseResponseXrefResponse", '422': "BaseResponse", '404': "ErrorModel", } @@ -187,7 +187,7 @@ def get_xref_by_vaddr_with_http_info( def get_xref_by_vaddr_without_preload_content( self, analysis_id: StrictInt, - vaddr: Annotated[StrictInt, Field(description="Virtual address to match against xref_to")], + vaddr: Annotated[StrictInt, Field(description="Virtual address to match against xrefs")], _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -201,13 +201,13 @@ def get_xref_by_vaddr_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """[Beta] Look up an xref by virtual address + """[Beta] Look up xrefs by virtual address **This endpoint is in beta and may change without notice.** :param analysis_id: (required) :type analysis_id: int - :param vaddr: Virtual address to match against xref_to (required) + :param vaddr: Virtual address to match against xrefs (required) :type vaddr: int :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -241,7 +241,7 @@ def get_xref_by_vaddr_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': "BaseResponseXRef", + '200': "BaseResponseXrefResponse", '422': "BaseResponse", '404': "ErrorModel", } diff --git a/revengai/api_client.py b/revengai/api_client.py index 6062e80..723bbc6 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/v3.42.1/python' + self.user_agent = 'OpenAPI-Generator/v3.43.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/revengai/configuration.py b/revengai/configuration.py index 2dfd040..bf48368 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: v3.42.1\n"\ - "SDK Package Version: v3.42.1".\ + "Version of the API: v3.43.0\n"\ + "SDK Package Version: v3.43.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 fdd2437..1e24ba8 100644 --- a/revengai/models/__init__.py +++ b/revengai/models/__init__.py @@ -122,7 +122,7 @@ from revengai.models.base_response_task_response import BaseResponseTaskResponse from revengai.models.base_response_upload_response import BaseResponseUploadResponse from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities -from revengai.models.base_response_x_ref import BaseResponseXRef +from revengai.models.base_response_xref_response import BaseResponseXrefResponse from revengai.models.basic import Basic from revengai.models.binaries_related_status_response import BinariesRelatedStatusResponse from revengai.models.binaries_task_status import BinariesTaskStatus @@ -315,5 +315,7 @@ from revengai.models.vulnerability import Vulnerability from revengai.models.vulnerability_type import VulnerabilityType from revengai.models.workspace import Workspace -from revengai.models.x_ref import XRef +from revengai.models.xref_from_response import XrefFromResponse +from revengai.models.xref_response import XrefResponse +from revengai.models.xref_to_response import XrefToResponse diff --git a/revengai/models/base_response_x_ref.py b/revengai/models/base_response_xref_response.py similarity index 91% rename from revengai/models/base_response_x_ref.py rename to revengai/models/base_response_xref_response.py index 6a00bfb..a1424c9 100644 --- a/revengai/models/base_response_x_ref.py +++ b/revengai/models/base_response_xref_response.py @@ -20,16 +20,16 @@ from typing import Any, ClassVar, Dict, List, Optional from revengai.models.error_model import ErrorModel from revengai.models.meta_model import MetaModel -from revengai.models.x_ref import XRef +from revengai.models.xref_response import XrefResponse from typing import Optional, Set from typing_extensions import Self -class BaseResponseXRef(BaseModel): +class BaseResponseXrefResponse(BaseModel): """ - BaseResponseXRef + BaseResponseXrefResponse """ # noqa: E501 status: Optional[StrictBool] = Field(default=True, description="Response status on whether the request succeeded") - data: Optional[XRef] = None + data: Optional[XrefResponse] = None message: Optional[StrictStr] = None errors: Optional[List[ErrorModel]] = None meta: Optional[MetaModel] = Field(default=None, description="Metadata") @@ -53,7 +53,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of BaseResponseXRef from a JSON string""" + """Create an instance of BaseResponseXrefResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -106,7 +106,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of BaseResponseXRef from a dict""" + """Create an instance of BaseResponseXrefResponse from a dict""" if obj is None: return None @@ -115,7 +115,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "status": obj.get("status") if obj.get("status") is not None else True, - "data": XRef.from_dict(obj["data"]) if obj.get("data") is not None else None, + "data": XrefResponse.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 diff --git a/revengai/models/x_ref.py b/revengai/models/xref_from_response.py similarity index 88% rename from revengai/models/x_ref.py rename to revengai/models/xref_from_response.py index 5ebf12f..71fd222 100644 --- a/revengai/models/x_ref.py +++ b/revengai/models/xref_from_response.py @@ -16,26 +16,26 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictBool, StrictBytes, StrictStr -from typing import Any, ClassVar, Dict, List, Optional, Tuple, Union +from pydantic import BaseModel, ConfigDict, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from revengai.models.segment_info import SegmentInfo from typing import Optional, Set from typing_extensions import Self -class XRef(BaseModel): +class XrefFromResponse(BaseModel): """ - XRef + XrefFromResponse """ # noqa: E501 value: Optional[StrictStr] - xref_to: Optional[StrictStr] is_scalar: Optional[StrictBool] = None is_call: Optional[StrictBool] = None is_data: Optional[StrictBool] = None is_string: Optional[StrictBool] = None - raw_data: Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]] = None + raw_data: Optional[StrictStr] = None segment: Optional[SegmentInfo] = None orig_str_encoding: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["value", "xref_to", "is_scalar", "is_call", "is_data", "is_string", "raw_data", "segment", "orig_str_encoding"] + xref_to: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["value", "is_scalar", "is_call", "is_data", "is_string", "raw_data", "segment", "orig_str_encoding", "xref_to"] model_config = ConfigDict( populate_by_name=True, @@ -55,7 +55,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of XRef from a JSON string""" + """Create an instance of XrefFromResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -84,11 +84,6 @@ def to_dict(self) -> Dict[str, Any]: if self.value is None and "value" in self.model_fields_set: _dict['value'] = None - # set to None if xref_to (nullable) is None - # and model_fields_set contains the field - if self.xref_to is None and "xref_to" in self.model_fields_set: - _dict['xref_to'] = None - # set to None if is_scalar (nullable) is None # and model_fields_set contains the field if self.is_scalar is None and "is_scalar" in self.model_fields_set: @@ -124,11 +119,16 @@ def to_dict(self) -> Dict[str, Any]: if self.orig_str_encoding is None and "orig_str_encoding" in self.model_fields_set: _dict['orig_str_encoding'] = None + # set to None if xref_to (nullable) is None + # and model_fields_set contains the field + if self.xref_to is None and "xref_to" in self.model_fields_set: + _dict['xref_to'] = None + return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of XRef from a dict""" + """Create an instance of XrefFromResponse from a dict""" if obj is None: return None @@ -137,14 +137,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "value": obj.get("value"), - "xref_to": obj.get("xref_to"), "is_scalar": obj.get("is_scalar"), "is_call": obj.get("is_call"), "is_data": obj.get("is_data"), "is_string": obj.get("is_string"), "raw_data": obj.get("raw_data"), "segment": SegmentInfo.from_dict(obj["segment"]) if obj.get("segment") is not None else None, - "orig_str_encoding": obj.get("orig_str_encoding") + "orig_str_encoding": obj.get("orig_str_encoding"), + "xref_to": obj.get("xref_to") }) return _obj diff --git a/revengai/models/xref_response.py b/revengai/models/xref_response.py new file mode 100644 index 0000000..78b4087 --- /dev/null +++ b/revengai/models/xref_response.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + 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 +from typing import Any, ClassVar, Dict, List +from revengai.models.xref_from_response import XrefFromResponse +from revengai.models.xref_to_response import XrefToResponse +from typing import Optional, Set +from typing_extensions import Self + +class XrefResponse(BaseModel): + """ + XrefResponse + """ # noqa: E501 + xref_to_list: List[XrefToResponse] + xref_from_list: List[XrefFromResponse] + __properties: ClassVar[List[str]] = ["xref_to_list", "xref_from_list"] + + 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 XrefResponse 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 each item in xref_to_list (list) + _items = [] + if self.xref_to_list: + for _item_xref_to_list in self.xref_to_list: + if _item_xref_to_list: + _items.append(_item_xref_to_list.to_dict()) + _dict['xref_to_list'] = _items + # override the default output from pydantic by calling `to_dict()` of each item in xref_from_list (list) + _items = [] + if self.xref_from_list: + for _item_xref_from_list in self.xref_from_list: + if _item_xref_from_list: + _items.append(_item_xref_from_list.to_dict()) + _dict['xref_from_list'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of XrefResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "xref_to_list": [XrefToResponse.from_dict(_item) for _item in obj["xref_to_list"]] if obj.get("xref_to_list") is not None else None, + "xref_from_list": [XrefFromResponse.from_dict(_item) for _item in obj["xref_from_list"]] if obj.get("xref_from_list") is not None else None + }) + return _obj + + diff --git a/revengai/models/xref_to_response.py b/revengai/models/xref_to_response.py new file mode 100644 index 0000000..253563a --- /dev/null +++ b/revengai/models/xref_to_response.py @@ -0,0 +1,151 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + 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, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from revengai.models.segment_info import SegmentInfo +from typing import Optional, Set +from typing_extensions import Self + +class XrefToResponse(BaseModel): + """ + XrefToResponse + """ # noqa: E501 + value: Optional[StrictStr] + is_scalar: Optional[StrictBool] = None + is_call: Optional[StrictBool] = None + is_data: Optional[StrictBool] = None + is_string: Optional[StrictBool] = None + raw_data: Optional[StrictStr] = None + segment: Optional[SegmentInfo] = None + orig_str_encoding: Optional[StrictStr] = None + xref_from: Optional[StrictStr] + __properties: ClassVar[List[str]] = ["value", "is_scalar", "is_call", "is_data", "is_string", "raw_data", "segment", "orig_str_encoding", "xref_from"] + + 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 XrefToResponse 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 segment + if self.segment: + _dict['segment'] = self.segment.to_dict() + # set to None if value (nullable) is None + # and model_fields_set contains the field + if self.value is None and "value" in self.model_fields_set: + _dict['value'] = None + + # set to None if is_scalar (nullable) is None + # and model_fields_set contains the field + if self.is_scalar is None and "is_scalar" in self.model_fields_set: + _dict['is_scalar'] = None + + # set to None if is_call (nullable) is None + # and model_fields_set contains the field + if self.is_call is None and "is_call" in self.model_fields_set: + _dict['is_call'] = None + + # set to None if is_data (nullable) is None + # and model_fields_set contains the field + if self.is_data is None and "is_data" in self.model_fields_set: + _dict['is_data'] = None + + # set to None if is_string (nullable) is None + # and model_fields_set contains the field + if self.is_string is None and "is_string" in self.model_fields_set: + _dict['is_string'] = None + + # set to None if raw_data (nullable) is None + # and model_fields_set contains the field + if self.raw_data is None and "raw_data" in self.model_fields_set: + _dict['raw_data'] = None + + # set to None if segment (nullable) is None + # and model_fields_set contains the field + if self.segment is None and "segment" in self.model_fields_set: + _dict['segment'] = None + + # set to None if orig_str_encoding (nullable) is None + # and model_fields_set contains the field + if self.orig_str_encoding is None and "orig_str_encoding" in self.model_fields_set: + _dict['orig_str_encoding'] = None + + # set to None if xref_from (nullable) is None + # and model_fields_set contains the field + if self.xref_from is None and "xref_from" in self.model_fields_set: + _dict['xref_from'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of XrefToResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "value": obj.get("value"), + "is_scalar": obj.get("is_scalar"), + "is_call": obj.get("is_call"), + "is_data": obj.get("is_data"), + "is_string": obj.get("is_string"), + "raw_data": obj.get("raw_data"), + "segment": SegmentInfo.from_dict(obj["segment"]) if obj.get("segment") is not None else None, + "orig_str_encoding": obj.get("orig_str_encoding"), + "xref_from": obj.get("xref_from") + }) + return _obj + + diff --git a/test/test_analyses_x_refs_api.py b/test/test_analyses_x_refs_api.py index d36640b..58381e1 100644 --- a/test/test_analyses_x_refs_api.py +++ b/test/test_analyses_x_refs_api.py @@ -28,7 +28,7 @@ def tearDown(self) -> None: def test_get_xref_by_vaddr(self) -> None: """Test case for get_xref_by_vaddr - [Beta] Look up an xref by virtual address + [Beta] Look up xrefs by virtual address """ pass diff --git a/test/test_base_response_x_ref.py b/test/test_base_response_x_ref.py deleted file mode 100644 index 5155b65..0000000 --- a/test/test_base_response_x_ref.py +++ /dev/null @@ -1,77 +0,0 @@ -# coding: utf-8 - -""" - RevEng.AI API - - RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. - - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from revengai.models.base_response_x_ref import BaseResponseXRef - -class TestBaseResponseXRef(unittest.TestCase): - """BaseResponseXRef unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> BaseResponseXRef: - """Test BaseResponseXRef - 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 `BaseResponseXRef` - """ - model = BaseResponseXRef() - if include_optional: - return BaseResponseXRef( - status = True, - data = revengai.models.x_ref.XRef( - value = '', - xref_to = '', - is_scalar = True, - is_call = True, - is_data = True, - is_string = True, - raw_data = bytes(b'blah'), - segment = revengai.models.segment_info.SegmentInfo( - name = '', - r = True, - w = True, - x = True, - start = 56, - end = 56, ), - orig_str_encoding = '', ), - 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 BaseResponseXRef( - ) - """ - - def testBaseResponseXRef(self): - """Test BaseResponseXRef""" - # 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_base_response_xref_response.py b/test/test_base_response_xref_response.py new file mode 100644 index 0000000..5a92bca --- /dev/null +++ b/test/test_base_response_xref_response.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.base_response_xref_response import BaseResponseXrefResponse + +class TestBaseResponseXrefResponse(unittest.TestCase): + """BaseResponseXrefResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> BaseResponseXrefResponse: + """Test BaseResponseXrefResponse + 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 `BaseResponseXrefResponse` + """ + model = BaseResponseXrefResponse() + if include_optional: + return BaseResponseXrefResponse( + status = True, + data = revengai.models.xref_response.XrefResponse( + xref_to_list = [ + revengai.models.xref_to_response.XrefToResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + segment = revengai.models.segment_info.SegmentInfo( + name = '', + r = True, + w = True, + x = True, + start = 56, + end = 56, ), + orig_str_encoding = '', + xref_from = '', ) + ], + xref_from_list = [ + revengai.models.xref_from_response.XrefFromResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + orig_str_encoding = '', + xref_to = '', ) + ], ), + 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 BaseResponseXrefResponse( + ) + """ + + def testBaseResponseXrefResponse(self): + """Test BaseResponseXrefResponse""" + # 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_x_ref.py b/test/test_xref_from_response.py similarity index 71% rename from test/test_x_ref.py rename to test/test_xref_from_response.py index ad0d40c..1217476 100644 --- a/test/test_x_ref.py +++ b/test/test_xref_from_response.py @@ -13,10 +13,10 @@ import unittest -from revengai.models.x_ref import XRef +from revengai.models.xref_from_response import XrefFromResponse -class TestXRef(unittest.TestCase): - """XRef unit test stubs""" +class TestXrefFromResponse(unittest.TestCase): + """XrefFromResponse unit test stubs""" def setUp(self): pass @@ -24,23 +24,22 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> XRef: - """Test XRef + def make_instance(self, include_optional) -> XrefFromResponse: + """Test XrefFromResponse 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 `XRef` + # uncomment below to create an instance of `XrefFromResponse` """ - model = XRef() + model = XrefFromResponse() if include_optional: - return XRef( + return XrefFromResponse( value = '', - xref_to = '', is_scalar = True, is_call = True, is_data = True, is_string = True, - raw_data = bytes(b'blah'), + raw_data = '', segment = revengai.models.segment_info.SegmentInfo( name = '', r = True, @@ -48,17 +47,18 @@ def make_instance(self, include_optional) -> XRef: x = True, start = 56, end = 56, ), - orig_str_encoding = '' + orig_str_encoding = '', + xref_to = '' ) else: - return XRef( + return XrefFromResponse( value = '', xref_to = '', ) """ - def testXRef(self): - """Test XRef""" + def testXrefFromResponse(self): + """Test XrefFromResponse""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_xref_response.py b/test/test_xref_response.py new file mode 100644 index 0000000..47da47e --- /dev/null +++ b/test/test_xref_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.xref_response import XrefResponse + +class TestXrefResponse(unittest.TestCase): + """XrefResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> XrefResponse: + """Test XrefResponse + 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 `XrefResponse` + """ + model = XrefResponse() + if include_optional: + return XrefResponse( + xref_to_list = [ + revengai.models.xref_to_response.XrefToResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + segment = revengai.models.segment_info.SegmentInfo( + name = '', + r = True, + w = True, + x = True, + start = 56, + end = 56, ), + orig_str_encoding = '', + xref_from = '', ) + ], + xref_from_list = [ + revengai.models.xref_from_response.XrefFromResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + segment = revengai.models.segment_info.SegmentInfo( + name = '', + r = True, + w = True, + x = True, + start = 56, + end = 56, ), + orig_str_encoding = '', + xref_to = '', ) + ] + ) + else: + return XrefResponse( + xref_to_list = [ + revengai.models.xref_to_response.XrefToResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + segment = revengai.models.segment_info.SegmentInfo( + name = '', + r = True, + w = True, + x = True, + start = 56, + end = 56, ), + orig_str_encoding = '', + xref_from = '', ) + ], + xref_from_list = [ + revengai.models.xref_from_response.XrefFromResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + segment = revengai.models.segment_info.SegmentInfo( + name = '', + r = True, + w = True, + x = True, + start = 56, + end = 56, ), + orig_str_encoding = '', + xref_to = '', ) + ], + ) + """ + + def testXrefResponse(self): + """Test XrefResponse""" + # 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_xref_to_response.py b/test/test_xref_to_response.py new file mode 100644 index 0000000..79e94ba --- /dev/null +++ b/test/test_xref_to_response.py @@ -0,0 +1,66 @@ +# coding: utf-8 + +""" + RevEng.AI API + + RevEng.AI is an AI-powered binary analysis platform for reverse engineering and malware analysis. It provides similarity search across executable binaries and functions, AI-driven decompilation, dynamic execution analysis, firmware unpacking, and integration with external threat intelligence sources like VirusTotal. + + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from revengai.models.xref_to_response import XrefToResponse + +class TestXrefToResponse(unittest.TestCase): + """XrefToResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> XrefToResponse: + """Test XrefToResponse + 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 `XrefToResponse` + """ + model = XrefToResponse() + if include_optional: + return XrefToResponse( + value = '', + is_scalar = True, + is_call = True, + is_data = True, + is_string = True, + raw_data = '', + segment = revengai.models.segment_info.SegmentInfo( + name = '', + r = True, + w = True, + x = True, + start = 56, + end = 56, ), + orig_str_encoding = '', + xref_from = '' + ) + else: + return XrefToResponse( + value = '', + xref_from = '', + ) + """ + + def testXrefToResponse(self): + """Test XrefToResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()