revengai 1.98.1__py3-none-any.whl → 2.0.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of revengai might be problematic. Click here for more details.
- revengai/__init__.py +3 -7
- revengai/api/analyses_core_api.py +19 -298
- revengai/api_client.py +1 -1
- revengai/configuration.py +2 -2
- revengai/models/__init__.py +1 -3
- revengai/models/{app_api_rest_v2_similarity_schema_ann_function.py → ann_function.py} +4 -4
- revengai/models/app_api_rest_v2_functions_responses_function.py +2 -2
- revengai/models/app_api_rest_v2_functions_types_function.py +4 -2
- revengai/models/function_matching_request.py +1 -1
- revengai/models/matched_function.py +1 -6
- {revengai-1.98.1.dist-info → revengai-2.0.4.dist-info}/METADATA +2 -5
- {revengai-1.98.1.dist-info → revengai-2.0.4.dist-info}/RECORD +14 -16
- revengai/models/app_api_rest_v1_ann_schema_ann_function.py +0 -134
- revengai/models/function_batch_ann.py +0 -105
- {revengai-1.98.1.dist-info → revengai-2.0.4.dist-info}/WHEEL +0 -0
- {revengai-1.98.1.dist-info → revengai-2.0.4.dist-info}/licenses/LICENSE.md +0 -0
revengai/__init__.py
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
""" # noqa: E501
|
|
14
14
|
|
|
15
15
|
|
|
16
|
-
__version__ = "
|
|
16
|
+
__version__ = "v2.0.4"
|
|
17
17
|
|
|
18
18
|
# Define package exports
|
|
19
19
|
__all__ = [
|
|
@@ -45,6 +45,7 @@ __all__ = [
|
|
|
45
45
|
"ApiKeyError",
|
|
46
46
|
"ApiAttributeError",
|
|
47
47
|
"ApiException",
|
|
48
|
+
"ANNFunction",
|
|
48
49
|
"Addr",
|
|
49
50
|
"AiDecompilationRating",
|
|
50
51
|
"AiUnstripRequest",
|
|
@@ -63,14 +64,12 @@ __all__ = [
|
|
|
63
64
|
"AnalysisUpdateRequest",
|
|
64
65
|
"AnalysisUpdateTagsRequest",
|
|
65
66
|
"AnalysisUpdateTagsResponse",
|
|
66
|
-
"AppApiRestV1AnnSchemaANNFunction",
|
|
67
67
|
"AppApiRestV2AnalysesEnumsDynamicExecutionStatus",
|
|
68
68
|
"AppApiRestV2AnalysesEnumsOrderBy",
|
|
69
69
|
"AppApiRestV2AnalysesResponsesTagItem",
|
|
70
70
|
"AppApiRestV2CollectionsEnumsOrderBy",
|
|
71
71
|
"AppApiRestV2FunctionsResponsesFunction",
|
|
72
72
|
"AppApiRestV2FunctionsTypesFunction",
|
|
73
|
-
"AppApiRestV2SimilaritySchemaANNFunction",
|
|
74
73
|
"AppServicesBinaryAnnSchemaTagItem",
|
|
75
74
|
"AppServicesDynamicExecutionSchemasDynamicExecutionStatus",
|
|
76
75
|
"Argument",
|
|
@@ -216,7 +215,6 @@ __all__ = [
|
|
|
216
215
|
"FileHashes",
|
|
217
216
|
"FileMetadata",
|
|
218
217
|
"Filters",
|
|
219
|
-
"FunctionBatchAnn",
|
|
220
218
|
"FunctionBlockDestinationResponse",
|
|
221
219
|
"FunctionBlockResponse",
|
|
222
220
|
"FunctionBlocksResponse",
|
|
@@ -385,6 +383,7 @@ from revengai.exceptions import ApiAttributeError as ApiAttributeError
|
|
|
385
383
|
from revengai.exceptions import ApiException as ApiException
|
|
386
384
|
|
|
387
385
|
# import models into sdk package
|
|
386
|
+
from revengai.models.ann_function import ANNFunction as ANNFunction
|
|
388
387
|
from revengai.models.addr import Addr as Addr
|
|
389
388
|
from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating
|
|
390
389
|
from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest
|
|
@@ -403,14 +402,12 @@ from revengai.models.analysis_tags import AnalysisTags as AnalysisTags
|
|
|
403
402
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest as AnalysisUpdateRequest
|
|
404
403
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest as AnalysisUpdateTagsRequest
|
|
405
404
|
from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse as AnalysisUpdateTagsResponse
|
|
406
|
-
from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction as AppApiRestV1AnnSchemaANNFunction
|
|
407
405
|
from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus as AppApiRestV2AnalysesEnumsDynamicExecutionStatus
|
|
408
406
|
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy as AppApiRestV2AnalysesEnumsOrderBy
|
|
409
407
|
from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem as AppApiRestV2AnalysesResponsesTagItem
|
|
410
408
|
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy as AppApiRestV2CollectionsEnumsOrderBy
|
|
411
409
|
from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction as AppApiRestV2FunctionsResponsesFunction
|
|
412
410
|
from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction as AppApiRestV2FunctionsTypesFunction
|
|
413
|
-
from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction as AppApiRestV2SimilaritySchemaANNFunction
|
|
414
411
|
from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem as AppServicesBinaryAnnSchemaTagItem
|
|
415
412
|
from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus as AppServicesDynamicExecutionSchemasDynamicExecutionStatus
|
|
416
413
|
from revengai.models.argument import Argument as Argument
|
|
@@ -556,7 +553,6 @@ from revengai.models.file_format import FileFormat as FileFormat
|
|
|
556
553
|
from revengai.models.file_hashes import FileHashes as FileHashes
|
|
557
554
|
from revengai.models.file_metadata import FileMetadata as FileMetadata
|
|
558
555
|
from revengai.models.filters import Filters as Filters
|
|
559
|
-
from revengai.models.function_batch_ann import FunctionBatchAnn as FunctionBatchAnn
|
|
560
556
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse as FunctionBlockDestinationResponse
|
|
561
557
|
from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse
|
|
562
558
|
from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse
|
|
@@ -18,12 +18,11 @@ from typing_extensions import Annotated
|
|
|
18
18
|
from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
|
|
19
19
|
from typing import Any, List, Optional, Tuple, Union
|
|
20
20
|
from typing_extensions import Annotated
|
|
21
|
+
from revengai.models.ann_function import ANNFunction
|
|
21
22
|
from revengai.models.analysis_create_request import AnalysisCreateRequest
|
|
22
23
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest
|
|
23
24
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
|
|
24
|
-
from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
|
|
25
25
|
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
|
|
26
|
-
from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction
|
|
27
26
|
from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
|
|
28
27
|
from revengai.models.base_response_analysis_detail_response import BaseResponseAnalysisDetailResponse
|
|
29
28
|
from revengai.models.base_response_analysis_function_mapping import BaseResponseAnalysisFunctionMapping
|
|
@@ -40,7 +39,6 @@ from revengai.models.base_response_status import BaseResponseStatus
|
|
|
40
39
|
from revengai.models.base_response_upload_response import BaseResponseUploadResponse
|
|
41
40
|
from revengai.models.binary_ann_form import BinaryAnnForm
|
|
42
41
|
from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput
|
|
43
|
-
from revengai.models.function_batch_ann import FunctionBatchAnn
|
|
44
42
|
from revengai.models.model_name import ModelName
|
|
45
43
|
from revengai.models.order import Order
|
|
46
44
|
from revengai.models.re_analysis_form import ReAnalysisForm
|
|
@@ -66,283 +64,6 @@ class AnalysesCoreApi:
|
|
|
66
64
|
self.api_client = api_client
|
|
67
65
|
|
|
68
66
|
|
|
69
|
-
@validate_call
|
|
70
|
-
def batch_symbol_ann(
|
|
71
|
-
self,
|
|
72
|
-
app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
|
|
73
|
-
_request_timeout: Union[
|
|
74
|
-
None,
|
|
75
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
76
|
-
Tuple[
|
|
77
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
78
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
79
|
-
]
|
|
80
|
-
] = None,
|
|
81
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
82
|
-
_content_type: Optional[StrictStr] = None,
|
|
83
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
84
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
85
|
-
) -> FunctionBatchAnn:
|
|
86
|
-
"""Batch Symbol ANN using function IDs
|
|
87
|
-
|
|
88
|
-
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
|
|
89
|
-
|
|
90
|
-
:param app_api_rest_v1_ann_schema_ann_function: (required)
|
|
91
|
-
:type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
|
|
92
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
93
|
-
number provided, it will be total request
|
|
94
|
-
timeout. It can also be a pair (tuple) of
|
|
95
|
-
(connection, read) timeouts.
|
|
96
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
97
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
98
|
-
request; this effectively ignores the
|
|
99
|
-
authentication in the spec for a single request.
|
|
100
|
-
:type _request_auth: dict, optional
|
|
101
|
-
:param _content_type: force content-type for the request.
|
|
102
|
-
:type _content_type: str, Optional
|
|
103
|
-
:param _headers: set to override the headers for a single
|
|
104
|
-
request; this effectively ignores the headers
|
|
105
|
-
in the spec for a single request.
|
|
106
|
-
:type _headers: dict, optional
|
|
107
|
-
:param _host_index: set to override the host_index for a single
|
|
108
|
-
request; this effectively ignores the host_index
|
|
109
|
-
in the spec for a single request.
|
|
110
|
-
:type _host_index: int, optional
|
|
111
|
-
:return: Returns the result object.
|
|
112
|
-
""" # noqa: E501
|
|
113
|
-
|
|
114
|
-
_param = self._batch_symbol_ann_serialize(
|
|
115
|
-
app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
|
|
116
|
-
_request_auth=_request_auth,
|
|
117
|
-
_content_type=_content_type,
|
|
118
|
-
_headers=_headers,
|
|
119
|
-
_host_index=_host_index
|
|
120
|
-
)
|
|
121
|
-
|
|
122
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
123
|
-
'200': "FunctionBatchAnn",
|
|
124
|
-
'422': "BaseResponse",
|
|
125
|
-
}
|
|
126
|
-
response_data = self.api_client.call_api(
|
|
127
|
-
*_param,
|
|
128
|
-
_request_timeout=_request_timeout
|
|
129
|
-
)
|
|
130
|
-
response_data.read()
|
|
131
|
-
return self.api_client.response_deserialize(
|
|
132
|
-
response_data=response_data,
|
|
133
|
-
response_types_map=_response_types_map,
|
|
134
|
-
).data
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
@validate_call
|
|
138
|
-
def batch_symbol_ann_with_http_info(
|
|
139
|
-
self,
|
|
140
|
-
app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
|
|
141
|
-
_request_timeout: Union[
|
|
142
|
-
None,
|
|
143
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
144
|
-
Tuple[
|
|
145
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
146
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
147
|
-
]
|
|
148
|
-
] = None,
|
|
149
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
150
|
-
_content_type: Optional[StrictStr] = None,
|
|
151
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
152
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
153
|
-
) -> ApiResponse[FunctionBatchAnn]:
|
|
154
|
-
"""Batch Symbol ANN using function IDs
|
|
155
|
-
|
|
156
|
-
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
|
|
157
|
-
|
|
158
|
-
:param app_api_rest_v1_ann_schema_ann_function: (required)
|
|
159
|
-
:type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
|
|
160
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
161
|
-
number provided, it will be total request
|
|
162
|
-
timeout. It can also be a pair (tuple) of
|
|
163
|
-
(connection, read) timeouts.
|
|
164
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
165
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
166
|
-
request; this effectively ignores the
|
|
167
|
-
authentication in the spec for a single request.
|
|
168
|
-
:type _request_auth: dict, optional
|
|
169
|
-
:param _content_type: force content-type for the request.
|
|
170
|
-
:type _content_type: str, Optional
|
|
171
|
-
:param _headers: set to override the headers for a single
|
|
172
|
-
request; this effectively ignores the headers
|
|
173
|
-
in the spec for a single request.
|
|
174
|
-
:type _headers: dict, optional
|
|
175
|
-
:param _host_index: set to override the host_index for a single
|
|
176
|
-
request; this effectively ignores the host_index
|
|
177
|
-
in the spec for a single request.
|
|
178
|
-
:type _host_index: int, optional
|
|
179
|
-
:return: Returns the result object.
|
|
180
|
-
""" # noqa: E501
|
|
181
|
-
|
|
182
|
-
_param = self._batch_symbol_ann_serialize(
|
|
183
|
-
app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
|
|
184
|
-
_request_auth=_request_auth,
|
|
185
|
-
_content_type=_content_type,
|
|
186
|
-
_headers=_headers,
|
|
187
|
-
_host_index=_host_index
|
|
188
|
-
)
|
|
189
|
-
|
|
190
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
191
|
-
'200': "FunctionBatchAnn",
|
|
192
|
-
'422': "BaseResponse",
|
|
193
|
-
}
|
|
194
|
-
response_data = self.api_client.call_api(
|
|
195
|
-
*_param,
|
|
196
|
-
_request_timeout=_request_timeout
|
|
197
|
-
)
|
|
198
|
-
response_data.read()
|
|
199
|
-
return self.api_client.response_deserialize(
|
|
200
|
-
response_data=response_data,
|
|
201
|
-
response_types_map=_response_types_map,
|
|
202
|
-
)
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
@validate_call
|
|
206
|
-
def batch_symbol_ann_without_preload_content(
|
|
207
|
-
self,
|
|
208
|
-
app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
|
|
209
|
-
_request_timeout: Union[
|
|
210
|
-
None,
|
|
211
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
212
|
-
Tuple[
|
|
213
|
-
Annotated[StrictFloat, Field(gt=0)],
|
|
214
|
-
Annotated[StrictFloat, Field(gt=0)]
|
|
215
|
-
]
|
|
216
|
-
] = None,
|
|
217
|
-
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
|
218
|
-
_content_type: Optional[StrictStr] = None,
|
|
219
|
-
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
220
|
-
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
221
|
-
) -> RESTResponseType:
|
|
222
|
-
"""Batch Symbol ANN using function IDs
|
|
223
|
-
|
|
224
|
-
Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
|
|
225
|
-
|
|
226
|
-
:param app_api_rest_v1_ann_schema_ann_function: (required)
|
|
227
|
-
:type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
|
|
228
|
-
:param _request_timeout: timeout setting for this request. If one
|
|
229
|
-
number provided, it will be total request
|
|
230
|
-
timeout. It can also be a pair (tuple) of
|
|
231
|
-
(connection, read) timeouts.
|
|
232
|
-
:type _request_timeout: int, tuple(int, int), optional
|
|
233
|
-
:param _request_auth: set to override the auth_settings for an a single
|
|
234
|
-
request; this effectively ignores the
|
|
235
|
-
authentication in the spec for a single request.
|
|
236
|
-
:type _request_auth: dict, optional
|
|
237
|
-
:param _content_type: force content-type for the request.
|
|
238
|
-
:type _content_type: str, Optional
|
|
239
|
-
:param _headers: set to override the headers for a single
|
|
240
|
-
request; this effectively ignores the headers
|
|
241
|
-
in the spec for a single request.
|
|
242
|
-
:type _headers: dict, optional
|
|
243
|
-
:param _host_index: set to override the host_index for a single
|
|
244
|
-
request; this effectively ignores the host_index
|
|
245
|
-
in the spec for a single request.
|
|
246
|
-
:type _host_index: int, optional
|
|
247
|
-
:return: Returns the result object.
|
|
248
|
-
""" # noqa: E501
|
|
249
|
-
|
|
250
|
-
_param = self._batch_symbol_ann_serialize(
|
|
251
|
-
app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
|
|
252
|
-
_request_auth=_request_auth,
|
|
253
|
-
_content_type=_content_type,
|
|
254
|
-
_headers=_headers,
|
|
255
|
-
_host_index=_host_index
|
|
256
|
-
)
|
|
257
|
-
|
|
258
|
-
_response_types_map: Dict[str, Optional[str]] = {
|
|
259
|
-
'200': "FunctionBatchAnn",
|
|
260
|
-
'422': "BaseResponse",
|
|
261
|
-
}
|
|
262
|
-
response_data = self.api_client.call_api(
|
|
263
|
-
*_param,
|
|
264
|
-
_request_timeout=_request_timeout
|
|
265
|
-
)
|
|
266
|
-
return response_data.response
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
def _batch_symbol_ann_serialize(
|
|
270
|
-
self,
|
|
271
|
-
app_api_rest_v1_ann_schema_ann_function,
|
|
272
|
-
_request_auth,
|
|
273
|
-
_content_type,
|
|
274
|
-
_headers,
|
|
275
|
-
_host_index,
|
|
276
|
-
) -> RequestSerialized:
|
|
277
|
-
|
|
278
|
-
_host = None
|
|
279
|
-
|
|
280
|
-
_collection_formats: Dict[str, str] = {
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
_path_params: Dict[str, str] = {}
|
|
284
|
-
_query_params: List[Tuple[str, str]] = []
|
|
285
|
-
_header_params: Dict[str, Optional[str]] = _headers or {}
|
|
286
|
-
_form_params: List[Tuple[str, str]] = []
|
|
287
|
-
_files: Dict[
|
|
288
|
-
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
|
289
|
-
] = {}
|
|
290
|
-
_body_params: Optional[bytes] = None
|
|
291
|
-
|
|
292
|
-
# process the path parameters
|
|
293
|
-
# process the query parameters
|
|
294
|
-
# process the header parameters
|
|
295
|
-
# process the form parameters
|
|
296
|
-
# process the body parameter
|
|
297
|
-
if app_api_rest_v1_ann_schema_ann_function is not None:
|
|
298
|
-
_body_params = app_api_rest_v1_ann_schema_ann_function
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
# set the HTTP header `Accept`
|
|
302
|
-
if 'Accept' not in _header_params:
|
|
303
|
-
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
304
|
-
[
|
|
305
|
-
'application/json'
|
|
306
|
-
]
|
|
307
|
-
)
|
|
308
|
-
|
|
309
|
-
# set the HTTP header `Content-Type`
|
|
310
|
-
if _content_type:
|
|
311
|
-
_header_params['Content-Type'] = _content_type
|
|
312
|
-
else:
|
|
313
|
-
_default_content_type = (
|
|
314
|
-
self.api_client.select_header_content_type(
|
|
315
|
-
[
|
|
316
|
-
'application/json'
|
|
317
|
-
]
|
|
318
|
-
)
|
|
319
|
-
)
|
|
320
|
-
if _default_content_type is not None:
|
|
321
|
-
_header_params['Content-Type'] = _default_content_type
|
|
322
|
-
|
|
323
|
-
# authentication setting
|
|
324
|
-
_auth_settings: List[str] = [
|
|
325
|
-
'APIKey'
|
|
326
|
-
]
|
|
327
|
-
|
|
328
|
-
return self.api_client.param_serialize(
|
|
329
|
-
method='POST',
|
|
330
|
-
resource_path='/v1/ann/symbol/batch',
|
|
331
|
-
path_params=_path_params,
|
|
332
|
-
query_params=_query_params,
|
|
333
|
-
header_params=_header_params,
|
|
334
|
-
body=_body_params,
|
|
335
|
-
post_params=_form_params,
|
|
336
|
-
files=_files,
|
|
337
|
-
auth_settings=_auth_settings,
|
|
338
|
-
collection_formats=_collection_formats,
|
|
339
|
-
_host=_host,
|
|
340
|
-
_request_auth=_request_auth
|
|
341
|
-
)
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
67
|
@validate_call
|
|
347
68
|
def create_analysis(
|
|
348
69
|
self,
|
|
@@ -900,7 +621,7 @@ class AnalysesCoreApi:
|
|
|
900
621
|
def find_similar_functions_batch(
|
|
901
622
|
self,
|
|
902
623
|
analysis_id: StrictInt,
|
|
903
|
-
|
|
624
|
+
ann_function: ANNFunction,
|
|
904
625
|
_request_timeout: Union[
|
|
905
626
|
None,
|
|
906
627
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -920,8 +641,8 @@ class AnalysesCoreApi:
|
|
|
920
641
|
|
|
921
642
|
:param analysis_id: (required)
|
|
922
643
|
:type analysis_id: int
|
|
923
|
-
:param
|
|
924
|
-
:type
|
|
644
|
+
:param ann_function: (required)
|
|
645
|
+
:type ann_function: ANNFunction
|
|
925
646
|
:param _request_timeout: timeout setting for this request. If one
|
|
926
647
|
number provided, it will be total request
|
|
927
648
|
timeout. It can also be a pair (tuple) of
|
|
@@ -946,7 +667,7 @@ class AnalysesCoreApi:
|
|
|
946
667
|
|
|
947
668
|
_param = self._find_similar_functions_batch_serialize(
|
|
948
669
|
analysis_id=analysis_id,
|
|
949
|
-
|
|
670
|
+
ann_function=ann_function,
|
|
950
671
|
_request_auth=_request_auth,
|
|
951
672
|
_content_type=_content_type,
|
|
952
673
|
_headers=_headers,
|
|
@@ -972,7 +693,7 @@ class AnalysesCoreApi:
|
|
|
972
693
|
def find_similar_functions_batch_with_http_info(
|
|
973
694
|
self,
|
|
974
695
|
analysis_id: StrictInt,
|
|
975
|
-
|
|
696
|
+
ann_function: ANNFunction,
|
|
976
697
|
_request_timeout: Union[
|
|
977
698
|
None,
|
|
978
699
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -992,8 +713,8 @@ class AnalysesCoreApi:
|
|
|
992
713
|
|
|
993
714
|
:param analysis_id: (required)
|
|
994
715
|
:type analysis_id: int
|
|
995
|
-
:param
|
|
996
|
-
:type
|
|
716
|
+
:param ann_function: (required)
|
|
717
|
+
:type ann_function: ANNFunction
|
|
997
718
|
:param _request_timeout: timeout setting for this request. If one
|
|
998
719
|
number provided, it will be total request
|
|
999
720
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1018,7 +739,7 @@ class AnalysesCoreApi:
|
|
|
1018
739
|
|
|
1019
740
|
_param = self._find_similar_functions_batch_serialize(
|
|
1020
741
|
analysis_id=analysis_id,
|
|
1021
|
-
|
|
742
|
+
ann_function=ann_function,
|
|
1022
743
|
_request_auth=_request_auth,
|
|
1023
744
|
_content_type=_content_type,
|
|
1024
745
|
_headers=_headers,
|
|
@@ -1044,7 +765,7 @@ class AnalysesCoreApi:
|
|
|
1044
765
|
def find_similar_functions_batch_without_preload_content(
|
|
1045
766
|
self,
|
|
1046
767
|
analysis_id: StrictInt,
|
|
1047
|
-
|
|
768
|
+
ann_function: ANNFunction,
|
|
1048
769
|
_request_timeout: Union[
|
|
1049
770
|
None,
|
|
1050
771
|
Annotated[StrictFloat, Field(gt=0)],
|
|
@@ -1064,8 +785,8 @@ class AnalysesCoreApi:
|
|
|
1064
785
|
|
|
1065
786
|
:param analysis_id: (required)
|
|
1066
787
|
:type analysis_id: int
|
|
1067
|
-
:param
|
|
1068
|
-
:type
|
|
788
|
+
:param ann_function: (required)
|
|
789
|
+
:type ann_function: ANNFunction
|
|
1069
790
|
:param _request_timeout: timeout setting for this request. If one
|
|
1070
791
|
number provided, it will be total request
|
|
1071
792
|
timeout. It can also be a pair (tuple) of
|
|
@@ -1090,7 +811,7 @@ class AnalysesCoreApi:
|
|
|
1090
811
|
|
|
1091
812
|
_param = self._find_similar_functions_batch_serialize(
|
|
1092
813
|
analysis_id=analysis_id,
|
|
1093
|
-
|
|
814
|
+
ann_function=ann_function,
|
|
1094
815
|
_request_auth=_request_auth,
|
|
1095
816
|
_content_type=_content_type,
|
|
1096
817
|
_headers=_headers,
|
|
@@ -1111,7 +832,7 @@ class AnalysesCoreApi:
|
|
|
1111
832
|
def _find_similar_functions_batch_serialize(
|
|
1112
833
|
self,
|
|
1113
834
|
analysis_id,
|
|
1114
|
-
|
|
835
|
+
ann_function,
|
|
1115
836
|
_request_auth,
|
|
1116
837
|
_content_type,
|
|
1117
838
|
_headers,
|
|
@@ -1139,8 +860,8 @@ class AnalysesCoreApi:
|
|
|
1139
860
|
# process the header parameters
|
|
1140
861
|
# process the form parameters
|
|
1141
862
|
# process the body parameter
|
|
1142
|
-
if
|
|
1143
|
-
_body_params =
|
|
863
|
+
if ann_function is not None:
|
|
864
|
+
_body_params = ann_function
|
|
1144
865
|
|
|
1145
866
|
|
|
1146
867
|
# set the HTTP header `Accept`
|
|
@@ -1207,7 +928,7 @@ class AnalysesCoreApi:
|
|
|
1207
928
|
) -> BaseResponseBasic:
|
|
1208
929
|
"""Gets basic analysis information
|
|
1209
930
|
|
|
1210
|
-
|
|
931
|
+
Returns basic analysis information for an analysis
|
|
1211
932
|
|
|
1212
933
|
:param analysis_id: (required)
|
|
1213
934
|
:type analysis_id: int
|
|
@@ -1275,7 +996,7 @@ class AnalysesCoreApi:
|
|
|
1275
996
|
) -> ApiResponse[BaseResponseBasic]:
|
|
1276
997
|
"""Gets basic analysis information
|
|
1277
998
|
|
|
1278
|
-
|
|
999
|
+
Returns basic analysis information for an analysis
|
|
1279
1000
|
|
|
1280
1001
|
:param analysis_id: (required)
|
|
1281
1002
|
:type analysis_id: int
|
|
@@ -1343,7 +1064,7 @@ class AnalysesCoreApi:
|
|
|
1343
1064
|
) -> RESTResponseType:
|
|
1344
1065
|
"""Gets basic analysis information
|
|
1345
1066
|
|
|
1346
|
-
|
|
1067
|
+
Returns basic analysis information for an analysis
|
|
1347
1068
|
|
|
1348
1069
|
:param analysis_id: (required)
|
|
1349
1070
|
:type analysis_id: int
|
revengai/api_client.py
CHANGED
|
@@ -90,7 +90,7 @@ class ApiClient:
|
|
|
90
90
|
self.default_headers[header_name] = header_value
|
|
91
91
|
self.cookie = cookie
|
|
92
92
|
# Set default User-Agent.
|
|
93
|
-
self.user_agent = 'OpenAPI-Generator/
|
|
93
|
+
self.user_agent = 'OpenAPI-Generator/v2.0.4/python'
|
|
94
94
|
self.client_side_validation = configuration.client_side_validation
|
|
95
95
|
|
|
96
96
|
def __enter__(self):
|
revengai/configuration.py
CHANGED
|
@@ -529,8 +529,8 @@ conf = revengai.Configuration(
|
|
|
529
529
|
return "Python SDK Debug Report:\n"\
|
|
530
530
|
"OS: {env}\n"\
|
|
531
531
|
"Python Version: {pyversion}\n"\
|
|
532
|
-
"Version of the API:
|
|
533
|
-
"SDK Package Version:
|
|
532
|
+
"Version of the API: v2.0.4\n"\
|
|
533
|
+
"SDK Package Version: v2.0.4".\
|
|
534
534
|
format(env=sys.platform, pyversion=sys.version)
|
|
535
535
|
|
|
536
536
|
def get_host_settings(self) -> List[HostSetting]:
|
revengai/models/__init__.py
CHANGED
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
""" # noqa: E501
|
|
13
13
|
|
|
14
14
|
# import models into model package
|
|
15
|
+
from revengai.models.ann_function import ANNFunction
|
|
15
16
|
from revengai.models.addr import Addr
|
|
16
17
|
from revengai.models.ai_decompilation_rating import AiDecompilationRating
|
|
17
18
|
from revengai.models.ai_unstrip_request import AiUnstripRequest
|
|
@@ -30,14 +31,12 @@ from revengai.models.analysis_tags import AnalysisTags
|
|
|
30
31
|
from revengai.models.analysis_update_request import AnalysisUpdateRequest
|
|
31
32
|
from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
|
|
32
33
|
from revengai.models.analysis_update_tags_response import AnalysisUpdateTagsResponse
|
|
33
|
-
from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
|
|
34
34
|
from revengai.models.app_api_rest_v2_analyses_enums_dynamic_execution_status import AppApiRestV2AnalysesEnumsDynamicExecutionStatus
|
|
35
35
|
from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
|
|
36
36
|
from revengai.models.app_api_rest_v2_analyses_responses_tag_item import AppApiRestV2AnalysesResponsesTagItem
|
|
37
37
|
from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
|
|
38
38
|
from revengai.models.app_api_rest_v2_functions_responses_function import AppApiRestV2FunctionsResponsesFunction
|
|
39
39
|
from revengai.models.app_api_rest_v2_functions_types_function import AppApiRestV2FunctionsTypesFunction
|
|
40
|
-
from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction
|
|
41
40
|
from revengai.models.app_services_binary_ann_schema_tag_item import AppServicesBinaryAnnSchemaTagItem
|
|
42
41
|
from revengai.models.app_services_dynamic_execution_schemas_dynamic_execution_status import AppServicesDynamicExecutionSchemasDynamicExecutionStatus
|
|
43
42
|
from revengai.models.argument import Argument
|
|
@@ -183,7 +182,6 @@ from revengai.models.file_format import FileFormat
|
|
|
183
182
|
from revengai.models.file_hashes import FileHashes
|
|
184
183
|
from revengai.models.file_metadata import FileMetadata
|
|
185
184
|
from revengai.models.filters import Filters
|
|
186
|
-
from revengai.models.function_batch_ann import FunctionBatchAnn
|
|
187
185
|
from revengai.models.function_block_destination_response import FunctionBlockDestinationResponse
|
|
188
186
|
from revengai.models.function_block_response import FunctionBlockResponse
|
|
189
187
|
from revengai.models.function_blocks_response import FunctionBlocksResponse
|
|
@@ -22,9 +22,9 @@ from typing_extensions import Annotated
|
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
25
|
-
class
|
|
25
|
+
class ANNFunction(BaseModel):
|
|
26
26
|
"""
|
|
27
|
-
|
|
27
|
+
ANNFunction
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
limit: Optional[StrictInt] = Field(default=5, description="The amount of neighbours per function ID")
|
|
30
30
|
distance: Optional[Union[StrictFloat, StrictInt]] = Field(default=0.1, description="The distance between two neighbours")
|
|
@@ -54,7 +54,7 @@ class AppApiRestV2SimilaritySchemaANNFunction(BaseModel):
|
|
|
54
54
|
|
|
55
55
|
@classmethod
|
|
56
56
|
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
-
"""Create an instance of
|
|
57
|
+
"""Create an instance of ANNFunction from a JSON string"""
|
|
58
58
|
return cls.from_dict(json.loads(json_str))
|
|
59
59
|
|
|
60
60
|
def to_dict(self) -> Dict[str, Any]:
|
|
@@ -96,7 +96,7 @@ class AppApiRestV2SimilaritySchemaANNFunction(BaseModel):
|
|
|
96
96
|
|
|
97
97
|
@classmethod
|
|
98
98
|
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
99
|
-
"""Create an instance of
|
|
99
|
+
"""Create an instance of ANNFunction from a dict"""
|
|
100
100
|
if obj is None:
|
|
101
101
|
return None
|
|
102
102
|
|
|
@@ -16,7 +16,7 @@ import pprint
|
|
|
16
16
|
import re # noqa: F401
|
|
17
17
|
import json
|
|
18
18
|
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, StrictInt
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt
|
|
20
20
|
from typing import Any, ClassVar, Dict, List
|
|
21
21
|
from typing import Optional, Set
|
|
22
22
|
from typing_extensions import Self
|
|
@@ -26,7 +26,7 @@ class AppApiRestV2FunctionsResponsesFunction(BaseModel):
|
|
|
26
26
|
Function schema used in function strings response.
|
|
27
27
|
""" # noqa: E501
|
|
28
28
|
function_id: StrictInt
|
|
29
|
-
function_vaddr: StrictInt
|
|
29
|
+
function_vaddr: StrictInt = Field(description="Function virtual address")
|
|
30
30
|
__properties: ClassVar[List[str]] = ["function_id", "function_vaddr"]
|
|
31
31
|
|
|
32
32
|
model_config = ConfigDict(
|
|
@@ -26,13 +26,14 @@ class AppApiRestV2FunctionsTypesFunction(BaseModel):
|
|
|
26
26
|
AppApiRestV2FunctionsTypesFunction
|
|
27
27
|
""" # noqa: E501
|
|
28
28
|
function_id: StrictInt = Field(description="Function id")
|
|
29
|
-
function_name: StrictStr = Field(description="
|
|
29
|
+
function_name: StrictStr = Field(description="Demangled name of the function")
|
|
30
|
+
function_mangled_name: StrictStr = Field(description="Mangled name of the function")
|
|
30
31
|
function_vaddr: StrictInt = Field(description="Function virtual address")
|
|
31
32
|
function_size: StrictInt = Field(description="Function size")
|
|
32
33
|
debug: StrictBool = Field(description="Whether the function is debug")
|
|
33
34
|
embedding_3d: Optional[List[Union[StrictFloat, StrictInt]]]
|
|
34
35
|
embedding_1d: Optional[List[Union[StrictFloat, StrictInt]]]
|
|
35
|
-
__properties: ClassVar[List[str]] = ["function_id", "function_name", "function_vaddr", "function_size", "debug", "embedding_3d", "embedding_1d"]
|
|
36
|
+
__properties: ClassVar[List[str]] = ["function_id", "function_name", "function_mangled_name", "function_vaddr", "function_size", "debug", "embedding_3d", "embedding_1d"]
|
|
36
37
|
|
|
37
38
|
model_config = ConfigDict(
|
|
38
39
|
populate_by_name=True,
|
|
@@ -97,6 +98,7 @@ class AppApiRestV2FunctionsTypesFunction(BaseModel):
|
|
|
97
98
|
_obj = cls.model_validate({
|
|
98
99
|
"function_id": obj.get("function_id"),
|
|
99
100
|
"function_name": obj.get("function_name"),
|
|
101
|
+
"function_mangled_name": obj.get("function_mangled_name"),
|
|
100
102
|
"function_vaddr": obj.get("function_vaddr"),
|
|
101
103
|
"function_size": obj.get("function_size"),
|
|
102
104
|
"debug": obj.get("debug"),
|
|
@@ -31,7 +31,7 @@ class FunctionMatchingRequest(BaseModel):
|
|
|
31
31
|
function_ids: List[StrictInt] = Field(description="ID's of functions to find matches for, must be at least one function ID")
|
|
32
32
|
min_similarity: Optional[Union[Annotated[float, Field(le=100.0, strict=True, ge=0.0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=90.0, description="Minimum similarity expected for a match as a percentage, default is 90")
|
|
33
33
|
filters: Optional[FunctionMatchingFilters] = None
|
|
34
|
-
results_per_function: Optional[Annotated[int, Field(le=
|
|
34
|
+
results_per_function: Optional[Annotated[int, Field(le=50, strict=True, ge=1)]] = Field(default=1, description="Maximum number of matches to return per function, default is 1, max is 50")
|
|
35
35
|
page: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=1, description="Page number for paginated results, default is 1 (first page)")
|
|
36
36
|
page_size: Optional[Annotated[int, Field(le=1000, strict=True, ge=0)]] = Field(default=0, description="Number of functions to return per page, default is 0 (all functions), max is 1000")
|
|
37
37
|
__properties: ClassVar[List[str]] = ["model_id", "function_ids", "min_similarity", "filters", "results_per_function", "page", "page_size"]
|
|
@@ -29,7 +29,7 @@ class MatchedFunction(BaseModel):
|
|
|
29
29
|
binary_id: StrictInt
|
|
30
30
|
function_name: StrictStr
|
|
31
31
|
function_vaddr: StrictInt
|
|
32
|
-
mangled_name:
|
|
32
|
+
mangled_name: StrictStr
|
|
33
33
|
debug: StrictBool
|
|
34
34
|
binary_name: StrictStr
|
|
35
35
|
sha_256_hash: StrictStr
|
|
@@ -77,11 +77,6 @@ class MatchedFunction(BaseModel):
|
|
|
77
77
|
exclude=excluded_fields,
|
|
78
78
|
exclude_none=True,
|
|
79
79
|
)
|
|
80
|
-
# set to None if mangled_name (nullable) is None
|
|
81
|
-
# and model_fields_set contains the field
|
|
82
|
-
if self.mangled_name is None and "mangled_name" in self.model_fields_set:
|
|
83
|
-
_dict['mangled_name'] = None
|
|
84
|
-
|
|
85
80
|
# set to None if similarity (nullable) is None
|
|
86
81
|
# and model_fields_set contains the field
|
|
87
82
|
if self.similarity is None and "similarity" in self.model_fields_set:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: revengai
|
|
3
|
-
Version:
|
|
3
|
+
Version: 2.0.4
|
|
4
4
|
Summary: RevEng.AI API
|
|
5
5
|
Project-URL: Repository, https://github.com/RevEngAI/sdk-python
|
|
6
6
|
License-Expression: MIT
|
|
@@ -61,7 +61,6 @@ Class | Method | HTTP request | Description
|
|
|
61
61
|
*AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment
|
|
62
62
|
*AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis
|
|
63
63
|
*AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment
|
|
64
|
-
*AnalysesCoreApi* | [**batch_symbol_ann**](docs/AnalysesCoreApi.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
|
|
65
64
|
*AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis
|
|
66
65
|
*AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis
|
|
67
66
|
*AnalysesCoreApi* | [**find_similar_functions_batch**](docs/AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID
|
|
@@ -175,6 +174,7 @@ Class | Method | HTTP request | Description
|
|
|
175
174
|
|
|
176
175
|
## Documentation For Models
|
|
177
176
|
|
|
177
|
+
- [ANNFunction](docs/ANNFunction.md)
|
|
178
178
|
- [Addr](docs/Addr.md)
|
|
179
179
|
- [AiDecompilationRating](docs/AiDecompilationRating.md)
|
|
180
180
|
- [AiUnstripRequest](docs/AiUnstripRequest.md)
|
|
@@ -193,14 +193,12 @@ Class | Method | HTTP request | Description
|
|
|
193
193
|
- [AnalysisUpdateRequest](docs/AnalysisUpdateRequest.md)
|
|
194
194
|
- [AnalysisUpdateTagsRequest](docs/AnalysisUpdateTagsRequest.md)
|
|
195
195
|
- [AnalysisUpdateTagsResponse](docs/AnalysisUpdateTagsResponse.md)
|
|
196
|
-
- [AppApiRestV1AnnSchemaANNFunction](docs/AppApiRestV1AnnSchemaANNFunction.md)
|
|
197
196
|
- [AppApiRestV2AnalysesEnumsDynamicExecutionStatus](docs/AppApiRestV2AnalysesEnumsDynamicExecutionStatus.md)
|
|
198
197
|
- [AppApiRestV2AnalysesEnumsOrderBy](docs/AppApiRestV2AnalysesEnumsOrderBy.md)
|
|
199
198
|
- [AppApiRestV2AnalysesResponsesTagItem](docs/AppApiRestV2AnalysesResponsesTagItem.md)
|
|
200
199
|
- [AppApiRestV2CollectionsEnumsOrderBy](docs/AppApiRestV2CollectionsEnumsOrderBy.md)
|
|
201
200
|
- [AppApiRestV2FunctionsResponsesFunction](docs/AppApiRestV2FunctionsResponsesFunction.md)
|
|
202
201
|
- [AppApiRestV2FunctionsTypesFunction](docs/AppApiRestV2FunctionsTypesFunction.md)
|
|
203
|
-
- [AppApiRestV2SimilaritySchemaANNFunction](docs/AppApiRestV2SimilaritySchemaANNFunction.md)
|
|
204
202
|
- [AppServicesBinaryAnnSchemaTagItem](docs/AppServicesBinaryAnnSchemaTagItem.md)
|
|
205
203
|
- [AppServicesDynamicExecutionSchemasDynamicExecutionStatus](docs/AppServicesDynamicExecutionSchemasDynamicExecutionStatus.md)
|
|
206
204
|
- [Argument](docs/Argument.md)
|
|
@@ -346,7 +344,6 @@ Class | Method | HTTP request | Description
|
|
|
346
344
|
- [FileHashes](docs/FileHashes.md)
|
|
347
345
|
- [FileMetadata](docs/FileMetadata.md)
|
|
348
346
|
- [Filters](docs/Filters.md)
|
|
349
|
-
- [FunctionBatchAnn](docs/FunctionBatchAnn.md)
|
|
350
347
|
- [FunctionBlockDestinationResponse](docs/FunctionBlockDestinationResponse.md)
|
|
351
348
|
- [FunctionBlockResponse](docs/FunctionBlockResponse.md)
|
|
352
349
|
- [FunctionBlocksResponse](docs/FunctionBlocksResponse.md)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
revengai/__init__.py,sha256=
|
|
2
|
-
revengai/api_client.py,sha256=
|
|
1
|
+
revengai/__init__.py,sha256=cDp3MAHbJUuaQ0ISc1IzdL94LiYvdPGmgETIGM3RNQk,42410
|
|
2
|
+
revengai/api_client.py,sha256=M6OlFg9vvYbeAsXLoay4HcsUp98c2UwKHa-tzaLJNCw,27669
|
|
3
3
|
revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
|
|
4
|
-
revengai/configuration.py,sha256=
|
|
4
|
+
revengai/configuration.py,sha256=6N2lvNxI5YNAmTp1nHGYnpfXHklHvPOEYlWJk81Nu5k,18747
|
|
5
5
|
revengai/exceptions.py,sha256=IvdI9ZIZ9b2lSSKtIKMQDlG-5UPAedrjm3U4xfmGkso,6385
|
|
6
6
|
revengai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
revengai/rest.py,sha256=T6Q2dcazhntqm288H33BKC1hf8NVdvmQWgaymlJo158,9376
|
|
8
8
|
revengai/api/__init__.py,sha256=ercHI6-ZXgrfZ-crplF-fSQbSXY4xPellnIkvTt68uc,1320
|
|
9
9
|
revengai/api/analyses_comments_api.py,sha256=p_3N8KmHSBsBtsiW0rAc_LtsM-X3NOJEP86-9VUknoc,46292
|
|
10
|
-
revengai/api/analyses_core_api.py,sha256=
|
|
10
|
+
revengai/api/analyses_core_api.py,sha256=FXP25U3GIUXm9a6oudJ7m5R_ESAOLIyIdFczPcaX2pg,172165
|
|
11
11
|
revengai/api/analyses_dynamic_execution_api.py,sha256=N1SlAlsokt8us_x11tJpjK5GSAk-kuEECNO9KqtO0dI,71948
|
|
12
12
|
revengai/api/analyses_results_metadata_api.py,sha256=jRUub32skTygbVgo4K81XLLsJlL__1I99EO55ctuVEw,73593
|
|
13
13
|
revengai/api/analyses_security_checks_api.py,sha256=YqdVI96mNOb7yyCX2gm3sDABbNr7BMO6jUtvmwKPctk,33219
|
|
@@ -25,7 +25,7 @@ revengai/api/functions_decompilation_api.py,sha256=93tId0XHIUo8zPdCwoFShyvZPbptn
|
|
|
25
25
|
revengai/api/functions_renaming_history_api.py,sha256=2VuhjQliFO0rDcwmnl4s5BA36xgEtps2_qZdsqQI6hw,44111
|
|
26
26
|
revengai/api/models_api.py,sha256=jZ1wY48GT0JsxY-DgcwkxF5uyQTqygUYOuF8De0BQnw,10402
|
|
27
27
|
revengai/api/search_api.py,sha256=WQslQMX-fExlxONkJVy4MMfQ0VnDxqzJumYc9dbcRp0,63402
|
|
28
|
-
revengai/models/__init__.py,sha256=
|
|
28
|
+
revengai/models/__init__.py,sha256=0C4kUgLYcwAFfFnhMch07vZWbIUkDHmasO4RHWapC7Q,22882
|
|
29
29
|
revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
|
|
30
30
|
revengai/models/ai_decompilation_rating.py,sha256=gyay27QJwToUNtK9NARyw731Sg8GFRTufGGUABVYyfo,722
|
|
31
31
|
revengai/models/ai_unstrip_request.py,sha256=loSXNdHATJmY5yttiUCE-lLEOkuE63qVDTz8U0eCAIc,2596
|
|
@@ -44,14 +44,13 @@ revengai/models/analysis_tags.py,sha256=bVeyZzwnPxmpuXdLk4Jpz0fLsjeRjw0kcBLgeiDv
|
|
|
44
44
|
revengai/models/analysis_update_request.py,sha256=J4IulQ18iPHjrDMpLn9_NzMg99_W7jS8eCK17feVAtE,3403
|
|
45
45
|
revengai/models/analysis_update_tags_request.py,sha256=nrJwzS_Yg3SOkvrRcGW6eWfoG_FZn4l9dAZpRQNbV7A,2436
|
|
46
46
|
revengai/models/analysis_update_tags_response.py,sha256=KRNesNAW57hCPatnsy7ACBZORuKvWfd2XITFLwqtdbA,2936
|
|
47
|
-
revengai/models/
|
|
47
|
+
revengai/models/ann_function.py,sha256=TGwBAPMXJRvMO218j5wvqSl_rFN4hL0slyd595T7xM4,4950
|
|
48
48
|
revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py,sha256=x8VdW5OBlfoIoz3IV1HLN-SxeFh7798x6bHIggz7jF8,805
|
|
49
49
|
revengai/models/app_api_rest_v2_analyses_enums_order_by.py,sha256=Wpv3tfyAeBzN5_jkk4tBtYlJvUn8h0qudg4bvzBtKh8,739
|
|
50
50
|
revengai/models/app_api_rest_v2_analyses_responses_tag_item.py,sha256=Clh9pPBQKqeqeRiOZG4Fbh77pLPyKMCH3r3nU8Ej0Pc,2921
|
|
51
51
|
revengai/models/app_api_rest_v2_collections_enums_order_by.py,sha256=IVV9Auj0-HwTYYI0ZvJv-P3ciLOkq0l7MOyy0A5s92I,846
|
|
52
|
-
revengai/models/app_api_rest_v2_functions_responses_function.py,sha256=
|
|
53
|
-
revengai/models/app_api_rest_v2_functions_types_function.py,sha256=
|
|
54
|
-
revengai/models/app_api_rest_v2_similarity_schema_ann_function.py,sha256=VNlSiXWxEv3LsjbuN-n4DU5zjXN_B7ve3V_492T52fk,5062
|
|
52
|
+
revengai/models/app_api_rest_v2_functions_responses_function.py,sha256=yGl8xqqkAfIPWNlT5IT2ICeUOlwr_mIKH4Irb7qr9XU,2682
|
|
53
|
+
revengai/models/app_api_rest_v2_functions_types_function.py,sha256=t3BttHuPogip0-MMl85lmIcc3wi_1dBcU1Ci-kEteTc,4071
|
|
55
54
|
revengai/models/app_services_binary_ann_schema_tag_item.py,sha256=m25sIz8KEsPES0XGjmOZFhmLNLmB-jsakfRUpRfiMks,2977
|
|
56
55
|
revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py,sha256=9e3LDnw0iNCbowQPFTkNyIqkzsCQyJLZrx6tqRska6o,2562
|
|
57
56
|
revengai/models/argument.py,sha256=QmWpJiohyzTVC1GLHg1IlgM5QyONnBF6FGK_mOYQL_Y,3148
|
|
@@ -197,7 +196,6 @@ revengai/models/file_format.py,sha256=XpwEBufxq3zDOZi0EvShwZhm-O6dEJ25ZxJ46zvuYe
|
|
|
197
196
|
revengai/models/file_hashes.py,sha256=vAjMRVvB9GBGar-FZiV8VkG_h0304S7UNEg0aclT9P8,4659
|
|
198
197
|
revengai/models/file_metadata.py,sha256=BK3oI8Iat5leNewoD8ApE5iH-wrffCAi1lNXbM5RVRE,2954
|
|
199
198
|
revengai/models/filters.py,sha256=BO4gsERH6_P4gsRcbleZNHFNeyg7N5ir6mTIsQbXwdM,758
|
|
200
|
-
revengai/models/function_batch_ann.py,sha256=85ems0hvPJVsMH89BuT7TPmqxIAVBci5ZPNBEFdN1tw,3291
|
|
201
199
|
revengai/models/function_block_destination_response.py,sha256=ffcxW67TIbLkO8P8D9_quP7J9T_PIgCZZXNSRIEii0I,3130
|
|
202
200
|
revengai/models/function_block_response.py,sha256=KxnssvtH_MUvgQH358TfVZofVKyRHQYftMX36N2zdBY,3960
|
|
203
201
|
revengai/models/function_blocks_response.py,sha256=8Eu3jA9GKCXVNX7viu3OQxJNsqUZMxBlg498eJ9HFA4,4847
|
|
@@ -219,7 +217,7 @@ revengai/models/function_mapping.py,sha256=EBO_jGfEjK7ihIdx-bWSHAT9EozB_S9JDeCLL
|
|
|
219
217
|
revengai/models/function_mapping_full.py,sha256=dax345vnk25zSPVVpAmCFrrOWXzFXW6OnhSs9zVIKpI,11948
|
|
220
218
|
revengai/models/function_matching_batch_response.py,sha256=oBglZULIjMvbrlzjymWNKSNERVzftWH7hHBRC3uMoP0,4952
|
|
221
219
|
revengai/models/function_matching_filters.py,sha256=O5F1PIcPhbumH8z-4KbG7JNoUsx_H3wBZQU9kCZ_boI,3710
|
|
222
|
-
revengai/models/function_matching_request.py,sha256=
|
|
220
|
+
revengai/models/function_matching_request.py,sha256=doC7Z1UCe0qD1vR0Iu400ni7a94D9WK_QN3GR_56H3I,4690
|
|
223
221
|
revengai/models/function_matching_result_with_best_match.py,sha256=87nF8Dq7b0bTmbpB_j5Upfsnv_hqAs_dZJ69zpLmQjs,4050
|
|
224
222
|
revengai/models/function_name_confidence_body.py,sha256=Dz8HvTUDn5YcyCie-KMXmOdy8yF8PD-m0XzwpRyyQmg,3415
|
|
225
223
|
revengai/models/function_name_history.py,sha256=INu3KWYUpQMFfWy6oWl5iSaxrlayKr-wvuiahRCzinI,3265
|
|
@@ -254,7 +252,7 @@ revengai/models/list_collection_results.py,sha256=ZYGFTvOQfI234u67tURX8J0jwb6q-A
|
|
|
254
252
|
revengai/models/login_request.py,sha256=48uYtkWFL_Q-hN64P1f15ExGJvbab9XLymBtDduQvg0,2684
|
|
255
253
|
revengai/models/login_response.py,sha256=O35cqntoQ68IdYCBtHTYhPXlDqw8CIlnK-bNjf6QMO0,2461
|
|
256
254
|
revengai/models/logs.py,sha256=cV_V-xN6q-yTd7eL-X89ugqz5ifWPsFPo6qYFgpS_Pw,2419
|
|
257
|
-
revengai/models/matched_function.py,sha256=
|
|
255
|
+
revengai/models/matched_function.py,sha256=P8-1NM9UAaDzIriRPhWk83gEFMPkUeehQDZYt3hSB4g,3910
|
|
258
256
|
revengai/models/matched_function_suggestion.py,sha256=UK5Yrw2xlJ0dcOKIga_Syi0Ly_rWjvio6KPzPNbuDDg,3322
|
|
259
257
|
revengai/models/meta_model.py,sha256=GbyFJZ9kwvK1Gqg8QnJ1GHpaMs8cMht6j-MY1k0YSt0,2943
|
|
260
258
|
revengai/models/model_name.py,sha256=lVKok5pWyLcN1rhq1IYccC7uQQrPdyz1oohYRUMRrmw,1271
|
|
@@ -331,7 +329,7 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
|
|
|
331
329
|
revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
|
|
332
330
|
revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
|
|
333
331
|
revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
|
|
334
|
-
revengai-
|
|
335
|
-
revengai-
|
|
336
|
-
revengai-
|
|
337
|
-
revengai-
|
|
332
|
+
revengai-2.0.4.dist-info/METADATA,sha256=Q3H7rt8cWozwws35NmmyR1FEyEiFPiDrPA7wPCS7aO4,40938
|
|
333
|
+
revengai-2.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
334
|
+
revengai-2.0.4.dist-info/licenses/LICENSE.md,sha256=z1S-x9w52sZDqbFdJi0kL5-FLP5CR2aQA0kW8m6scaw,1052
|
|
335
|
+
revengai-2.0.4.dist-info/RECORD,,
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
RevEng.AI API
|
|
5
|
-
|
|
6
|
-
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
-
|
|
8
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
-
|
|
10
|
-
Do not edit the class manually.
|
|
11
|
-
""" # noqa: E501
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
import pprint
|
|
16
|
-
import re # noqa: F401
|
|
17
|
-
import json
|
|
18
|
-
|
|
19
|
-
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
21
|
-
from typing_extensions import Annotated
|
|
22
|
-
from typing import Optional, Set
|
|
23
|
-
from typing_extensions import Self
|
|
24
|
-
|
|
25
|
-
class AppApiRestV1AnnSchemaANNFunction(BaseModel):
|
|
26
|
-
"""
|
|
27
|
-
AppApiRestV1AnnSchemaANNFunction
|
|
28
|
-
""" # noqa: E501
|
|
29
|
-
result_per_function: Optional[Annotated[int, Field(le=20, strict=True)]] = None
|
|
30
|
-
distance: Optional[Union[StrictFloat, StrictInt]] = None
|
|
31
|
-
function_id_list: List[Optional[StrictInt]] = Field(description="List of function ids to compare")
|
|
32
|
-
speculative_function_ids: Optional[List[Any]] = None
|
|
33
|
-
collection: Optional[List[Optional[StrictStr]]] = Field(default=None, description="Perform a search on functions within a list of collections")
|
|
34
|
-
collection_search_list: Optional[List[Optional[StrictInt]]] = Field(default=None, description="Perform a search on functions within a list of collections")
|
|
35
|
-
debug_mode: Optional[StrictBool] = None
|
|
36
|
-
debug_types: Optional[List[StrictStr]] = Field(default=None, description="If limiting results to functions with debug names, which type of debug names to include?")
|
|
37
|
-
binaries_search_list: Optional[List[Optional[StrictInt]]] = Field(default=None, description="Perform a search on functions within a list of analyses")
|
|
38
|
-
__properties: ClassVar[List[str]] = ["result_per_function", "distance", "function_id_list", "speculative_function_ids", "collection", "collection_search_list", "debug_mode", "debug_types", "binaries_search_list"]
|
|
39
|
-
|
|
40
|
-
@field_validator('debug_types')
|
|
41
|
-
def debug_types_validate_enum(cls, value):
|
|
42
|
-
"""Validates the enum"""
|
|
43
|
-
if value is None:
|
|
44
|
-
return value
|
|
45
|
-
|
|
46
|
-
for i in value:
|
|
47
|
-
if i not in set(['USER', 'SYSTEM', 'EXTERNAL']):
|
|
48
|
-
raise ValueError("each list item must be one of ('USER', 'SYSTEM', 'EXTERNAL')")
|
|
49
|
-
return value
|
|
50
|
-
|
|
51
|
-
model_config = ConfigDict(
|
|
52
|
-
populate_by_name=True,
|
|
53
|
-
validate_assignment=True,
|
|
54
|
-
protected_namespaces=(),
|
|
55
|
-
)
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
def to_str(self) -> str:
|
|
59
|
-
"""Returns the string representation of the model using alias"""
|
|
60
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
61
|
-
|
|
62
|
-
def to_json(self) -> str:
|
|
63
|
-
"""Returns the JSON representation of the model using alias"""
|
|
64
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
65
|
-
return json.dumps(self.to_dict())
|
|
66
|
-
|
|
67
|
-
@classmethod
|
|
68
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
69
|
-
"""Create an instance of AppApiRestV1AnnSchemaANNFunction from a JSON string"""
|
|
70
|
-
return cls.from_dict(json.loads(json_str))
|
|
71
|
-
|
|
72
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
73
|
-
"""Return the dictionary representation of the model using alias.
|
|
74
|
-
|
|
75
|
-
This has the following differences from calling pydantic's
|
|
76
|
-
`self.model_dump(by_alias=True)`:
|
|
77
|
-
|
|
78
|
-
* `None` is only added to the output dict for nullable fields that
|
|
79
|
-
were set at model initialization. Other fields with value `None`
|
|
80
|
-
are ignored.
|
|
81
|
-
"""
|
|
82
|
-
excluded_fields: Set[str] = set([
|
|
83
|
-
])
|
|
84
|
-
|
|
85
|
-
_dict = self.model_dump(
|
|
86
|
-
by_alias=True,
|
|
87
|
-
exclude=excluded_fields,
|
|
88
|
-
exclude_none=True,
|
|
89
|
-
)
|
|
90
|
-
# set to None if result_per_function (nullable) is None
|
|
91
|
-
# and model_fields_set contains the field
|
|
92
|
-
if self.result_per_function is None and "result_per_function" in self.model_fields_set:
|
|
93
|
-
_dict['result_per_function'] = None
|
|
94
|
-
|
|
95
|
-
# set to None if distance (nullable) is None
|
|
96
|
-
# and model_fields_set contains the field
|
|
97
|
-
if self.distance is None and "distance" in self.model_fields_set:
|
|
98
|
-
_dict['distance'] = None
|
|
99
|
-
|
|
100
|
-
# set to None if speculative_function_ids (nullable) is None
|
|
101
|
-
# and model_fields_set contains the field
|
|
102
|
-
if self.speculative_function_ids is None and "speculative_function_ids" in self.model_fields_set:
|
|
103
|
-
_dict['speculative_function_ids'] = None
|
|
104
|
-
|
|
105
|
-
# set to None if debug_mode (nullable) is None
|
|
106
|
-
# and model_fields_set contains the field
|
|
107
|
-
if self.debug_mode is None and "debug_mode" in self.model_fields_set:
|
|
108
|
-
_dict['debug_mode'] = None
|
|
109
|
-
|
|
110
|
-
return _dict
|
|
111
|
-
|
|
112
|
-
@classmethod
|
|
113
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
114
|
-
"""Create an instance of AppApiRestV1AnnSchemaANNFunction from a dict"""
|
|
115
|
-
if obj is None:
|
|
116
|
-
return None
|
|
117
|
-
|
|
118
|
-
if not isinstance(obj, dict):
|
|
119
|
-
return cls.model_validate(obj)
|
|
120
|
-
|
|
121
|
-
_obj = cls.model_validate({
|
|
122
|
-
"result_per_function": obj.get("result_per_function"),
|
|
123
|
-
"distance": obj.get("distance"),
|
|
124
|
-
"function_id_list": obj.get("function_id_list"),
|
|
125
|
-
"speculative_function_ids": obj.get("speculative_function_ids"),
|
|
126
|
-
"collection": obj.get("collection"),
|
|
127
|
-
"collection_search_list": obj.get("collection_search_list"),
|
|
128
|
-
"debug_mode": obj.get("debug_mode"),
|
|
129
|
-
"debug_types": obj.get("debug_types"),
|
|
130
|
-
"binaries_search_list": obj.get("binaries_search_list")
|
|
131
|
-
})
|
|
132
|
-
return _obj
|
|
133
|
-
|
|
134
|
-
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
# coding: utf-8
|
|
2
|
-
|
|
3
|
-
"""
|
|
4
|
-
RevEng.AI API
|
|
5
|
-
|
|
6
|
-
RevEng.AI is Similarity Search Engine for executable binaries
|
|
7
|
-
|
|
8
|
-
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
9
|
-
|
|
10
|
-
Do not edit the class manually.
|
|
11
|
-
""" # noqa: E501
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
from __future__ import annotations
|
|
15
|
-
import pprint
|
|
16
|
-
import re # noqa: F401
|
|
17
|
-
import json
|
|
18
|
-
|
|
19
|
-
from pydantic import BaseModel, ConfigDict
|
|
20
|
-
from typing import Any, ClassVar, Dict, List, Optional
|
|
21
|
-
from typing import Optional, Set
|
|
22
|
-
from typing_extensions import Self
|
|
23
|
-
|
|
24
|
-
class FunctionBatchAnn(BaseModel):
|
|
25
|
-
"""
|
|
26
|
-
FunctionBatchAnn
|
|
27
|
-
""" # noqa: E501
|
|
28
|
-
success: Optional[Any] = None
|
|
29
|
-
settings: Optional[Any]
|
|
30
|
-
function_matches: Optional[Any]
|
|
31
|
-
__properties: ClassVar[List[str]] = ["success", "settings", "function_matches"]
|
|
32
|
-
|
|
33
|
-
model_config = ConfigDict(
|
|
34
|
-
populate_by_name=True,
|
|
35
|
-
validate_assignment=True,
|
|
36
|
-
protected_namespaces=(),
|
|
37
|
-
)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
def to_str(self) -> str:
|
|
41
|
-
"""Returns the string representation of the model using alias"""
|
|
42
|
-
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
-
|
|
44
|
-
def to_json(self) -> str:
|
|
45
|
-
"""Returns the JSON representation of the model using alias"""
|
|
46
|
-
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
-
return json.dumps(self.to_dict())
|
|
48
|
-
|
|
49
|
-
@classmethod
|
|
50
|
-
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
-
"""Create an instance of FunctionBatchAnn from a JSON string"""
|
|
52
|
-
return cls.from_dict(json.loads(json_str))
|
|
53
|
-
|
|
54
|
-
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
-
"""Return the dictionary representation of the model using alias.
|
|
56
|
-
|
|
57
|
-
This has the following differences from calling pydantic's
|
|
58
|
-
`self.model_dump(by_alias=True)`:
|
|
59
|
-
|
|
60
|
-
* `None` is only added to the output dict for nullable fields that
|
|
61
|
-
were set at model initialization. Other fields with value `None`
|
|
62
|
-
are ignored.
|
|
63
|
-
"""
|
|
64
|
-
excluded_fields: Set[str] = set([
|
|
65
|
-
])
|
|
66
|
-
|
|
67
|
-
_dict = self.model_dump(
|
|
68
|
-
by_alias=True,
|
|
69
|
-
exclude=excluded_fields,
|
|
70
|
-
exclude_none=True,
|
|
71
|
-
)
|
|
72
|
-
# set to None if success (nullable) is None
|
|
73
|
-
# and model_fields_set contains the field
|
|
74
|
-
if self.success is None and "success" in self.model_fields_set:
|
|
75
|
-
_dict['success'] = None
|
|
76
|
-
|
|
77
|
-
# set to None if settings (nullable) is None
|
|
78
|
-
# and model_fields_set contains the field
|
|
79
|
-
if self.settings is None and "settings" in self.model_fields_set:
|
|
80
|
-
_dict['settings'] = None
|
|
81
|
-
|
|
82
|
-
# set to None if function_matches (nullable) is None
|
|
83
|
-
# and model_fields_set contains the field
|
|
84
|
-
if self.function_matches is None and "function_matches" in self.model_fields_set:
|
|
85
|
-
_dict['function_matches'] = None
|
|
86
|
-
|
|
87
|
-
return _dict
|
|
88
|
-
|
|
89
|
-
@classmethod
|
|
90
|
-
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
91
|
-
"""Create an instance of FunctionBatchAnn from a dict"""
|
|
92
|
-
if obj is None:
|
|
93
|
-
return None
|
|
94
|
-
|
|
95
|
-
if not isinstance(obj, dict):
|
|
96
|
-
return cls.model_validate(obj)
|
|
97
|
-
|
|
98
|
-
_obj = cls.model_validate({
|
|
99
|
-
"success": obj.get("success"),
|
|
100
|
-
"settings": obj.get("settings"),
|
|
101
|
-
"function_matches": obj.get("function_matches")
|
|
102
|
-
})
|
|
103
|
-
return _obj
|
|
104
|
-
|
|
105
|
-
|
|
File without changes
|
|
File without changes
|