revengai 2.74.0__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.
Files changed (314) hide show
  1. revengai/__init__.py +647 -0
  2. revengai/api/__init__.py +22 -0
  3. revengai/api/analyses_comments_api.py +1198 -0
  4. revengai/api/analyses_core_api.py +3870 -0
  5. revengai/api/analyses_dynamic_execution_api.py +1884 -0
  6. revengai/api/analyses_results_metadata_api.py +2240 -0
  7. revengai/api/analyses_security_checks_api.py +862 -0
  8. revengai/api/authentication_users_api.py +1323 -0
  9. revengai/api/binaries_api.py +1610 -0
  10. revengai/api/collections_api.py +2167 -0
  11. revengai/api/external_sources_api.py +827 -0
  12. revengai/api/firmware_api.py +592 -0
  13. revengai/api/functions_ai_decompilation_api.py +2592 -0
  14. revengai/api/functions_block_comments_api.py +849 -0
  15. revengai/api/functions_core_api.py +3430 -0
  16. revengai/api/functions_data_types_api.py +1746 -0
  17. revengai/api/functions_decompilation_api.py +1198 -0
  18. revengai/api/functions_renaming_history_api.py +1151 -0
  19. revengai/api/models_api.py +284 -0
  20. revengai/api/search_api.py +1454 -0
  21. revengai/api_client.py +803 -0
  22. revengai/api_response.py +21 -0
  23. revengai/configuration.py +605 -0
  24. revengai/exceptions.py +215 -0
  25. revengai/models/__init__.py +298 -0
  26. revengai/models/addr.py +143 -0
  27. revengai/models/ai_decompilation_rating.py +37 -0
  28. revengai/models/ai_unstrip_request.py +86 -0
  29. revengai/models/analysis_access_info.py +88 -0
  30. revengai/models/analysis_config.py +106 -0
  31. revengai/models/analysis_create_request.py +131 -0
  32. revengai/models/analysis_create_response.py +88 -0
  33. revengai/models/analysis_detail_response.py +121 -0
  34. revengai/models/analysis_function_mapping.py +90 -0
  35. revengai/models/analysis_function_matching_request.py +110 -0
  36. revengai/models/analysis_functions.py +94 -0
  37. revengai/models/analysis_functions_list.py +94 -0
  38. revengai/models/analysis_record.py +128 -0
  39. revengai/models/analysis_scope.py +36 -0
  40. revengai/models/analysis_strings_response.py +96 -0
  41. revengai/models/analysis_tags.py +94 -0
  42. revengai/models/analysis_update_request.py +108 -0
  43. revengai/models/analysis_update_tags_request.py +86 -0
  44. revengai/models/analysis_update_tags_response.py +94 -0
  45. revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py +38 -0
  46. revengai/models/app_api_rest_v2_analyses_enums_order_by.py +37 -0
  47. revengai/models/app_api_rest_v2_collections_enums_order_by.py +40 -0
  48. revengai/models/app_api_rest_v2_functions_responses_function.py +93 -0
  49. revengai/models/app_api_rest_v2_functions_types_function.py +110 -0
  50. revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py +86 -0
  51. revengai/models/argument.py +99 -0
  52. revengai/models/auto_unstrip_request.py +99 -0
  53. revengai/models/auto_unstrip_response.py +129 -0
  54. revengai/models/base_response.py +124 -0
  55. revengai/models/base_response_analysis_create_response.py +125 -0
  56. revengai/models/base_response_analysis_detail_response.py +125 -0
  57. revengai/models/base_response_analysis_function_mapping.py +125 -0
  58. revengai/models/base_response_analysis_functions.py +125 -0
  59. revengai/models/base_response_analysis_functions_list.py +125 -0
  60. revengai/models/base_response_analysis_strings_response.py +125 -0
  61. revengai/models/base_response_analysis_tags.py +125 -0
  62. revengai/models/base_response_analysis_update_tags_response.py +125 -0
  63. revengai/models/base_response_basic.py +125 -0
  64. revengai/models/base_response_binary_additional_response.py +125 -0
  65. revengai/models/base_response_binary_details_response.py +125 -0
  66. revengai/models/base_response_binary_externals_response.py +125 -0
  67. revengai/models/base_response_binary_search_response.py +125 -0
  68. revengai/models/base_response_block_comments_generation_for_function_response.py +125 -0
  69. revengai/models/base_response_block_comments_overview_generation_response.py +116 -0
  70. revengai/models/base_response_bool.py +121 -0
  71. revengai/models/base_response_callees_caller_functions_response.py +125 -0
  72. revengai/models/base_response_capabilities.py +125 -0
  73. revengai/models/base_response_check_security_checks_task_response.py +125 -0
  74. revengai/models/base_response_child_binaries_response.py +125 -0
  75. revengai/models/base_response_collection_binaries_update_response.py +125 -0
  76. revengai/models/base_response_collection_response.py +125 -0
  77. revengai/models/base_response_collection_search_response.py +125 -0
  78. revengai/models/base_response_collection_tags_update_response.py +125 -0
  79. revengai/models/base_response_comment_response.py +125 -0
  80. revengai/models/base_response_communities.py +125 -0
  81. revengai/models/base_response_created.py +125 -0
  82. revengai/models/base_response_dict.py +121 -0
  83. revengai/models/base_response_dynamic_execution_status.py +125 -0
  84. revengai/models/base_response_external_response.py +125 -0
  85. revengai/models/base_response_function_blocks_response.py +125 -0
  86. revengai/models/base_response_function_capability_response.py +125 -0
  87. revengai/models/base_response_function_data_types.py +125 -0
  88. revengai/models/base_response_function_data_types_list.py +125 -0
  89. revengai/models/base_response_function_search_response.py +125 -0
  90. revengai/models/base_response_function_strings_response.py +125 -0
  91. revengai/models/base_response_function_task_response.py +125 -0
  92. revengai/models/base_response_functions_detail_response.py +125 -0
  93. revengai/models/base_response_generate_function_data_types.py +125 -0
  94. revengai/models/base_response_generation_status_list.py +125 -0
  95. revengai/models/base_response_get_ai_decompilation_rating_response.py +125 -0
  96. revengai/models/base_response_get_ai_decompilation_task.py +125 -0
  97. revengai/models/base_response_get_me_response.py +125 -0
  98. revengai/models/base_response_get_public_user_response.py +125 -0
  99. revengai/models/base_response_list_collection_results.py +125 -0
  100. revengai/models/base_response_list_comment_response.py +129 -0
  101. revengai/models/base_response_list_die_match.py +129 -0
  102. revengai/models/base_response_list_function_name_history.py +129 -0
  103. revengai/models/base_response_list_sbom.py +129 -0
  104. revengai/models/base_response_list_user_activity_response.py +129 -0
  105. revengai/models/base_response_login_response.py +125 -0
  106. revengai/models/base_response_logs.py +125 -0
  107. revengai/models/base_response_models_response.py +125 -0
  108. revengai/models/base_response_network_overview_response.py +125 -0
  109. revengai/models/base_response_params.py +125 -0
  110. revengai/models/base_response_process_dumps.py +125 -0
  111. revengai/models/base_response_process_registry.py +125 -0
  112. revengai/models/base_response_process_tree.py +125 -0
  113. revengai/models/base_response_queued_security_checks_task_response.py +125 -0
  114. revengai/models/base_response_recent.py +125 -0
  115. revengai/models/base_response_security_checks_response.py +125 -0
  116. revengai/models/base_response_status.py +125 -0
  117. revengai/models/base_response_str.py +121 -0
  118. revengai/models/base_response_tag_search_response.py +125 -0
  119. revengai/models/base_response_task_response.py +125 -0
  120. revengai/models/base_response_ttps.py +125 -0
  121. revengai/models/base_response_upload_response.py +125 -0
  122. revengai/models/base_response_vulnerabilities.py +125 -0
  123. revengai/models/basic.py +116 -0
  124. revengai/models/binary_additional_details_data_response.py +112 -0
  125. revengai/models/binary_additional_response.py +105 -0
  126. revengai/models/binary_config.py +108 -0
  127. revengai/models/binary_details_response.py +125 -0
  128. revengai/models/binary_externals_response.py +95 -0
  129. revengai/models/binary_search_response.py +94 -0
  130. revengai/models/binary_search_result.py +108 -0
  131. revengai/models/binary_task_status.py +39 -0
  132. revengai/models/block.py +86 -0
  133. revengai/models/block_comments_generation_for_function_response.py +86 -0
  134. revengai/models/callee_function_info.py +106 -0
  135. revengai/models/callees_caller_functions_response.py +106 -0
  136. revengai/models/caller_function_info.py +106 -0
  137. revengai/models/capabilities.py +94 -0
  138. revengai/models/capability.py +90 -0
  139. revengai/models/check_security_checks_task_response.py +87 -0
  140. revengai/models/child_binaries_response.py +104 -0
  141. revengai/models/code_signature_model.py +98 -0
  142. revengai/models/collection_binaries_update_request.py +86 -0
  143. revengai/models/collection_binaries_update_response.py +94 -0
  144. revengai/models/collection_binary_response.py +97 -0
  145. revengai/models/collection_create_request.py +107 -0
  146. revengai/models/collection_list_item.py +112 -0
  147. revengai/models/collection_response.py +131 -0
  148. revengai/models/collection_response_binaries_inner.py +135 -0
  149. revengai/models/collection_scope.py +38 -0
  150. revengai/models/collection_search_response.py +94 -0
  151. revengai/models/collection_search_result.py +124 -0
  152. revengai/models/collection_tags_update_request.py +86 -0
  153. revengai/models/collection_tags_update_response.py +86 -0
  154. revengai/models/collection_update_request.py +106 -0
  155. revengai/models/comment_base.py +86 -0
  156. revengai/models/comment_response.py +110 -0
  157. revengai/models/comment_update_request.py +86 -0
  158. revengai/models/communities.py +100 -0
  159. revengai/models/community_match_percentages.py +92 -0
  160. revengai/models/confidence_type.py +39 -0
  161. revengai/models/context.py +141 -0
  162. revengai/models/created.py +90 -0
  163. revengai/models/decompilation_comment_context.py +98 -0
  164. revengai/models/die_match.py +92 -0
  165. revengai/models/dynamic_execution_status_input.py +38 -0
  166. revengai/models/elf_dynamic_entry.py +88 -0
  167. revengai/models/elf_import_model.py +88 -0
  168. revengai/models/elf_model.py +179 -0
  169. revengai/models/elf_relocation.py +98 -0
  170. revengai/models/elf_section.py +104 -0
  171. revengai/models/elf_security.py +94 -0
  172. revengai/models/elf_segment.py +102 -0
  173. revengai/models/elf_symbol.py +98 -0
  174. revengai/models/entrypoint_model.py +88 -0
  175. revengai/models/enumeration.py +97 -0
  176. revengai/models/error_model.py +88 -0
  177. revengai/models/export_model.py +88 -0
  178. revengai/models/external_response.py +91 -0
  179. revengai/models/file_format.py +37 -0
  180. revengai/models/file_hashes.py +140 -0
  181. revengai/models/file_metadata.py +96 -0
  182. revengai/models/filters.py +39 -0
  183. revengai/models/function_block_destination_response.py +95 -0
  184. revengai/models/function_block_response.py +109 -0
  185. revengai/models/function_blocks_response.py +121 -0
  186. revengai/models/function_boundary.py +90 -0
  187. revengai/models/function_capability_response.py +86 -0
  188. revengai/models/function_comment_create_request.py +92 -0
  189. revengai/models/function_data_types.py +106 -0
  190. revengai/models/function_data_types_list.py +98 -0
  191. revengai/models/function_data_types_list_item.py +108 -0
  192. revengai/models/function_data_types_params.py +86 -0
  193. revengai/models/function_data_types_status.py +90 -0
  194. revengai/models/function_header.py +112 -0
  195. revengai/models/function_info_input.py +105 -0
  196. revengai/models/function_info_input_func_deps_inner.py +163 -0
  197. revengai/models/function_info_output.py +105 -0
  198. revengai/models/function_list_item.py +96 -0
  199. revengai/models/function_local_variable_response.py +94 -0
  200. revengai/models/function_mapping.py +90 -0
  201. revengai/models/function_mapping_full.py +275 -0
  202. revengai/models/function_match.py +111 -0
  203. revengai/models/function_matching_filters.py +103 -0
  204. revengai/models/function_matching_request.py +114 -0
  205. revengai/models/function_matching_response.py +157 -0
  206. revengai/models/function_name_history.py +99 -0
  207. revengai/models/function_param_response.py +94 -0
  208. revengai/models/function_rename.py +88 -0
  209. revengai/models/function_rename_map.py +90 -0
  210. revengai/models/function_search_response.py +94 -0
  211. revengai/models/function_search_result.py +99 -0
  212. revengai/models/function_source_type.py +39 -0
  213. revengai/models/function_string.py +88 -0
  214. revengai/models/function_strings_response.py +96 -0
  215. revengai/models/function_task_response.py +94 -0
  216. revengai/models/function_task_status.py +39 -0
  217. revengai/models/function_type_input.py +127 -0
  218. revengai/models/function_type_output.py +127 -0
  219. revengai/models/functions_detail_response.py +125 -0
  220. revengai/models/functions_list_rename.py +94 -0
  221. revengai/models/generate_function_data_types.py +94 -0
  222. revengai/models/generation_status_list.py +98 -0
  223. revengai/models/get_ai_decompilation_rating_response.py +94 -0
  224. revengai/models/get_ai_decompilation_task.py +159 -0
  225. revengai/models/get_me_response.py +108 -0
  226. revengai/models/get_public_user_response.py +88 -0
  227. revengai/models/global_variable.py +101 -0
  228. revengai/models/icon_model.py +91 -0
  229. revengai/models/import_model.py +88 -0
  230. revengai/models/inverse_function_map_item.py +99 -0
  231. revengai/models/inverse_string_map_item.py +93 -0
  232. revengai/models/inverse_value.py +86 -0
  233. revengai/models/isa.py +37 -0
  234. revengai/models/list_collection_results.py +94 -0
  235. revengai/models/login_request.py +89 -0
  236. revengai/models/login_response.py +86 -0
  237. revengai/models/logs.py +86 -0
  238. revengai/models/matched_function.py +116 -0
  239. revengai/models/matched_function_suggestion.py +97 -0
  240. revengai/models/meta_model.py +95 -0
  241. revengai/models/model_name.py +40 -0
  242. revengai/models/models_response.py +86 -0
  243. revengai/models/name_confidence.py +89 -0
  244. revengai/models/network_overview_dns.py +98 -0
  245. revengai/models/network_overview_dns_answer.py +88 -0
  246. revengai/models/network_overview_metadata.py +99 -0
  247. revengai/models/network_overview_response.py +104 -0
  248. revengai/models/order.py +36 -0
  249. revengai/models/pagination_model.py +90 -0
  250. revengai/models/params.py +103 -0
  251. revengai/models/pdb_debug_model.py +94 -0
  252. revengai/models/pe_model.py +215 -0
  253. revengai/models/platform.py +36 -0
  254. revengai/models/process.py +103 -0
  255. revengai/models/process_dump.py +96 -0
  256. revengai/models/process_dump_metadata.py +90 -0
  257. revengai/models/process_dumps.py +92 -0
  258. revengai/models/process_dumps_data.py +96 -0
  259. revengai/models/process_registry.py +105 -0
  260. revengai/models/process_tree.py +96 -0
  261. revengai/models/queued_security_checks_task_response.py +86 -0
  262. revengai/models/re_analysis_form.py +101 -0
  263. revengai/models/recent.py +94 -0
  264. revengai/models/registry.py +102 -0
  265. revengai/models/relative_binary_response.py +90 -0
  266. revengai/models/sandbox_options.py +88 -0
  267. revengai/models/sbom.py +96 -0
  268. revengai/models/sbom_package.py +88 -0
  269. revengai/models/scrape_third_party_config.py +86 -0
  270. revengai/models/section_model.py +96 -0
  271. revengai/models/security_checks_response.py +98 -0
  272. revengai/models/security_checks_result.py +103 -0
  273. revengai/models/security_model.py +106 -0
  274. revengai/models/severity_type.py +40 -0
  275. revengai/models/single_code_certificate_model.py +96 -0
  276. revengai/models/single_code_signature_model.py +96 -0
  277. revengai/models/single_pdb_entry_model.py +90 -0
  278. revengai/models/single_section_model.py +98 -0
  279. revengai/models/stack_variable.py +101 -0
  280. revengai/models/status_input.py +40 -0
  281. revengai/models/status_output.py +88 -0
  282. revengai/models/string_functions.py +96 -0
  283. revengai/models/structure.py +117 -0
  284. revengai/models/structure_member.py +99 -0
  285. revengai/models/symbols.py +96 -0
  286. revengai/models/tag.py +86 -0
  287. revengai/models/tag_item.py +95 -0
  288. revengai/models/tag_response.py +88 -0
  289. revengai/models/tag_search_response.py +94 -0
  290. revengai/models/tag_search_result.py +88 -0
  291. revengai/models/task_response.py +94 -0
  292. revengai/models/task_status.py +39 -0
  293. revengai/models/timestamp_model.py +90 -0
  294. revengai/models/ttps.py +92 -0
  295. revengai/models/ttps_attack.py +88 -0
  296. revengai/models/ttps_data.py +96 -0
  297. revengai/models/ttps_element.py +108 -0
  298. revengai/models/ttps_occurance.py +88 -0
  299. revengai/models/type_definition.py +97 -0
  300. revengai/models/update_function_data_types.py +92 -0
  301. revengai/models/upload_file_type.py +38 -0
  302. revengai/models/upload_response.py +91 -0
  303. revengai/models/upsert_ai_decomplation_rating_request.py +94 -0
  304. revengai/models/user_activity_response.py +97 -0
  305. revengai/models/vulnerabilities.py +94 -0
  306. revengai/models/vulnerability.py +113 -0
  307. revengai/models/vulnerability_type.py +40 -0
  308. revengai/models/workspace.py +37 -0
  309. revengai/py.typed +0 -0
  310. revengai/rest.py +257 -0
  311. revengai-2.74.0.dist-info/METADATA +447 -0
  312. revengai-2.74.0.dist-info/RECORD +314 -0
  313. revengai-2.74.0.dist-info/WHEEL +4 -0
  314. revengai-2.74.0.dist-info/licenses/LICENSE.md +19 -0
@@ -0,0 +1,2592 @@
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
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictBool, StrictInt
19
+ from typing import Optional
20
+ from typing_extensions import Annotated
21
+ from revengai.models.base_response import BaseResponse
22
+ from revengai.models.base_response_bool import BaseResponseBool
23
+ from revengai.models.base_response_comment_response import BaseResponseCommentResponse
24
+ from revengai.models.base_response_function_task_response import BaseResponseFunctionTaskResponse
25
+ from revengai.models.base_response_get_ai_decompilation_rating_response import BaseResponseGetAiDecompilationRatingResponse
26
+ from revengai.models.base_response_get_ai_decompilation_task import BaseResponseGetAiDecompilationTask
27
+ from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse
28
+ from revengai.models.comment_update_request import CommentUpdateRequest
29
+ from revengai.models.function_comment_create_request import FunctionCommentCreateRequest
30
+ from revengai.models.upsert_ai_decomplation_rating_request import UpsertAiDecomplationRatingRequest
31
+
32
+ from revengai.api_client import ApiClient, RequestSerialized
33
+ from revengai.api_response import ApiResponse
34
+ from revengai.rest import RESTResponseType
35
+
36
+
37
+ class FunctionsAIDecompilationApi:
38
+ """NOTE: This class is auto generated by OpenAPI Generator
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+ """
43
+
44
+ def __init__(self, api_client=None) -> None:
45
+ if api_client is None:
46
+ api_client = ApiClient.get_default()
47
+ self.api_client = api_client
48
+
49
+
50
+ @validate_call
51
+ def create_ai_decompilation_comment(
52
+ self,
53
+ function_id: StrictInt,
54
+ function_comment_create_request: FunctionCommentCreateRequest,
55
+ _request_timeout: Union[
56
+ None,
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Tuple[
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Annotated[StrictFloat, Field(gt=0)]
61
+ ]
62
+ ] = None,
63
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
64
+ _content_type: Optional[StrictStr] = None,
65
+ _headers: Optional[Dict[StrictStr, Any]] = None,
66
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
67
+ ) -> BaseResponseCommentResponse:
68
+ """Create a comment for this function
69
+
70
+ Creates a comment associated with a specified function).
71
+
72
+ :param function_id: (required)
73
+ :type function_id: int
74
+ :param function_comment_create_request: (required)
75
+ :type function_comment_create_request: FunctionCommentCreateRequest
76
+ :param _request_timeout: timeout setting for this request. If one
77
+ number provided, it will be total request
78
+ timeout. It can also be a pair (tuple) of
79
+ (connection, read) timeouts.
80
+ :type _request_timeout: int, tuple(int, int), optional
81
+ :param _request_auth: set to override the auth_settings for an a single
82
+ request; this effectively ignores the
83
+ authentication in the spec for a single request.
84
+ :type _request_auth: dict, optional
85
+ :param _content_type: force content-type for the request.
86
+ :type _content_type: str, Optional
87
+ :param _headers: set to override the headers for a single
88
+ request; this effectively ignores the headers
89
+ in the spec for a single request.
90
+ :type _headers: dict, optional
91
+ :param _host_index: set to override the host_index for a single
92
+ request; this effectively ignores the host_index
93
+ in the spec for a single request.
94
+ :type _host_index: int, optional
95
+ :return: Returns the result object.
96
+ """ # noqa: E501
97
+
98
+ _param = self._create_ai_decompilation_comment_serialize(
99
+ function_id=function_id,
100
+ function_comment_create_request=function_comment_create_request,
101
+ _request_auth=_request_auth,
102
+ _content_type=_content_type,
103
+ _headers=_headers,
104
+ _host_index=_host_index
105
+ )
106
+
107
+ _response_types_map: Dict[str, Optional[str]] = {
108
+ '201': "BaseResponseCommentResponse",
109
+ '422': "BaseResponse",
110
+ '400': "BaseResponse",
111
+ }
112
+ response_data = self.api_client.call_api(
113
+ *_param,
114
+ _request_timeout=_request_timeout
115
+ )
116
+ response_data.read()
117
+ return self.api_client.response_deserialize(
118
+ response_data=response_data,
119
+ response_types_map=_response_types_map,
120
+ ).data
121
+
122
+
123
+ @validate_call
124
+ def create_ai_decompilation_comment_with_http_info(
125
+ self,
126
+ function_id: StrictInt,
127
+ function_comment_create_request: FunctionCommentCreateRequest,
128
+ _request_timeout: Union[
129
+ None,
130
+ Annotated[StrictFloat, Field(gt=0)],
131
+ Tuple[
132
+ Annotated[StrictFloat, Field(gt=0)],
133
+ Annotated[StrictFloat, Field(gt=0)]
134
+ ]
135
+ ] = None,
136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
137
+ _content_type: Optional[StrictStr] = None,
138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
140
+ ) -> ApiResponse[BaseResponseCommentResponse]:
141
+ """Create a comment for this function
142
+
143
+ Creates a comment associated with a specified function).
144
+
145
+ :param function_id: (required)
146
+ :type function_id: int
147
+ :param function_comment_create_request: (required)
148
+ :type function_comment_create_request: FunctionCommentCreateRequest
149
+ :param _request_timeout: timeout setting for this request. If one
150
+ number provided, it will be total request
151
+ timeout. It can also be a pair (tuple) of
152
+ (connection, read) timeouts.
153
+ :type _request_timeout: int, tuple(int, int), optional
154
+ :param _request_auth: set to override the auth_settings for an a single
155
+ request; this effectively ignores the
156
+ authentication in the spec for a single request.
157
+ :type _request_auth: dict, optional
158
+ :param _content_type: force content-type for the request.
159
+ :type _content_type: str, Optional
160
+ :param _headers: set to override the headers for a single
161
+ request; this effectively ignores the headers
162
+ in the spec for a single request.
163
+ :type _headers: dict, optional
164
+ :param _host_index: set to override the host_index for a single
165
+ request; this effectively ignores the host_index
166
+ in the spec for a single request.
167
+ :type _host_index: int, optional
168
+ :return: Returns the result object.
169
+ """ # noqa: E501
170
+
171
+ _param = self._create_ai_decompilation_comment_serialize(
172
+ function_id=function_id,
173
+ function_comment_create_request=function_comment_create_request,
174
+ _request_auth=_request_auth,
175
+ _content_type=_content_type,
176
+ _headers=_headers,
177
+ _host_index=_host_index
178
+ )
179
+
180
+ _response_types_map: Dict[str, Optional[str]] = {
181
+ '201': "BaseResponseCommentResponse",
182
+ '422': "BaseResponse",
183
+ '400': "BaseResponse",
184
+ }
185
+ response_data = self.api_client.call_api(
186
+ *_param,
187
+ _request_timeout=_request_timeout
188
+ )
189
+ response_data.read()
190
+ return self.api_client.response_deserialize(
191
+ response_data=response_data,
192
+ response_types_map=_response_types_map,
193
+ )
194
+
195
+
196
+ @validate_call
197
+ def create_ai_decompilation_comment_without_preload_content(
198
+ self,
199
+ function_id: StrictInt,
200
+ function_comment_create_request: FunctionCommentCreateRequest,
201
+ _request_timeout: Union[
202
+ None,
203
+ Annotated[StrictFloat, Field(gt=0)],
204
+ Tuple[
205
+ Annotated[StrictFloat, Field(gt=0)],
206
+ Annotated[StrictFloat, Field(gt=0)]
207
+ ]
208
+ ] = None,
209
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
210
+ _content_type: Optional[StrictStr] = None,
211
+ _headers: Optional[Dict[StrictStr, Any]] = None,
212
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
213
+ ) -> RESTResponseType:
214
+ """Create a comment for this function
215
+
216
+ Creates a comment associated with a specified function).
217
+
218
+ :param function_id: (required)
219
+ :type function_id: int
220
+ :param function_comment_create_request: (required)
221
+ :type function_comment_create_request: FunctionCommentCreateRequest
222
+ :param _request_timeout: timeout setting for this request. If one
223
+ number provided, it will be total request
224
+ timeout. It can also be a pair (tuple) of
225
+ (connection, read) timeouts.
226
+ :type _request_timeout: int, tuple(int, int), optional
227
+ :param _request_auth: set to override the auth_settings for an a single
228
+ request; this effectively ignores the
229
+ authentication in the spec for a single request.
230
+ :type _request_auth: dict, optional
231
+ :param _content_type: force content-type for the request.
232
+ :type _content_type: str, Optional
233
+ :param _headers: set to override the headers for a single
234
+ request; this effectively ignores the headers
235
+ in the spec for a single request.
236
+ :type _headers: dict, optional
237
+ :param _host_index: set to override the host_index for a single
238
+ request; this effectively ignores the host_index
239
+ in the spec for a single request.
240
+ :type _host_index: int, optional
241
+ :return: Returns the result object.
242
+ """ # noqa: E501
243
+
244
+ _param = self._create_ai_decompilation_comment_serialize(
245
+ function_id=function_id,
246
+ function_comment_create_request=function_comment_create_request,
247
+ _request_auth=_request_auth,
248
+ _content_type=_content_type,
249
+ _headers=_headers,
250
+ _host_index=_host_index
251
+ )
252
+
253
+ _response_types_map: Dict[str, Optional[str]] = {
254
+ '201': "BaseResponseCommentResponse",
255
+ '422': "BaseResponse",
256
+ '400': "BaseResponse",
257
+ }
258
+ response_data = self.api_client.call_api(
259
+ *_param,
260
+ _request_timeout=_request_timeout
261
+ )
262
+ return response_data.response
263
+
264
+
265
+ def _create_ai_decompilation_comment_serialize(
266
+ self,
267
+ function_id,
268
+ function_comment_create_request,
269
+ _request_auth,
270
+ _content_type,
271
+ _headers,
272
+ _host_index,
273
+ ) -> RequestSerialized:
274
+
275
+ _host = None
276
+
277
+ _collection_formats: Dict[str, str] = {
278
+ }
279
+
280
+ _path_params: Dict[str, str] = {}
281
+ _query_params: List[Tuple[str, str]] = []
282
+ _header_params: Dict[str, Optional[str]] = _headers or {}
283
+ _form_params: List[Tuple[str, str]] = []
284
+ _files: Dict[
285
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
286
+ ] = {}
287
+ _body_params: Optional[bytes] = None
288
+
289
+ # process the path parameters
290
+ if function_id is not None:
291
+ _path_params['function_id'] = function_id
292
+ # process the query parameters
293
+ # process the header parameters
294
+ # process the form parameters
295
+ # process the body parameter
296
+ if function_comment_create_request is not None:
297
+ _body_params = function_comment_create_request
298
+
299
+
300
+ # set the HTTP header `Accept`
301
+ if 'Accept' not in _header_params:
302
+ _header_params['Accept'] = self.api_client.select_header_accept(
303
+ [
304
+ 'application/json'
305
+ ]
306
+ )
307
+
308
+ # set the HTTP header `Content-Type`
309
+ if _content_type:
310
+ _header_params['Content-Type'] = _content_type
311
+ else:
312
+ _default_content_type = (
313
+ self.api_client.select_header_content_type(
314
+ [
315
+ 'application/json'
316
+ ]
317
+ )
318
+ )
319
+ if _default_content_type is not None:
320
+ _header_params['Content-Type'] = _default_content_type
321
+
322
+ # authentication setting
323
+ _auth_settings: List[str] = [
324
+ 'APIKey'
325
+ ]
326
+
327
+ return self.api_client.param_serialize(
328
+ method='POST',
329
+ resource_path='/v2/functions/{function_id}/ai-decompilation/comments',
330
+ path_params=_path_params,
331
+ query_params=_query_params,
332
+ header_params=_header_params,
333
+ body=_body_params,
334
+ post_params=_form_params,
335
+ files=_files,
336
+ auth_settings=_auth_settings,
337
+ collection_formats=_collection_formats,
338
+ _host=_host,
339
+ _request_auth=_request_auth
340
+ )
341
+
342
+
343
+
344
+
345
+ @validate_call
346
+ def create_ai_decompilation_task(
347
+ self,
348
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")],
349
+ _request_timeout: Union[
350
+ None,
351
+ Annotated[StrictFloat, Field(gt=0)],
352
+ Tuple[
353
+ Annotated[StrictFloat, Field(gt=0)],
354
+ Annotated[StrictFloat, Field(gt=0)]
355
+ ]
356
+ ] = None,
357
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
358
+ _content_type: Optional[StrictStr] = None,
359
+ _headers: Optional[Dict[StrictStr, Any]] = None,
360
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
361
+ ) -> BaseResponse:
362
+ """Begins AI Decompilation Process
363
+
364
+ Begins the AI Decompilation Process
365
+
366
+ :param function_id: The ID of the function for which we are creating the decompilation task (required)
367
+ :type function_id: int
368
+ :param _request_timeout: timeout setting for this request. If one
369
+ number provided, it will be total request
370
+ timeout. It can also be a pair (tuple) of
371
+ (connection, read) timeouts.
372
+ :type _request_timeout: int, tuple(int, int), optional
373
+ :param _request_auth: set to override the auth_settings for an a single
374
+ request; this effectively ignores the
375
+ authentication in the spec for a single request.
376
+ :type _request_auth: dict, optional
377
+ :param _content_type: force content-type for the request.
378
+ :type _content_type: str, Optional
379
+ :param _headers: set to override the headers for a single
380
+ request; this effectively ignores the headers
381
+ in the spec for a single request.
382
+ :type _headers: dict, optional
383
+ :param _host_index: set to override the host_index for a single
384
+ request; this effectively ignores the host_index
385
+ in the spec for a single request.
386
+ :type _host_index: int, optional
387
+ :return: Returns the result object.
388
+ """ # noqa: E501
389
+
390
+ _param = self._create_ai_decompilation_task_serialize(
391
+ function_id=function_id,
392
+ _request_auth=_request_auth,
393
+ _content_type=_content_type,
394
+ _headers=_headers,
395
+ _host_index=_host_index
396
+ )
397
+
398
+ _response_types_map: Dict[str, Optional[str]] = {
399
+ '201': "BaseResponse",
400
+ '422': "BaseResponse",
401
+ '403': "BaseResponse",
402
+ '402': "BaseResponse",
403
+ '409': "BaseResponse",
404
+ '400': "BaseResponse",
405
+ }
406
+ response_data = self.api_client.call_api(
407
+ *_param,
408
+ _request_timeout=_request_timeout
409
+ )
410
+ response_data.read()
411
+ return self.api_client.response_deserialize(
412
+ response_data=response_data,
413
+ response_types_map=_response_types_map,
414
+ ).data
415
+
416
+
417
+ @validate_call
418
+ def create_ai_decompilation_task_with_http_info(
419
+ self,
420
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")],
421
+ _request_timeout: Union[
422
+ None,
423
+ Annotated[StrictFloat, Field(gt=0)],
424
+ Tuple[
425
+ Annotated[StrictFloat, Field(gt=0)],
426
+ Annotated[StrictFloat, Field(gt=0)]
427
+ ]
428
+ ] = None,
429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
430
+ _content_type: Optional[StrictStr] = None,
431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
433
+ ) -> ApiResponse[BaseResponse]:
434
+ """Begins AI Decompilation Process
435
+
436
+ Begins the AI Decompilation Process
437
+
438
+ :param function_id: The ID of the function for which we are creating the decompilation task (required)
439
+ :type function_id: int
440
+ :param _request_timeout: timeout setting for this request. If one
441
+ number provided, it will be total request
442
+ timeout. It can also be a pair (tuple) of
443
+ (connection, read) timeouts.
444
+ :type _request_timeout: int, tuple(int, int), optional
445
+ :param _request_auth: set to override the auth_settings for an a single
446
+ request; this effectively ignores the
447
+ authentication in the spec for a single request.
448
+ :type _request_auth: dict, optional
449
+ :param _content_type: force content-type for the request.
450
+ :type _content_type: str, Optional
451
+ :param _headers: set to override the headers for a single
452
+ request; this effectively ignores the headers
453
+ in the spec for a single request.
454
+ :type _headers: dict, optional
455
+ :param _host_index: set to override the host_index for a single
456
+ request; this effectively ignores the host_index
457
+ in the spec for a single request.
458
+ :type _host_index: int, optional
459
+ :return: Returns the result object.
460
+ """ # noqa: E501
461
+
462
+ _param = self._create_ai_decompilation_task_serialize(
463
+ function_id=function_id,
464
+ _request_auth=_request_auth,
465
+ _content_type=_content_type,
466
+ _headers=_headers,
467
+ _host_index=_host_index
468
+ )
469
+
470
+ _response_types_map: Dict[str, Optional[str]] = {
471
+ '201': "BaseResponse",
472
+ '422': "BaseResponse",
473
+ '403': "BaseResponse",
474
+ '402': "BaseResponse",
475
+ '409': "BaseResponse",
476
+ '400': "BaseResponse",
477
+ }
478
+ response_data = self.api_client.call_api(
479
+ *_param,
480
+ _request_timeout=_request_timeout
481
+ )
482
+ response_data.read()
483
+ return self.api_client.response_deserialize(
484
+ response_data=response_data,
485
+ response_types_map=_response_types_map,
486
+ )
487
+
488
+
489
+ @validate_call
490
+ def create_ai_decompilation_task_without_preload_content(
491
+ self,
492
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which we are creating the decompilation task")],
493
+ _request_timeout: Union[
494
+ None,
495
+ Annotated[StrictFloat, Field(gt=0)],
496
+ Tuple[
497
+ Annotated[StrictFloat, Field(gt=0)],
498
+ Annotated[StrictFloat, Field(gt=0)]
499
+ ]
500
+ ] = None,
501
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
502
+ _content_type: Optional[StrictStr] = None,
503
+ _headers: Optional[Dict[StrictStr, Any]] = None,
504
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
505
+ ) -> RESTResponseType:
506
+ """Begins AI Decompilation Process
507
+
508
+ Begins the AI Decompilation Process
509
+
510
+ :param function_id: The ID of the function for which we are creating the decompilation task (required)
511
+ :type function_id: int
512
+ :param _request_timeout: timeout setting for this request. If one
513
+ number provided, it will be total request
514
+ timeout. It can also be a pair (tuple) of
515
+ (connection, read) timeouts.
516
+ :type _request_timeout: int, tuple(int, int), optional
517
+ :param _request_auth: set to override the auth_settings for an a single
518
+ request; this effectively ignores the
519
+ authentication in the spec for a single request.
520
+ :type _request_auth: dict, optional
521
+ :param _content_type: force content-type for the request.
522
+ :type _content_type: str, Optional
523
+ :param _headers: set to override the headers for a single
524
+ request; this effectively ignores the headers
525
+ in the spec for a single request.
526
+ :type _headers: dict, optional
527
+ :param _host_index: set to override the host_index for a single
528
+ request; this effectively ignores the host_index
529
+ in the spec for a single request.
530
+ :type _host_index: int, optional
531
+ :return: Returns the result object.
532
+ """ # noqa: E501
533
+
534
+ _param = self._create_ai_decompilation_task_serialize(
535
+ function_id=function_id,
536
+ _request_auth=_request_auth,
537
+ _content_type=_content_type,
538
+ _headers=_headers,
539
+ _host_index=_host_index
540
+ )
541
+
542
+ _response_types_map: Dict[str, Optional[str]] = {
543
+ '201': "BaseResponse",
544
+ '422': "BaseResponse",
545
+ '403': "BaseResponse",
546
+ '402': "BaseResponse",
547
+ '409': "BaseResponse",
548
+ '400': "BaseResponse",
549
+ }
550
+ response_data = self.api_client.call_api(
551
+ *_param,
552
+ _request_timeout=_request_timeout
553
+ )
554
+ return response_data.response
555
+
556
+
557
+ def _create_ai_decompilation_task_serialize(
558
+ self,
559
+ function_id,
560
+ _request_auth,
561
+ _content_type,
562
+ _headers,
563
+ _host_index,
564
+ ) -> RequestSerialized:
565
+
566
+ _host = None
567
+
568
+ _collection_formats: Dict[str, str] = {
569
+ }
570
+
571
+ _path_params: Dict[str, str] = {}
572
+ _query_params: List[Tuple[str, str]] = []
573
+ _header_params: Dict[str, Optional[str]] = _headers or {}
574
+ _form_params: List[Tuple[str, str]] = []
575
+ _files: Dict[
576
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
577
+ ] = {}
578
+ _body_params: Optional[bytes] = None
579
+
580
+ # process the path parameters
581
+ if function_id is not None:
582
+ _path_params['function_id'] = function_id
583
+ # process the query parameters
584
+ # process the header parameters
585
+ # process the form parameters
586
+ # process the body parameter
587
+
588
+
589
+ # set the HTTP header `Accept`
590
+ if 'Accept' not in _header_params:
591
+ _header_params['Accept'] = self.api_client.select_header_accept(
592
+ [
593
+ 'application/json'
594
+ ]
595
+ )
596
+
597
+
598
+ # authentication setting
599
+ _auth_settings: List[str] = [
600
+ 'APIKey'
601
+ ]
602
+
603
+ return self.api_client.param_serialize(
604
+ method='POST',
605
+ resource_path='/v2/functions/{function_id}/ai-decompilation',
606
+ path_params=_path_params,
607
+ query_params=_query_params,
608
+ header_params=_header_params,
609
+ body=_body_params,
610
+ post_params=_form_params,
611
+ files=_files,
612
+ auth_settings=_auth_settings,
613
+ collection_formats=_collection_formats,
614
+ _host=_host,
615
+ _request_auth=_request_auth
616
+ )
617
+
618
+
619
+
620
+
621
+ @validate_call
622
+ def delete_ai_decompilation_comment(
623
+ self,
624
+ comment_id: Annotated[int, Field(strict=True, ge=1)],
625
+ function_id: StrictInt,
626
+ _request_timeout: Union[
627
+ None,
628
+ Annotated[StrictFloat, Field(gt=0)],
629
+ Tuple[
630
+ Annotated[StrictFloat, Field(gt=0)],
631
+ Annotated[StrictFloat, Field(gt=0)]
632
+ ]
633
+ ] = None,
634
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
635
+ _content_type: Optional[StrictStr] = None,
636
+ _headers: Optional[Dict[StrictStr, Any]] = None,
637
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
638
+ ) -> BaseResponseBool:
639
+ """Delete a comment
640
+
641
+ Deletes an existing comment. Users can only delete their own comments.
642
+
643
+ :param comment_id: (required)
644
+ :type comment_id: int
645
+ :param function_id: (required)
646
+ :type function_id: int
647
+ :param _request_timeout: timeout setting for this request. If one
648
+ number provided, it will be total request
649
+ timeout. It can also be a pair (tuple) of
650
+ (connection, read) timeouts.
651
+ :type _request_timeout: int, tuple(int, int), optional
652
+ :param _request_auth: set to override the auth_settings for an a single
653
+ request; this effectively ignores the
654
+ authentication in the spec for a single request.
655
+ :type _request_auth: dict, optional
656
+ :param _content_type: force content-type for the request.
657
+ :type _content_type: str, Optional
658
+ :param _headers: set to override the headers for a single
659
+ request; this effectively ignores the headers
660
+ in the spec for a single request.
661
+ :type _headers: dict, optional
662
+ :param _host_index: set to override the host_index for a single
663
+ request; this effectively ignores the host_index
664
+ in the spec for a single request.
665
+ :type _host_index: int, optional
666
+ :return: Returns the result object.
667
+ """ # noqa: E501
668
+
669
+ _param = self._delete_ai_decompilation_comment_serialize(
670
+ comment_id=comment_id,
671
+ function_id=function_id,
672
+ _request_auth=_request_auth,
673
+ _content_type=_content_type,
674
+ _headers=_headers,
675
+ _host_index=_host_index
676
+ )
677
+
678
+ _response_types_map: Dict[str, Optional[str]] = {
679
+ '200': "BaseResponseBool",
680
+ '422': "BaseResponse",
681
+ '403': "BaseResponse",
682
+ '400': "BaseResponse",
683
+ }
684
+ response_data = self.api_client.call_api(
685
+ *_param,
686
+ _request_timeout=_request_timeout
687
+ )
688
+ response_data.read()
689
+ return self.api_client.response_deserialize(
690
+ response_data=response_data,
691
+ response_types_map=_response_types_map,
692
+ ).data
693
+
694
+
695
+ @validate_call
696
+ def delete_ai_decompilation_comment_with_http_info(
697
+ self,
698
+ comment_id: Annotated[int, Field(strict=True, ge=1)],
699
+ function_id: StrictInt,
700
+ _request_timeout: Union[
701
+ None,
702
+ Annotated[StrictFloat, Field(gt=0)],
703
+ Tuple[
704
+ Annotated[StrictFloat, Field(gt=0)],
705
+ Annotated[StrictFloat, Field(gt=0)]
706
+ ]
707
+ ] = None,
708
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
709
+ _content_type: Optional[StrictStr] = None,
710
+ _headers: Optional[Dict[StrictStr, Any]] = None,
711
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
712
+ ) -> ApiResponse[BaseResponseBool]:
713
+ """Delete a comment
714
+
715
+ Deletes an existing comment. Users can only delete their own comments.
716
+
717
+ :param comment_id: (required)
718
+ :type comment_id: int
719
+ :param function_id: (required)
720
+ :type function_id: int
721
+ :param _request_timeout: timeout setting for this request. If one
722
+ number provided, it will be total request
723
+ timeout. It can also be a pair (tuple) of
724
+ (connection, read) timeouts.
725
+ :type _request_timeout: int, tuple(int, int), optional
726
+ :param _request_auth: set to override the auth_settings for an a single
727
+ request; this effectively ignores the
728
+ authentication in the spec for a single request.
729
+ :type _request_auth: dict, optional
730
+ :param _content_type: force content-type for the request.
731
+ :type _content_type: str, Optional
732
+ :param _headers: set to override the headers for a single
733
+ request; this effectively ignores the headers
734
+ in the spec for a single request.
735
+ :type _headers: dict, optional
736
+ :param _host_index: set to override the host_index for a single
737
+ request; this effectively ignores the host_index
738
+ in the spec for a single request.
739
+ :type _host_index: int, optional
740
+ :return: Returns the result object.
741
+ """ # noqa: E501
742
+
743
+ _param = self._delete_ai_decompilation_comment_serialize(
744
+ comment_id=comment_id,
745
+ function_id=function_id,
746
+ _request_auth=_request_auth,
747
+ _content_type=_content_type,
748
+ _headers=_headers,
749
+ _host_index=_host_index
750
+ )
751
+
752
+ _response_types_map: Dict[str, Optional[str]] = {
753
+ '200': "BaseResponseBool",
754
+ '422': "BaseResponse",
755
+ '403': "BaseResponse",
756
+ '400': "BaseResponse",
757
+ }
758
+ response_data = self.api_client.call_api(
759
+ *_param,
760
+ _request_timeout=_request_timeout
761
+ )
762
+ response_data.read()
763
+ return self.api_client.response_deserialize(
764
+ response_data=response_data,
765
+ response_types_map=_response_types_map,
766
+ )
767
+
768
+
769
+ @validate_call
770
+ def delete_ai_decompilation_comment_without_preload_content(
771
+ self,
772
+ comment_id: Annotated[int, Field(strict=True, ge=1)],
773
+ function_id: StrictInt,
774
+ _request_timeout: Union[
775
+ None,
776
+ Annotated[StrictFloat, Field(gt=0)],
777
+ Tuple[
778
+ Annotated[StrictFloat, Field(gt=0)],
779
+ Annotated[StrictFloat, Field(gt=0)]
780
+ ]
781
+ ] = None,
782
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
783
+ _content_type: Optional[StrictStr] = None,
784
+ _headers: Optional[Dict[StrictStr, Any]] = None,
785
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
786
+ ) -> RESTResponseType:
787
+ """Delete a comment
788
+
789
+ Deletes an existing comment. Users can only delete their own comments.
790
+
791
+ :param comment_id: (required)
792
+ :type comment_id: int
793
+ :param function_id: (required)
794
+ :type function_id: int
795
+ :param _request_timeout: timeout setting for this request. If one
796
+ number provided, it will be total request
797
+ timeout. It can also be a pair (tuple) of
798
+ (connection, read) timeouts.
799
+ :type _request_timeout: int, tuple(int, int), optional
800
+ :param _request_auth: set to override the auth_settings for an a single
801
+ request; this effectively ignores the
802
+ authentication in the spec for a single request.
803
+ :type _request_auth: dict, optional
804
+ :param _content_type: force content-type for the request.
805
+ :type _content_type: str, Optional
806
+ :param _headers: set to override the headers for a single
807
+ request; this effectively ignores the headers
808
+ in the spec for a single request.
809
+ :type _headers: dict, optional
810
+ :param _host_index: set to override the host_index for a single
811
+ request; this effectively ignores the host_index
812
+ in the spec for a single request.
813
+ :type _host_index: int, optional
814
+ :return: Returns the result object.
815
+ """ # noqa: E501
816
+
817
+ _param = self._delete_ai_decompilation_comment_serialize(
818
+ comment_id=comment_id,
819
+ function_id=function_id,
820
+ _request_auth=_request_auth,
821
+ _content_type=_content_type,
822
+ _headers=_headers,
823
+ _host_index=_host_index
824
+ )
825
+
826
+ _response_types_map: Dict[str, Optional[str]] = {
827
+ '200': "BaseResponseBool",
828
+ '422': "BaseResponse",
829
+ '403': "BaseResponse",
830
+ '400': "BaseResponse",
831
+ }
832
+ response_data = self.api_client.call_api(
833
+ *_param,
834
+ _request_timeout=_request_timeout
835
+ )
836
+ return response_data.response
837
+
838
+
839
+ def _delete_ai_decompilation_comment_serialize(
840
+ self,
841
+ comment_id,
842
+ function_id,
843
+ _request_auth,
844
+ _content_type,
845
+ _headers,
846
+ _host_index,
847
+ ) -> RequestSerialized:
848
+
849
+ _host = None
850
+
851
+ _collection_formats: Dict[str, str] = {
852
+ }
853
+
854
+ _path_params: Dict[str, str] = {}
855
+ _query_params: List[Tuple[str, str]] = []
856
+ _header_params: Dict[str, Optional[str]] = _headers or {}
857
+ _form_params: List[Tuple[str, str]] = []
858
+ _files: Dict[
859
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
860
+ ] = {}
861
+ _body_params: Optional[bytes] = None
862
+
863
+ # process the path parameters
864
+ if comment_id is not None:
865
+ _path_params['comment_id'] = comment_id
866
+ if function_id is not None:
867
+ _path_params['function_id'] = function_id
868
+ # process the query parameters
869
+ # process the header parameters
870
+ # process the form parameters
871
+ # process the body parameter
872
+
873
+
874
+ # set the HTTP header `Accept`
875
+ if 'Accept' not in _header_params:
876
+ _header_params['Accept'] = self.api_client.select_header_accept(
877
+ [
878
+ 'application/json'
879
+ ]
880
+ )
881
+
882
+
883
+ # authentication setting
884
+ _auth_settings: List[str] = [
885
+ 'APIKey'
886
+ ]
887
+
888
+ return self.api_client.param_serialize(
889
+ method='DELETE',
890
+ resource_path='/v2/functions/{function_id}/ai-decompilation/comments/{comment_id}',
891
+ path_params=_path_params,
892
+ query_params=_query_params,
893
+ header_params=_header_params,
894
+ body=_body_params,
895
+ post_params=_form_params,
896
+ files=_files,
897
+ auth_settings=_auth_settings,
898
+ collection_formats=_collection_formats,
899
+ _host=_host,
900
+ _request_auth=_request_auth
901
+ )
902
+
903
+
904
+
905
+
906
+ @validate_call
907
+ def get_ai_decompilation_comments(
908
+ self,
909
+ function_id: StrictInt,
910
+ _request_timeout: Union[
911
+ None,
912
+ Annotated[StrictFloat, Field(gt=0)],
913
+ Tuple[
914
+ Annotated[StrictFloat, Field(gt=0)],
915
+ Annotated[StrictFloat, Field(gt=0)]
916
+ ]
917
+ ] = None,
918
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
919
+ _content_type: Optional[StrictStr] = None,
920
+ _headers: Optional[Dict[StrictStr, Any]] = None,
921
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
922
+ ) -> BaseResponseListCommentResponse:
923
+ """Get comments for this function
924
+
925
+ Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to.
926
+
927
+ :param function_id: (required)
928
+ :type function_id: int
929
+ :param _request_timeout: timeout setting for this request. If one
930
+ number provided, it will be total request
931
+ timeout. It can also be a pair (tuple) of
932
+ (connection, read) timeouts.
933
+ :type _request_timeout: int, tuple(int, int), optional
934
+ :param _request_auth: set to override the auth_settings for an a single
935
+ request; this effectively ignores the
936
+ authentication in the spec for a single request.
937
+ :type _request_auth: dict, optional
938
+ :param _content_type: force content-type for the request.
939
+ :type _content_type: str, Optional
940
+ :param _headers: set to override the headers for a single
941
+ request; this effectively ignores the headers
942
+ in the spec for a single request.
943
+ :type _headers: dict, optional
944
+ :param _host_index: set to override the host_index for a single
945
+ request; this effectively ignores the host_index
946
+ in the spec for a single request.
947
+ :type _host_index: int, optional
948
+ :return: Returns the result object.
949
+ """ # noqa: E501
950
+
951
+ _param = self._get_ai_decompilation_comments_serialize(
952
+ function_id=function_id,
953
+ _request_auth=_request_auth,
954
+ _content_type=_content_type,
955
+ _headers=_headers,
956
+ _host_index=_host_index
957
+ )
958
+
959
+ _response_types_map: Dict[str, Optional[str]] = {
960
+ '200': "BaseResponseListCommentResponse",
961
+ '422': "BaseResponse",
962
+ }
963
+ response_data = self.api_client.call_api(
964
+ *_param,
965
+ _request_timeout=_request_timeout
966
+ )
967
+ response_data.read()
968
+ return self.api_client.response_deserialize(
969
+ response_data=response_data,
970
+ response_types_map=_response_types_map,
971
+ ).data
972
+
973
+
974
+ @validate_call
975
+ def get_ai_decompilation_comments_with_http_info(
976
+ self,
977
+ function_id: StrictInt,
978
+ _request_timeout: Union[
979
+ None,
980
+ Annotated[StrictFloat, Field(gt=0)],
981
+ Tuple[
982
+ Annotated[StrictFloat, Field(gt=0)],
983
+ Annotated[StrictFloat, Field(gt=0)]
984
+ ]
985
+ ] = None,
986
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
987
+ _content_type: Optional[StrictStr] = None,
988
+ _headers: Optional[Dict[StrictStr, Any]] = None,
989
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
990
+ ) -> ApiResponse[BaseResponseListCommentResponse]:
991
+ """Get comments for this function
992
+
993
+ Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to.
994
+
995
+ :param function_id: (required)
996
+ :type function_id: int
997
+ :param _request_timeout: timeout setting for this request. If one
998
+ number provided, it will be total request
999
+ timeout. It can also be a pair (tuple) of
1000
+ (connection, read) timeouts.
1001
+ :type _request_timeout: int, tuple(int, int), optional
1002
+ :param _request_auth: set to override the auth_settings for an a single
1003
+ request; this effectively ignores the
1004
+ authentication in the spec for a single request.
1005
+ :type _request_auth: dict, optional
1006
+ :param _content_type: force content-type for the request.
1007
+ :type _content_type: str, Optional
1008
+ :param _headers: set to override the headers for a single
1009
+ request; this effectively ignores the headers
1010
+ in the spec for a single request.
1011
+ :type _headers: dict, optional
1012
+ :param _host_index: set to override the host_index for a single
1013
+ request; this effectively ignores the host_index
1014
+ in the spec for a single request.
1015
+ :type _host_index: int, optional
1016
+ :return: Returns the result object.
1017
+ """ # noqa: E501
1018
+
1019
+ _param = self._get_ai_decompilation_comments_serialize(
1020
+ function_id=function_id,
1021
+ _request_auth=_request_auth,
1022
+ _content_type=_content_type,
1023
+ _headers=_headers,
1024
+ _host_index=_host_index
1025
+ )
1026
+
1027
+ _response_types_map: Dict[str, Optional[str]] = {
1028
+ '200': "BaseResponseListCommentResponse",
1029
+ '422': "BaseResponse",
1030
+ }
1031
+ response_data = self.api_client.call_api(
1032
+ *_param,
1033
+ _request_timeout=_request_timeout
1034
+ )
1035
+ response_data.read()
1036
+ return self.api_client.response_deserialize(
1037
+ response_data=response_data,
1038
+ response_types_map=_response_types_map,
1039
+ )
1040
+
1041
+
1042
+ @validate_call
1043
+ def get_ai_decompilation_comments_without_preload_content(
1044
+ self,
1045
+ function_id: StrictInt,
1046
+ _request_timeout: Union[
1047
+ None,
1048
+ Annotated[StrictFloat, Field(gt=0)],
1049
+ Tuple[
1050
+ Annotated[StrictFloat, Field(gt=0)],
1051
+ Annotated[StrictFloat, Field(gt=0)]
1052
+ ]
1053
+ ] = None,
1054
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1055
+ _content_type: Optional[StrictStr] = None,
1056
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1057
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1058
+ ) -> RESTResponseType:
1059
+ """Get comments for this function
1060
+
1061
+ Retrieves all comments created for a specific function. Only returns comments for resources the requesting user has access to.
1062
+
1063
+ :param function_id: (required)
1064
+ :type function_id: int
1065
+ :param _request_timeout: timeout setting for this request. If one
1066
+ number provided, it will be total request
1067
+ timeout. It can also be a pair (tuple) of
1068
+ (connection, read) timeouts.
1069
+ :type _request_timeout: int, tuple(int, int), optional
1070
+ :param _request_auth: set to override the auth_settings for an a single
1071
+ request; this effectively ignores the
1072
+ authentication in the spec for a single request.
1073
+ :type _request_auth: dict, optional
1074
+ :param _content_type: force content-type for the request.
1075
+ :type _content_type: str, Optional
1076
+ :param _headers: set to override the headers for a single
1077
+ request; this effectively ignores the headers
1078
+ in the spec for a single request.
1079
+ :type _headers: dict, optional
1080
+ :param _host_index: set to override the host_index for a single
1081
+ request; this effectively ignores the host_index
1082
+ in the spec for a single request.
1083
+ :type _host_index: int, optional
1084
+ :return: Returns the result object.
1085
+ """ # noqa: E501
1086
+
1087
+ _param = self._get_ai_decompilation_comments_serialize(
1088
+ function_id=function_id,
1089
+ _request_auth=_request_auth,
1090
+ _content_type=_content_type,
1091
+ _headers=_headers,
1092
+ _host_index=_host_index
1093
+ )
1094
+
1095
+ _response_types_map: Dict[str, Optional[str]] = {
1096
+ '200': "BaseResponseListCommentResponse",
1097
+ '422': "BaseResponse",
1098
+ }
1099
+ response_data = self.api_client.call_api(
1100
+ *_param,
1101
+ _request_timeout=_request_timeout
1102
+ )
1103
+ return response_data.response
1104
+
1105
+
1106
+ def _get_ai_decompilation_comments_serialize(
1107
+ self,
1108
+ function_id,
1109
+ _request_auth,
1110
+ _content_type,
1111
+ _headers,
1112
+ _host_index,
1113
+ ) -> RequestSerialized:
1114
+
1115
+ _host = None
1116
+
1117
+ _collection_formats: Dict[str, str] = {
1118
+ }
1119
+
1120
+ _path_params: Dict[str, str] = {}
1121
+ _query_params: List[Tuple[str, str]] = []
1122
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1123
+ _form_params: List[Tuple[str, str]] = []
1124
+ _files: Dict[
1125
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1126
+ ] = {}
1127
+ _body_params: Optional[bytes] = None
1128
+
1129
+ # process the path parameters
1130
+ if function_id is not None:
1131
+ _path_params['function_id'] = function_id
1132
+ # process the query parameters
1133
+ # process the header parameters
1134
+ # process the form parameters
1135
+ # process the body parameter
1136
+
1137
+
1138
+ # set the HTTP header `Accept`
1139
+ if 'Accept' not in _header_params:
1140
+ _header_params['Accept'] = self.api_client.select_header_accept(
1141
+ [
1142
+ 'application/json'
1143
+ ]
1144
+ )
1145
+
1146
+
1147
+ # authentication setting
1148
+ _auth_settings: List[str] = [
1149
+ 'APIKey'
1150
+ ]
1151
+
1152
+ return self.api_client.param_serialize(
1153
+ method='GET',
1154
+ resource_path='/v2/functions/{function_id}/ai-decompilation/comments',
1155
+ path_params=_path_params,
1156
+ query_params=_query_params,
1157
+ header_params=_header_params,
1158
+ body=_body_params,
1159
+ post_params=_form_params,
1160
+ files=_files,
1161
+ auth_settings=_auth_settings,
1162
+ collection_formats=_collection_formats,
1163
+ _host=_host,
1164
+ _request_auth=_request_auth
1165
+ )
1166
+
1167
+
1168
+
1169
+
1170
+ @validate_call
1171
+ def get_ai_decompilation_rating(
1172
+ self,
1173
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")],
1174
+ _request_timeout: Union[
1175
+ None,
1176
+ Annotated[StrictFloat, Field(gt=0)],
1177
+ Tuple[
1178
+ Annotated[StrictFloat, Field(gt=0)],
1179
+ Annotated[StrictFloat, Field(gt=0)]
1180
+ ]
1181
+ ] = None,
1182
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1183
+ _content_type: Optional[StrictStr] = None,
1184
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1185
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1186
+ ) -> BaseResponseGetAiDecompilationRatingResponse:
1187
+ """Get rating for AI decompilation
1188
+
1189
+
1190
+ :param function_id: The ID of the function for which to get the rating (required)
1191
+ :type function_id: int
1192
+ :param _request_timeout: timeout setting for this request. If one
1193
+ number provided, it will be total request
1194
+ timeout. It can also be a pair (tuple) of
1195
+ (connection, read) timeouts.
1196
+ :type _request_timeout: int, tuple(int, int), optional
1197
+ :param _request_auth: set to override the auth_settings for an a single
1198
+ request; this effectively ignores the
1199
+ authentication in the spec for a single request.
1200
+ :type _request_auth: dict, optional
1201
+ :param _content_type: force content-type for the request.
1202
+ :type _content_type: str, Optional
1203
+ :param _headers: set to override the headers for a single
1204
+ request; this effectively ignores the headers
1205
+ in the spec for a single request.
1206
+ :type _headers: dict, optional
1207
+ :param _host_index: set to override the host_index for a single
1208
+ request; this effectively ignores the host_index
1209
+ in the spec for a single request.
1210
+ :type _host_index: int, optional
1211
+ :return: Returns the result object.
1212
+ """ # noqa: E501
1213
+
1214
+ _param = self._get_ai_decompilation_rating_serialize(
1215
+ function_id=function_id,
1216
+ _request_auth=_request_auth,
1217
+ _content_type=_content_type,
1218
+ _headers=_headers,
1219
+ _host_index=_host_index
1220
+ )
1221
+
1222
+ _response_types_map: Dict[str, Optional[str]] = {
1223
+ '200': "BaseResponseGetAiDecompilationRatingResponse",
1224
+ '422': "BaseResponse",
1225
+ }
1226
+ response_data = self.api_client.call_api(
1227
+ *_param,
1228
+ _request_timeout=_request_timeout
1229
+ )
1230
+ response_data.read()
1231
+ return self.api_client.response_deserialize(
1232
+ response_data=response_data,
1233
+ response_types_map=_response_types_map,
1234
+ ).data
1235
+
1236
+
1237
+ @validate_call
1238
+ def get_ai_decompilation_rating_with_http_info(
1239
+ self,
1240
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")],
1241
+ _request_timeout: Union[
1242
+ None,
1243
+ Annotated[StrictFloat, Field(gt=0)],
1244
+ Tuple[
1245
+ Annotated[StrictFloat, Field(gt=0)],
1246
+ Annotated[StrictFloat, Field(gt=0)]
1247
+ ]
1248
+ ] = None,
1249
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1250
+ _content_type: Optional[StrictStr] = None,
1251
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1252
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1253
+ ) -> ApiResponse[BaseResponseGetAiDecompilationRatingResponse]:
1254
+ """Get rating for AI decompilation
1255
+
1256
+
1257
+ :param function_id: The ID of the function for which to get the rating (required)
1258
+ :type function_id: int
1259
+ :param _request_timeout: timeout setting for this request. If one
1260
+ number provided, it will be total request
1261
+ timeout. It can also be a pair (tuple) of
1262
+ (connection, read) timeouts.
1263
+ :type _request_timeout: int, tuple(int, int), optional
1264
+ :param _request_auth: set to override the auth_settings for an a single
1265
+ request; this effectively ignores the
1266
+ authentication in the spec for a single request.
1267
+ :type _request_auth: dict, optional
1268
+ :param _content_type: force content-type for the request.
1269
+ :type _content_type: str, Optional
1270
+ :param _headers: set to override the headers for a single
1271
+ request; this effectively ignores the headers
1272
+ in the spec for a single request.
1273
+ :type _headers: dict, optional
1274
+ :param _host_index: set to override the host_index for a single
1275
+ request; this effectively ignores the host_index
1276
+ in the spec for a single request.
1277
+ :type _host_index: int, optional
1278
+ :return: Returns the result object.
1279
+ """ # noqa: E501
1280
+
1281
+ _param = self._get_ai_decompilation_rating_serialize(
1282
+ function_id=function_id,
1283
+ _request_auth=_request_auth,
1284
+ _content_type=_content_type,
1285
+ _headers=_headers,
1286
+ _host_index=_host_index
1287
+ )
1288
+
1289
+ _response_types_map: Dict[str, Optional[str]] = {
1290
+ '200': "BaseResponseGetAiDecompilationRatingResponse",
1291
+ '422': "BaseResponse",
1292
+ }
1293
+ response_data = self.api_client.call_api(
1294
+ *_param,
1295
+ _request_timeout=_request_timeout
1296
+ )
1297
+ response_data.read()
1298
+ return self.api_client.response_deserialize(
1299
+ response_data=response_data,
1300
+ response_types_map=_response_types_map,
1301
+ )
1302
+
1303
+
1304
+ @validate_call
1305
+ def get_ai_decompilation_rating_without_preload_content(
1306
+ self,
1307
+ function_id: Annotated[StrictInt, Field(description="The ID of the function for which to get the rating")],
1308
+ _request_timeout: Union[
1309
+ None,
1310
+ Annotated[StrictFloat, Field(gt=0)],
1311
+ Tuple[
1312
+ Annotated[StrictFloat, Field(gt=0)],
1313
+ Annotated[StrictFloat, Field(gt=0)]
1314
+ ]
1315
+ ] = None,
1316
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1317
+ _content_type: Optional[StrictStr] = None,
1318
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1319
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1320
+ ) -> RESTResponseType:
1321
+ """Get rating for AI decompilation
1322
+
1323
+
1324
+ :param function_id: The ID of the function for which to get the rating (required)
1325
+ :type function_id: int
1326
+ :param _request_timeout: timeout setting for this request. If one
1327
+ number provided, it will be total request
1328
+ timeout. It can also be a pair (tuple) of
1329
+ (connection, read) timeouts.
1330
+ :type _request_timeout: int, tuple(int, int), optional
1331
+ :param _request_auth: set to override the auth_settings for an a single
1332
+ request; this effectively ignores the
1333
+ authentication in the spec for a single request.
1334
+ :type _request_auth: dict, optional
1335
+ :param _content_type: force content-type for the request.
1336
+ :type _content_type: str, Optional
1337
+ :param _headers: set to override the headers for a single
1338
+ request; this effectively ignores the headers
1339
+ in the spec for a single request.
1340
+ :type _headers: dict, optional
1341
+ :param _host_index: set to override the host_index for a single
1342
+ request; this effectively ignores the host_index
1343
+ in the spec for a single request.
1344
+ :type _host_index: int, optional
1345
+ :return: Returns the result object.
1346
+ """ # noqa: E501
1347
+
1348
+ _param = self._get_ai_decompilation_rating_serialize(
1349
+ function_id=function_id,
1350
+ _request_auth=_request_auth,
1351
+ _content_type=_content_type,
1352
+ _headers=_headers,
1353
+ _host_index=_host_index
1354
+ )
1355
+
1356
+ _response_types_map: Dict[str, Optional[str]] = {
1357
+ '200': "BaseResponseGetAiDecompilationRatingResponse",
1358
+ '422': "BaseResponse",
1359
+ }
1360
+ response_data = self.api_client.call_api(
1361
+ *_param,
1362
+ _request_timeout=_request_timeout
1363
+ )
1364
+ return response_data.response
1365
+
1366
+
1367
+ def _get_ai_decompilation_rating_serialize(
1368
+ self,
1369
+ function_id,
1370
+ _request_auth,
1371
+ _content_type,
1372
+ _headers,
1373
+ _host_index,
1374
+ ) -> RequestSerialized:
1375
+
1376
+ _host = None
1377
+
1378
+ _collection_formats: Dict[str, str] = {
1379
+ }
1380
+
1381
+ _path_params: Dict[str, str] = {}
1382
+ _query_params: List[Tuple[str, str]] = []
1383
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1384
+ _form_params: List[Tuple[str, str]] = []
1385
+ _files: Dict[
1386
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1387
+ ] = {}
1388
+ _body_params: Optional[bytes] = None
1389
+
1390
+ # process the path parameters
1391
+ if function_id is not None:
1392
+ _path_params['function_id'] = function_id
1393
+ # process the query parameters
1394
+ # process the header parameters
1395
+ # process the form parameters
1396
+ # process the body parameter
1397
+
1398
+
1399
+ # set the HTTP header `Accept`
1400
+ if 'Accept' not in _header_params:
1401
+ _header_params['Accept'] = self.api_client.select_header_accept(
1402
+ [
1403
+ 'application/json'
1404
+ ]
1405
+ )
1406
+
1407
+
1408
+ # authentication setting
1409
+ _auth_settings: List[str] = [
1410
+ 'APIKey'
1411
+ ]
1412
+
1413
+ return self.api_client.param_serialize(
1414
+ method='GET',
1415
+ resource_path='/v2/functions/{function_id}/ai-decompilation/rating',
1416
+ path_params=_path_params,
1417
+ query_params=_query_params,
1418
+ header_params=_header_params,
1419
+ body=_body_params,
1420
+ post_params=_form_params,
1421
+ files=_files,
1422
+ auth_settings=_auth_settings,
1423
+ collection_formats=_collection_formats,
1424
+ _host=_host,
1425
+ _request_auth=_request_auth
1426
+ )
1427
+
1428
+
1429
+
1430
+
1431
+ @validate_call
1432
+ def get_ai_decompilation_task_result(
1433
+ self,
1434
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")],
1435
+ summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None,
1436
+ generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None,
1437
+ _request_timeout: Union[
1438
+ None,
1439
+ Annotated[StrictFloat, Field(gt=0)],
1440
+ Tuple[
1441
+ Annotated[StrictFloat, Field(gt=0)],
1442
+ Annotated[StrictFloat, Field(gt=0)]
1443
+ ]
1444
+ ] = None,
1445
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1446
+ _content_type: Optional[StrictStr] = None,
1447
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1448
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1449
+ ) -> BaseResponseGetAiDecompilationTask:
1450
+ """Polls AI Decompilation Process
1451
+
1452
+ Polls the AI Decompilation Process
1453
+
1454
+ :param function_id: The ID of the function being decompiled (required)
1455
+ :type function_id: int
1456
+ :param summarise: Generate a summary for the decompilation
1457
+ :type summarise: bool
1458
+ :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled)
1459
+ :type generate_inline_comments: bool
1460
+ :param _request_timeout: timeout setting for this request. If one
1461
+ number provided, it will be total request
1462
+ timeout. It can also be a pair (tuple) of
1463
+ (connection, read) timeouts.
1464
+ :type _request_timeout: int, tuple(int, int), optional
1465
+ :param _request_auth: set to override the auth_settings for an a single
1466
+ request; this effectively ignores the
1467
+ authentication in the spec for a single request.
1468
+ :type _request_auth: dict, optional
1469
+ :param _content_type: force content-type for the request.
1470
+ :type _content_type: str, Optional
1471
+ :param _headers: set to override the headers for a single
1472
+ request; this effectively ignores the headers
1473
+ in the spec for a single request.
1474
+ :type _headers: dict, optional
1475
+ :param _host_index: set to override the host_index for a single
1476
+ request; this effectively ignores the host_index
1477
+ in the spec for a single request.
1478
+ :type _host_index: int, optional
1479
+ :return: Returns the result object.
1480
+ """ # noqa: E501
1481
+
1482
+ _param = self._get_ai_decompilation_task_result_serialize(
1483
+ function_id=function_id,
1484
+ summarise=summarise,
1485
+ generate_inline_comments=generate_inline_comments,
1486
+ _request_auth=_request_auth,
1487
+ _content_type=_content_type,
1488
+ _headers=_headers,
1489
+ _host_index=_host_index
1490
+ )
1491
+
1492
+ _response_types_map: Dict[str, Optional[str]] = {
1493
+ '200': "BaseResponseGetAiDecompilationTask",
1494
+ '422': "BaseResponse",
1495
+ '403': "BaseResponse",
1496
+ }
1497
+ response_data = self.api_client.call_api(
1498
+ *_param,
1499
+ _request_timeout=_request_timeout
1500
+ )
1501
+ response_data.read()
1502
+ return self.api_client.response_deserialize(
1503
+ response_data=response_data,
1504
+ response_types_map=_response_types_map,
1505
+ ).data
1506
+
1507
+
1508
+ @validate_call
1509
+ def get_ai_decompilation_task_result_with_http_info(
1510
+ self,
1511
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")],
1512
+ summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None,
1513
+ generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None,
1514
+ _request_timeout: Union[
1515
+ None,
1516
+ Annotated[StrictFloat, Field(gt=0)],
1517
+ Tuple[
1518
+ Annotated[StrictFloat, Field(gt=0)],
1519
+ Annotated[StrictFloat, Field(gt=0)]
1520
+ ]
1521
+ ] = None,
1522
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1523
+ _content_type: Optional[StrictStr] = None,
1524
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1525
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1526
+ ) -> ApiResponse[BaseResponseGetAiDecompilationTask]:
1527
+ """Polls AI Decompilation Process
1528
+
1529
+ Polls the AI Decompilation Process
1530
+
1531
+ :param function_id: The ID of the function being decompiled (required)
1532
+ :type function_id: int
1533
+ :param summarise: Generate a summary for the decompilation
1534
+ :type summarise: bool
1535
+ :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled)
1536
+ :type generate_inline_comments: bool
1537
+ :param _request_timeout: timeout setting for this request. If one
1538
+ number provided, it will be total request
1539
+ timeout. It can also be a pair (tuple) of
1540
+ (connection, read) timeouts.
1541
+ :type _request_timeout: int, tuple(int, int), optional
1542
+ :param _request_auth: set to override the auth_settings for an a single
1543
+ request; this effectively ignores the
1544
+ authentication in the spec for a single request.
1545
+ :type _request_auth: dict, optional
1546
+ :param _content_type: force content-type for the request.
1547
+ :type _content_type: str, Optional
1548
+ :param _headers: set to override the headers for a single
1549
+ request; this effectively ignores the headers
1550
+ in the spec for a single request.
1551
+ :type _headers: dict, optional
1552
+ :param _host_index: set to override the host_index for a single
1553
+ request; this effectively ignores the host_index
1554
+ in the spec for a single request.
1555
+ :type _host_index: int, optional
1556
+ :return: Returns the result object.
1557
+ """ # noqa: E501
1558
+
1559
+ _param = self._get_ai_decompilation_task_result_serialize(
1560
+ function_id=function_id,
1561
+ summarise=summarise,
1562
+ generate_inline_comments=generate_inline_comments,
1563
+ _request_auth=_request_auth,
1564
+ _content_type=_content_type,
1565
+ _headers=_headers,
1566
+ _host_index=_host_index
1567
+ )
1568
+
1569
+ _response_types_map: Dict[str, Optional[str]] = {
1570
+ '200': "BaseResponseGetAiDecompilationTask",
1571
+ '422': "BaseResponse",
1572
+ '403': "BaseResponse",
1573
+ }
1574
+ response_data = self.api_client.call_api(
1575
+ *_param,
1576
+ _request_timeout=_request_timeout
1577
+ )
1578
+ response_data.read()
1579
+ return self.api_client.response_deserialize(
1580
+ response_data=response_data,
1581
+ response_types_map=_response_types_map,
1582
+ )
1583
+
1584
+
1585
+ @validate_call
1586
+ def get_ai_decompilation_task_result_without_preload_content(
1587
+ self,
1588
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being decompiled")],
1589
+ summarise: Annotated[Optional[StrictBool], Field(description="Generate a summary for the decompilation")] = None,
1590
+ generate_inline_comments: Annotated[Optional[StrictBool], Field(description="Generate inline comments for the decompilation (only works if summarise is enabled)")] = None,
1591
+ _request_timeout: Union[
1592
+ None,
1593
+ Annotated[StrictFloat, Field(gt=0)],
1594
+ Tuple[
1595
+ Annotated[StrictFloat, Field(gt=0)],
1596
+ Annotated[StrictFloat, Field(gt=0)]
1597
+ ]
1598
+ ] = None,
1599
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1600
+ _content_type: Optional[StrictStr] = None,
1601
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1602
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1603
+ ) -> RESTResponseType:
1604
+ """Polls AI Decompilation Process
1605
+
1606
+ Polls the AI Decompilation Process
1607
+
1608
+ :param function_id: The ID of the function being decompiled (required)
1609
+ :type function_id: int
1610
+ :param summarise: Generate a summary for the decompilation
1611
+ :type summarise: bool
1612
+ :param generate_inline_comments: Generate inline comments for the decompilation (only works if summarise is enabled)
1613
+ :type generate_inline_comments: bool
1614
+ :param _request_timeout: timeout setting for this request. If one
1615
+ number provided, it will be total request
1616
+ timeout. It can also be a pair (tuple) of
1617
+ (connection, read) timeouts.
1618
+ :type _request_timeout: int, tuple(int, int), optional
1619
+ :param _request_auth: set to override the auth_settings for an a single
1620
+ request; this effectively ignores the
1621
+ authentication in the spec for a single request.
1622
+ :type _request_auth: dict, optional
1623
+ :param _content_type: force content-type for the request.
1624
+ :type _content_type: str, Optional
1625
+ :param _headers: set to override the headers for a single
1626
+ request; this effectively ignores the headers
1627
+ in the spec for a single request.
1628
+ :type _headers: dict, optional
1629
+ :param _host_index: set to override the host_index for a single
1630
+ request; this effectively ignores the host_index
1631
+ in the spec for a single request.
1632
+ :type _host_index: int, optional
1633
+ :return: Returns the result object.
1634
+ """ # noqa: E501
1635
+
1636
+ _param = self._get_ai_decompilation_task_result_serialize(
1637
+ function_id=function_id,
1638
+ summarise=summarise,
1639
+ generate_inline_comments=generate_inline_comments,
1640
+ _request_auth=_request_auth,
1641
+ _content_type=_content_type,
1642
+ _headers=_headers,
1643
+ _host_index=_host_index
1644
+ )
1645
+
1646
+ _response_types_map: Dict[str, Optional[str]] = {
1647
+ '200': "BaseResponseGetAiDecompilationTask",
1648
+ '422': "BaseResponse",
1649
+ '403': "BaseResponse",
1650
+ }
1651
+ response_data = self.api_client.call_api(
1652
+ *_param,
1653
+ _request_timeout=_request_timeout
1654
+ )
1655
+ return response_data.response
1656
+
1657
+
1658
+ def _get_ai_decompilation_task_result_serialize(
1659
+ self,
1660
+ function_id,
1661
+ summarise,
1662
+ generate_inline_comments,
1663
+ _request_auth,
1664
+ _content_type,
1665
+ _headers,
1666
+ _host_index,
1667
+ ) -> RequestSerialized:
1668
+
1669
+ _host = None
1670
+
1671
+ _collection_formats: Dict[str, str] = {
1672
+ }
1673
+
1674
+ _path_params: Dict[str, str] = {}
1675
+ _query_params: List[Tuple[str, str]] = []
1676
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1677
+ _form_params: List[Tuple[str, str]] = []
1678
+ _files: Dict[
1679
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1680
+ ] = {}
1681
+ _body_params: Optional[bytes] = None
1682
+
1683
+ # process the path parameters
1684
+ if function_id is not None:
1685
+ _path_params['function_id'] = function_id
1686
+ # process the query parameters
1687
+ if summarise is not None:
1688
+
1689
+ _query_params.append(('summarise', summarise))
1690
+
1691
+ if generate_inline_comments is not None:
1692
+
1693
+ _query_params.append(('generate_inline_comments', generate_inline_comments))
1694
+
1695
+ # process the header parameters
1696
+ # process the form parameters
1697
+ # process the body parameter
1698
+
1699
+
1700
+ # set the HTTP header `Accept`
1701
+ if 'Accept' not in _header_params:
1702
+ _header_params['Accept'] = self.api_client.select_header_accept(
1703
+ [
1704
+ 'application/json'
1705
+ ]
1706
+ )
1707
+
1708
+
1709
+ # authentication setting
1710
+ _auth_settings: List[str] = [
1711
+ 'APIKey'
1712
+ ]
1713
+
1714
+ return self.api_client.param_serialize(
1715
+ method='GET',
1716
+ resource_path='/v2/functions/{function_id}/ai-decompilation',
1717
+ path_params=_path_params,
1718
+ query_params=_query_params,
1719
+ header_params=_header_params,
1720
+ body=_body_params,
1721
+ post_params=_form_params,
1722
+ files=_files,
1723
+ auth_settings=_auth_settings,
1724
+ collection_formats=_collection_formats,
1725
+ _host=_host,
1726
+ _request_auth=_request_auth
1727
+ )
1728
+
1729
+
1730
+
1731
+
1732
+ @validate_call
1733
+ def get_ai_decompilation_task_status(
1734
+ self,
1735
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")],
1736
+ _request_timeout: Union[
1737
+ None,
1738
+ Annotated[StrictFloat, Field(gt=0)],
1739
+ Tuple[
1740
+ Annotated[StrictFloat, Field(gt=0)],
1741
+ Annotated[StrictFloat, Field(gt=0)]
1742
+ ]
1743
+ ] = None,
1744
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1745
+ _content_type: Optional[StrictStr] = None,
1746
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1747
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1748
+ ) -> BaseResponseFunctionTaskResponse:
1749
+ """Check the status of a function ai decompilation
1750
+
1751
+
1752
+ :param function_id: The ID of the function being checked (required)
1753
+ :type function_id: int
1754
+ :param _request_timeout: timeout setting for this request. If one
1755
+ number provided, it will be total request
1756
+ timeout. It can also be a pair (tuple) of
1757
+ (connection, read) timeouts.
1758
+ :type _request_timeout: int, tuple(int, int), optional
1759
+ :param _request_auth: set to override the auth_settings for an a single
1760
+ request; this effectively ignores the
1761
+ authentication in the spec for a single request.
1762
+ :type _request_auth: dict, optional
1763
+ :param _content_type: force content-type for the request.
1764
+ :type _content_type: str, Optional
1765
+ :param _headers: set to override the headers for a single
1766
+ request; this effectively ignores the headers
1767
+ in the spec for a single request.
1768
+ :type _headers: dict, optional
1769
+ :param _host_index: set to override the host_index for a single
1770
+ request; this effectively ignores the host_index
1771
+ in the spec for a single request.
1772
+ :type _host_index: int, optional
1773
+ :return: Returns the result object.
1774
+ """ # noqa: E501
1775
+
1776
+ _param = self._get_ai_decompilation_task_status_serialize(
1777
+ function_id=function_id,
1778
+ _request_auth=_request_auth,
1779
+ _content_type=_content_type,
1780
+ _headers=_headers,
1781
+ _host_index=_host_index
1782
+ )
1783
+
1784
+ _response_types_map: Dict[str, Optional[str]] = {
1785
+ '200': "BaseResponseFunctionTaskResponse",
1786
+ '422': "BaseResponse",
1787
+ }
1788
+ response_data = self.api_client.call_api(
1789
+ *_param,
1790
+ _request_timeout=_request_timeout
1791
+ )
1792
+ response_data.read()
1793
+ return self.api_client.response_deserialize(
1794
+ response_data=response_data,
1795
+ response_types_map=_response_types_map,
1796
+ ).data
1797
+
1798
+
1799
+ @validate_call
1800
+ def get_ai_decompilation_task_status_with_http_info(
1801
+ self,
1802
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")],
1803
+ _request_timeout: Union[
1804
+ None,
1805
+ Annotated[StrictFloat, Field(gt=0)],
1806
+ Tuple[
1807
+ Annotated[StrictFloat, Field(gt=0)],
1808
+ Annotated[StrictFloat, Field(gt=0)]
1809
+ ]
1810
+ ] = None,
1811
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1812
+ _content_type: Optional[StrictStr] = None,
1813
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1814
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1815
+ ) -> ApiResponse[BaseResponseFunctionTaskResponse]:
1816
+ """Check the status of a function ai decompilation
1817
+
1818
+
1819
+ :param function_id: The ID of the function being checked (required)
1820
+ :type function_id: int
1821
+ :param _request_timeout: timeout setting for this request. If one
1822
+ number provided, it will be total request
1823
+ timeout. It can also be a pair (tuple) of
1824
+ (connection, read) timeouts.
1825
+ :type _request_timeout: int, tuple(int, int), optional
1826
+ :param _request_auth: set to override the auth_settings for an a single
1827
+ request; this effectively ignores the
1828
+ authentication in the spec for a single request.
1829
+ :type _request_auth: dict, optional
1830
+ :param _content_type: force content-type for the request.
1831
+ :type _content_type: str, Optional
1832
+ :param _headers: set to override the headers for a single
1833
+ request; this effectively ignores the headers
1834
+ in the spec for a single request.
1835
+ :type _headers: dict, optional
1836
+ :param _host_index: set to override the host_index for a single
1837
+ request; this effectively ignores the host_index
1838
+ in the spec for a single request.
1839
+ :type _host_index: int, optional
1840
+ :return: Returns the result object.
1841
+ """ # noqa: E501
1842
+
1843
+ _param = self._get_ai_decompilation_task_status_serialize(
1844
+ function_id=function_id,
1845
+ _request_auth=_request_auth,
1846
+ _content_type=_content_type,
1847
+ _headers=_headers,
1848
+ _host_index=_host_index
1849
+ )
1850
+
1851
+ _response_types_map: Dict[str, Optional[str]] = {
1852
+ '200': "BaseResponseFunctionTaskResponse",
1853
+ '422': "BaseResponse",
1854
+ }
1855
+ response_data = self.api_client.call_api(
1856
+ *_param,
1857
+ _request_timeout=_request_timeout
1858
+ )
1859
+ response_data.read()
1860
+ return self.api_client.response_deserialize(
1861
+ response_data=response_data,
1862
+ response_types_map=_response_types_map,
1863
+ )
1864
+
1865
+
1866
+ @validate_call
1867
+ def get_ai_decompilation_task_status_without_preload_content(
1868
+ self,
1869
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being checked")],
1870
+ _request_timeout: Union[
1871
+ None,
1872
+ Annotated[StrictFloat, Field(gt=0)],
1873
+ Tuple[
1874
+ Annotated[StrictFloat, Field(gt=0)],
1875
+ Annotated[StrictFloat, Field(gt=0)]
1876
+ ]
1877
+ ] = None,
1878
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1879
+ _content_type: Optional[StrictStr] = None,
1880
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1881
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1882
+ ) -> RESTResponseType:
1883
+ """Check the status of a function ai decompilation
1884
+
1885
+
1886
+ :param function_id: The ID of the function being checked (required)
1887
+ :type function_id: int
1888
+ :param _request_timeout: timeout setting for this request. If one
1889
+ number provided, it will be total request
1890
+ timeout. It can also be a pair (tuple) of
1891
+ (connection, read) timeouts.
1892
+ :type _request_timeout: int, tuple(int, int), optional
1893
+ :param _request_auth: set to override the auth_settings for an a single
1894
+ request; this effectively ignores the
1895
+ authentication in the spec for a single request.
1896
+ :type _request_auth: dict, optional
1897
+ :param _content_type: force content-type for the request.
1898
+ :type _content_type: str, Optional
1899
+ :param _headers: set to override the headers for a single
1900
+ request; this effectively ignores the headers
1901
+ in the spec for a single request.
1902
+ :type _headers: dict, optional
1903
+ :param _host_index: set to override the host_index for a single
1904
+ request; this effectively ignores the host_index
1905
+ in the spec for a single request.
1906
+ :type _host_index: int, optional
1907
+ :return: Returns the result object.
1908
+ """ # noqa: E501
1909
+
1910
+ _param = self._get_ai_decompilation_task_status_serialize(
1911
+ function_id=function_id,
1912
+ _request_auth=_request_auth,
1913
+ _content_type=_content_type,
1914
+ _headers=_headers,
1915
+ _host_index=_host_index
1916
+ )
1917
+
1918
+ _response_types_map: Dict[str, Optional[str]] = {
1919
+ '200': "BaseResponseFunctionTaskResponse",
1920
+ '422': "BaseResponse",
1921
+ }
1922
+ response_data = self.api_client.call_api(
1923
+ *_param,
1924
+ _request_timeout=_request_timeout
1925
+ )
1926
+ return response_data.response
1927
+
1928
+
1929
+ def _get_ai_decompilation_task_status_serialize(
1930
+ self,
1931
+ function_id,
1932
+ _request_auth,
1933
+ _content_type,
1934
+ _headers,
1935
+ _host_index,
1936
+ ) -> RequestSerialized:
1937
+
1938
+ _host = None
1939
+
1940
+ _collection_formats: Dict[str, str] = {
1941
+ }
1942
+
1943
+ _path_params: Dict[str, str] = {}
1944
+ _query_params: List[Tuple[str, str]] = []
1945
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1946
+ _form_params: List[Tuple[str, str]] = []
1947
+ _files: Dict[
1948
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1949
+ ] = {}
1950
+ _body_params: Optional[bytes] = None
1951
+
1952
+ # process the path parameters
1953
+ if function_id is not None:
1954
+ _path_params['function_id'] = function_id
1955
+ # process the query parameters
1956
+ # process the header parameters
1957
+ # process the form parameters
1958
+ # process the body parameter
1959
+
1960
+
1961
+ # set the HTTP header `Accept`
1962
+ if 'Accept' not in _header_params:
1963
+ _header_params['Accept'] = self.api_client.select_header_accept(
1964
+ [
1965
+ 'application/json'
1966
+ ]
1967
+ )
1968
+
1969
+
1970
+ # authentication setting
1971
+ _auth_settings: List[str] = [
1972
+ 'APIKey'
1973
+ ]
1974
+
1975
+ return self.api_client.param_serialize(
1976
+ method='GET',
1977
+ resource_path='/v2/functions/{function_id}/ai-decompilation/status',
1978
+ path_params=_path_params,
1979
+ query_params=_query_params,
1980
+ header_params=_header_params,
1981
+ body=_body_params,
1982
+ post_params=_form_params,
1983
+ files=_files,
1984
+ auth_settings=_auth_settings,
1985
+ collection_formats=_collection_formats,
1986
+ _host=_host,
1987
+ _request_auth=_request_auth
1988
+ )
1989
+
1990
+
1991
+
1992
+
1993
+ @validate_call
1994
+ def update_ai_decompilation_comment(
1995
+ self,
1996
+ comment_id: Annotated[int, Field(strict=True, ge=1)],
1997
+ function_id: StrictInt,
1998
+ comment_update_request: CommentUpdateRequest,
1999
+ _request_timeout: Union[
2000
+ None,
2001
+ Annotated[StrictFloat, Field(gt=0)],
2002
+ Tuple[
2003
+ Annotated[StrictFloat, Field(gt=0)],
2004
+ Annotated[StrictFloat, Field(gt=0)]
2005
+ ]
2006
+ ] = None,
2007
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2008
+ _content_type: Optional[StrictStr] = None,
2009
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2010
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2011
+ ) -> BaseResponseCommentResponse:
2012
+ """Update a comment
2013
+
2014
+ Updates the content of an existing comment. Users can only update their own comments.
2015
+
2016
+ :param comment_id: (required)
2017
+ :type comment_id: int
2018
+ :param function_id: (required)
2019
+ :type function_id: int
2020
+ :param comment_update_request: (required)
2021
+ :type comment_update_request: CommentUpdateRequest
2022
+ :param _request_timeout: timeout setting for this request. If one
2023
+ number provided, it will be total request
2024
+ timeout. It can also be a pair (tuple) of
2025
+ (connection, read) timeouts.
2026
+ :type _request_timeout: int, tuple(int, int), optional
2027
+ :param _request_auth: set to override the auth_settings for an a single
2028
+ request; this effectively ignores the
2029
+ authentication in the spec for a single request.
2030
+ :type _request_auth: dict, optional
2031
+ :param _content_type: force content-type for the request.
2032
+ :type _content_type: str, Optional
2033
+ :param _headers: set to override the headers for a single
2034
+ request; this effectively ignores the headers
2035
+ in the spec for a single request.
2036
+ :type _headers: dict, optional
2037
+ :param _host_index: set to override the host_index for a single
2038
+ request; this effectively ignores the host_index
2039
+ in the spec for a single request.
2040
+ :type _host_index: int, optional
2041
+ :return: Returns the result object.
2042
+ """ # noqa: E501
2043
+
2044
+ _param = self._update_ai_decompilation_comment_serialize(
2045
+ comment_id=comment_id,
2046
+ function_id=function_id,
2047
+ comment_update_request=comment_update_request,
2048
+ _request_auth=_request_auth,
2049
+ _content_type=_content_type,
2050
+ _headers=_headers,
2051
+ _host_index=_host_index
2052
+ )
2053
+
2054
+ _response_types_map: Dict[str, Optional[str]] = {
2055
+ '200': "BaseResponseCommentResponse",
2056
+ '422': "BaseResponse",
2057
+ '403': "BaseResponse",
2058
+ '400': "BaseResponse",
2059
+ }
2060
+ response_data = self.api_client.call_api(
2061
+ *_param,
2062
+ _request_timeout=_request_timeout
2063
+ )
2064
+ response_data.read()
2065
+ return self.api_client.response_deserialize(
2066
+ response_data=response_data,
2067
+ response_types_map=_response_types_map,
2068
+ ).data
2069
+
2070
+
2071
+ @validate_call
2072
+ def update_ai_decompilation_comment_with_http_info(
2073
+ self,
2074
+ comment_id: Annotated[int, Field(strict=True, ge=1)],
2075
+ function_id: StrictInt,
2076
+ comment_update_request: CommentUpdateRequest,
2077
+ _request_timeout: Union[
2078
+ None,
2079
+ Annotated[StrictFloat, Field(gt=0)],
2080
+ Tuple[
2081
+ Annotated[StrictFloat, Field(gt=0)],
2082
+ Annotated[StrictFloat, Field(gt=0)]
2083
+ ]
2084
+ ] = None,
2085
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2086
+ _content_type: Optional[StrictStr] = None,
2087
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2088
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2089
+ ) -> ApiResponse[BaseResponseCommentResponse]:
2090
+ """Update a comment
2091
+
2092
+ Updates the content of an existing comment. Users can only update their own comments.
2093
+
2094
+ :param comment_id: (required)
2095
+ :type comment_id: int
2096
+ :param function_id: (required)
2097
+ :type function_id: int
2098
+ :param comment_update_request: (required)
2099
+ :type comment_update_request: CommentUpdateRequest
2100
+ :param _request_timeout: timeout setting for this request. If one
2101
+ number provided, it will be total request
2102
+ timeout. It can also be a pair (tuple) of
2103
+ (connection, read) timeouts.
2104
+ :type _request_timeout: int, tuple(int, int), optional
2105
+ :param _request_auth: set to override the auth_settings for an a single
2106
+ request; this effectively ignores the
2107
+ authentication in the spec for a single request.
2108
+ :type _request_auth: dict, optional
2109
+ :param _content_type: force content-type for the request.
2110
+ :type _content_type: str, Optional
2111
+ :param _headers: set to override the headers for a single
2112
+ request; this effectively ignores the headers
2113
+ in the spec for a single request.
2114
+ :type _headers: dict, optional
2115
+ :param _host_index: set to override the host_index for a single
2116
+ request; this effectively ignores the host_index
2117
+ in the spec for a single request.
2118
+ :type _host_index: int, optional
2119
+ :return: Returns the result object.
2120
+ """ # noqa: E501
2121
+
2122
+ _param = self._update_ai_decompilation_comment_serialize(
2123
+ comment_id=comment_id,
2124
+ function_id=function_id,
2125
+ comment_update_request=comment_update_request,
2126
+ _request_auth=_request_auth,
2127
+ _content_type=_content_type,
2128
+ _headers=_headers,
2129
+ _host_index=_host_index
2130
+ )
2131
+
2132
+ _response_types_map: Dict[str, Optional[str]] = {
2133
+ '200': "BaseResponseCommentResponse",
2134
+ '422': "BaseResponse",
2135
+ '403': "BaseResponse",
2136
+ '400': "BaseResponse",
2137
+ }
2138
+ response_data = self.api_client.call_api(
2139
+ *_param,
2140
+ _request_timeout=_request_timeout
2141
+ )
2142
+ response_data.read()
2143
+ return self.api_client.response_deserialize(
2144
+ response_data=response_data,
2145
+ response_types_map=_response_types_map,
2146
+ )
2147
+
2148
+
2149
+ @validate_call
2150
+ def update_ai_decompilation_comment_without_preload_content(
2151
+ self,
2152
+ comment_id: Annotated[int, Field(strict=True, ge=1)],
2153
+ function_id: StrictInt,
2154
+ comment_update_request: CommentUpdateRequest,
2155
+ _request_timeout: Union[
2156
+ None,
2157
+ Annotated[StrictFloat, Field(gt=0)],
2158
+ Tuple[
2159
+ Annotated[StrictFloat, Field(gt=0)],
2160
+ Annotated[StrictFloat, Field(gt=0)]
2161
+ ]
2162
+ ] = None,
2163
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2164
+ _content_type: Optional[StrictStr] = None,
2165
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2166
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2167
+ ) -> RESTResponseType:
2168
+ """Update a comment
2169
+
2170
+ Updates the content of an existing comment. Users can only update their own comments.
2171
+
2172
+ :param comment_id: (required)
2173
+ :type comment_id: int
2174
+ :param function_id: (required)
2175
+ :type function_id: int
2176
+ :param comment_update_request: (required)
2177
+ :type comment_update_request: CommentUpdateRequest
2178
+ :param _request_timeout: timeout setting for this request. If one
2179
+ number provided, it will be total request
2180
+ timeout. It can also be a pair (tuple) of
2181
+ (connection, read) timeouts.
2182
+ :type _request_timeout: int, tuple(int, int), optional
2183
+ :param _request_auth: set to override the auth_settings for an a single
2184
+ request; this effectively ignores the
2185
+ authentication in the spec for a single request.
2186
+ :type _request_auth: dict, optional
2187
+ :param _content_type: force content-type for the request.
2188
+ :type _content_type: str, Optional
2189
+ :param _headers: set to override the headers for a single
2190
+ request; this effectively ignores the headers
2191
+ in the spec for a single request.
2192
+ :type _headers: dict, optional
2193
+ :param _host_index: set to override the host_index for a single
2194
+ request; this effectively ignores the host_index
2195
+ in the spec for a single request.
2196
+ :type _host_index: int, optional
2197
+ :return: Returns the result object.
2198
+ """ # noqa: E501
2199
+
2200
+ _param = self._update_ai_decompilation_comment_serialize(
2201
+ comment_id=comment_id,
2202
+ function_id=function_id,
2203
+ comment_update_request=comment_update_request,
2204
+ _request_auth=_request_auth,
2205
+ _content_type=_content_type,
2206
+ _headers=_headers,
2207
+ _host_index=_host_index
2208
+ )
2209
+
2210
+ _response_types_map: Dict[str, Optional[str]] = {
2211
+ '200': "BaseResponseCommentResponse",
2212
+ '422': "BaseResponse",
2213
+ '403': "BaseResponse",
2214
+ '400': "BaseResponse",
2215
+ }
2216
+ response_data = self.api_client.call_api(
2217
+ *_param,
2218
+ _request_timeout=_request_timeout
2219
+ )
2220
+ return response_data.response
2221
+
2222
+
2223
+ def _update_ai_decompilation_comment_serialize(
2224
+ self,
2225
+ comment_id,
2226
+ function_id,
2227
+ comment_update_request,
2228
+ _request_auth,
2229
+ _content_type,
2230
+ _headers,
2231
+ _host_index,
2232
+ ) -> RequestSerialized:
2233
+
2234
+ _host = None
2235
+
2236
+ _collection_formats: Dict[str, str] = {
2237
+ }
2238
+
2239
+ _path_params: Dict[str, str] = {}
2240
+ _query_params: List[Tuple[str, str]] = []
2241
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2242
+ _form_params: List[Tuple[str, str]] = []
2243
+ _files: Dict[
2244
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2245
+ ] = {}
2246
+ _body_params: Optional[bytes] = None
2247
+
2248
+ # process the path parameters
2249
+ if comment_id is not None:
2250
+ _path_params['comment_id'] = comment_id
2251
+ if function_id is not None:
2252
+ _path_params['function_id'] = function_id
2253
+ # process the query parameters
2254
+ # process the header parameters
2255
+ # process the form parameters
2256
+ # process the body parameter
2257
+ if comment_update_request is not None:
2258
+ _body_params = comment_update_request
2259
+
2260
+
2261
+ # set the HTTP header `Accept`
2262
+ if 'Accept' not in _header_params:
2263
+ _header_params['Accept'] = self.api_client.select_header_accept(
2264
+ [
2265
+ 'application/json'
2266
+ ]
2267
+ )
2268
+
2269
+ # set the HTTP header `Content-Type`
2270
+ if _content_type:
2271
+ _header_params['Content-Type'] = _content_type
2272
+ else:
2273
+ _default_content_type = (
2274
+ self.api_client.select_header_content_type(
2275
+ [
2276
+ 'application/json'
2277
+ ]
2278
+ )
2279
+ )
2280
+ if _default_content_type is not None:
2281
+ _header_params['Content-Type'] = _default_content_type
2282
+
2283
+ # authentication setting
2284
+ _auth_settings: List[str] = [
2285
+ 'APIKey'
2286
+ ]
2287
+
2288
+ return self.api_client.param_serialize(
2289
+ method='PATCH',
2290
+ resource_path='/v2/functions/{function_id}/ai-decompilation/comments/{comment_id}',
2291
+ path_params=_path_params,
2292
+ query_params=_query_params,
2293
+ header_params=_header_params,
2294
+ body=_body_params,
2295
+ post_params=_form_params,
2296
+ files=_files,
2297
+ auth_settings=_auth_settings,
2298
+ collection_formats=_collection_formats,
2299
+ _host=_host,
2300
+ _request_auth=_request_auth
2301
+ )
2302
+
2303
+
2304
+
2305
+
2306
+ @validate_call
2307
+ def upsert_ai_decompilation_rating(
2308
+ self,
2309
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being rated")],
2310
+ upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest,
2311
+ _request_timeout: Union[
2312
+ None,
2313
+ Annotated[StrictFloat, Field(gt=0)],
2314
+ Tuple[
2315
+ Annotated[StrictFloat, Field(gt=0)],
2316
+ Annotated[StrictFloat, Field(gt=0)]
2317
+ ]
2318
+ ] = None,
2319
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2320
+ _content_type: Optional[StrictStr] = None,
2321
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2322
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2323
+ ) -> BaseResponse:
2324
+ """Upsert rating for AI decompilation
2325
+
2326
+
2327
+ :param function_id: The ID of the function being rated (required)
2328
+ :type function_id: int
2329
+ :param upsert_ai_decomplation_rating_request: (required)
2330
+ :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest
2331
+ :param _request_timeout: timeout setting for this request. If one
2332
+ number provided, it will be total request
2333
+ timeout. It can also be a pair (tuple) of
2334
+ (connection, read) timeouts.
2335
+ :type _request_timeout: int, tuple(int, int), optional
2336
+ :param _request_auth: set to override the auth_settings for an a single
2337
+ request; this effectively ignores the
2338
+ authentication in the spec for a single request.
2339
+ :type _request_auth: dict, optional
2340
+ :param _content_type: force content-type for the request.
2341
+ :type _content_type: str, Optional
2342
+ :param _headers: set to override the headers for a single
2343
+ request; this effectively ignores the headers
2344
+ in the spec for a single request.
2345
+ :type _headers: dict, optional
2346
+ :param _host_index: set to override the host_index for a single
2347
+ request; this effectively ignores the host_index
2348
+ in the spec for a single request.
2349
+ :type _host_index: int, optional
2350
+ :return: Returns the result object.
2351
+ """ # noqa: E501
2352
+
2353
+ _param = self._upsert_ai_decompilation_rating_serialize(
2354
+ function_id=function_id,
2355
+ upsert_ai_decomplation_rating_request=upsert_ai_decomplation_rating_request,
2356
+ _request_auth=_request_auth,
2357
+ _content_type=_content_type,
2358
+ _headers=_headers,
2359
+ _host_index=_host_index
2360
+ )
2361
+
2362
+ _response_types_map: Dict[str, Optional[str]] = {
2363
+ '201': "BaseResponse",
2364
+ '422': "BaseResponse",
2365
+ }
2366
+ response_data = self.api_client.call_api(
2367
+ *_param,
2368
+ _request_timeout=_request_timeout
2369
+ )
2370
+ response_data.read()
2371
+ return self.api_client.response_deserialize(
2372
+ response_data=response_data,
2373
+ response_types_map=_response_types_map,
2374
+ ).data
2375
+
2376
+
2377
+ @validate_call
2378
+ def upsert_ai_decompilation_rating_with_http_info(
2379
+ self,
2380
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being rated")],
2381
+ upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest,
2382
+ _request_timeout: Union[
2383
+ None,
2384
+ Annotated[StrictFloat, Field(gt=0)],
2385
+ Tuple[
2386
+ Annotated[StrictFloat, Field(gt=0)],
2387
+ Annotated[StrictFloat, Field(gt=0)]
2388
+ ]
2389
+ ] = None,
2390
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2391
+ _content_type: Optional[StrictStr] = None,
2392
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2393
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2394
+ ) -> ApiResponse[BaseResponse]:
2395
+ """Upsert rating for AI decompilation
2396
+
2397
+
2398
+ :param function_id: The ID of the function being rated (required)
2399
+ :type function_id: int
2400
+ :param upsert_ai_decomplation_rating_request: (required)
2401
+ :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest
2402
+ :param _request_timeout: timeout setting for this request. If one
2403
+ number provided, it will be total request
2404
+ timeout. It can also be a pair (tuple) of
2405
+ (connection, read) timeouts.
2406
+ :type _request_timeout: int, tuple(int, int), optional
2407
+ :param _request_auth: set to override the auth_settings for an a single
2408
+ request; this effectively ignores the
2409
+ authentication in the spec for a single request.
2410
+ :type _request_auth: dict, optional
2411
+ :param _content_type: force content-type for the request.
2412
+ :type _content_type: str, Optional
2413
+ :param _headers: set to override the headers for a single
2414
+ request; this effectively ignores the headers
2415
+ in the spec for a single request.
2416
+ :type _headers: dict, optional
2417
+ :param _host_index: set to override the host_index for a single
2418
+ request; this effectively ignores the host_index
2419
+ in the spec for a single request.
2420
+ :type _host_index: int, optional
2421
+ :return: Returns the result object.
2422
+ """ # noqa: E501
2423
+
2424
+ _param = self._upsert_ai_decompilation_rating_serialize(
2425
+ function_id=function_id,
2426
+ upsert_ai_decomplation_rating_request=upsert_ai_decomplation_rating_request,
2427
+ _request_auth=_request_auth,
2428
+ _content_type=_content_type,
2429
+ _headers=_headers,
2430
+ _host_index=_host_index
2431
+ )
2432
+
2433
+ _response_types_map: Dict[str, Optional[str]] = {
2434
+ '201': "BaseResponse",
2435
+ '422': "BaseResponse",
2436
+ }
2437
+ response_data = self.api_client.call_api(
2438
+ *_param,
2439
+ _request_timeout=_request_timeout
2440
+ )
2441
+ response_data.read()
2442
+ return self.api_client.response_deserialize(
2443
+ response_data=response_data,
2444
+ response_types_map=_response_types_map,
2445
+ )
2446
+
2447
+
2448
+ @validate_call
2449
+ def upsert_ai_decompilation_rating_without_preload_content(
2450
+ self,
2451
+ function_id: Annotated[StrictInt, Field(description="The ID of the function being rated")],
2452
+ upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest,
2453
+ _request_timeout: Union[
2454
+ None,
2455
+ Annotated[StrictFloat, Field(gt=0)],
2456
+ Tuple[
2457
+ Annotated[StrictFloat, Field(gt=0)],
2458
+ Annotated[StrictFloat, Field(gt=0)]
2459
+ ]
2460
+ ] = None,
2461
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2462
+ _content_type: Optional[StrictStr] = None,
2463
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2464
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2465
+ ) -> RESTResponseType:
2466
+ """Upsert rating for AI decompilation
2467
+
2468
+
2469
+ :param function_id: The ID of the function being rated (required)
2470
+ :type function_id: int
2471
+ :param upsert_ai_decomplation_rating_request: (required)
2472
+ :type upsert_ai_decomplation_rating_request: UpsertAiDecomplationRatingRequest
2473
+ :param _request_timeout: timeout setting for this request. If one
2474
+ number provided, it will be total request
2475
+ timeout. It can also be a pair (tuple) of
2476
+ (connection, read) timeouts.
2477
+ :type _request_timeout: int, tuple(int, int), optional
2478
+ :param _request_auth: set to override the auth_settings for an a single
2479
+ request; this effectively ignores the
2480
+ authentication in the spec for a single request.
2481
+ :type _request_auth: dict, optional
2482
+ :param _content_type: force content-type for the request.
2483
+ :type _content_type: str, Optional
2484
+ :param _headers: set to override the headers for a single
2485
+ request; this effectively ignores the headers
2486
+ in the spec for a single request.
2487
+ :type _headers: dict, optional
2488
+ :param _host_index: set to override the host_index for a single
2489
+ request; this effectively ignores the host_index
2490
+ in the spec for a single request.
2491
+ :type _host_index: int, optional
2492
+ :return: Returns the result object.
2493
+ """ # noqa: E501
2494
+
2495
+ _param = self._upsert_ai_decompilation_rating_serialize(
2496
+ function_id=function_id,
2497
+ upsert_ai_decomplation_rating_request=upsert_ai_decomplation_rating_request,
2498
+ _request_auth=_request_auth,
2499
+ _content_type=_content_type,
2500
+ _headers=_headers,
2501
+ _host_index=_host_index
2502
+ )
2503
+
2504
+ _response_types_map: Dict[str, Optional[str]] = {
2505
+ '201': "BaseResponse",
2506
+ '422': "BaseResponse",
2507
+ }
2508
+ response_data = self.api_client.call_api(
2509
+ *_param,
2510
+ _request_timeout=_request_timeout
2511
+ )
2512
+ return response_data.response
2513
+
2514
+
2515
+ def _upsert_ai_decompilation_rating_serialize(
2516
+ self,
2517
+ function_id,
2518
+ upsert_ai_decomplation_rating_request,
2519
+ _request_auth,
2520
+ _content_type,
2521
+ _headers,
2522
+ _host_index,
2523
+ ) -> RequestSerialized:
2524
+
2525
+ _host = None
2526
+
2527
+ _collection_formats: Dict[str, str] = {
2528
+ }
2529
+
2530
+ _path_params: Dict[str, str] = {}
2531
+ _query_params: List[Tuple[str, str]] = []
2532
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2533
+ _form_params: List[Tuple[str, str]] = []
2534
+ _files: Dict[
2535
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2536
+ ] = {}
2537
+ _body_params: Optional[bytes] = None
2538
+
2539
+ # process the path parameters
2540
+ if function_id is not None:
2541
+ _path_params['function_id'] = function_id
2542
+ # process the query parameters
2543
+ # process the header parameters
2544
+ # process the form parameters
2545
+ # process the body parameter
2546
+ if upsert_ai_decomplation_rating_request is not None:
2547
+ _body_params = upsert_ai_decomplation_rating_request
2548
+
2549
+
2550
+ # set the HTTP header `Accept`
2551
+ if 'Accept' not in _header_params:
2552
+ _header_params['Accept'] = self.api_client.select_header_accept(
2553
+ [
2554
+ 'application/json'
2555
+ ]
2556
+ )
2557
+
2558
+ # set the HTTP header `Content-Type`
2559
+ if _content_type:
2560
+ _header_params['Content-Type'] = _content_type
2561
+ else:
2562
+ _default_content_type = (
2563
+ self.api_client.select_header_content_type(
2564
+ [
2565
+ 'application/json'
2566
+ ]
2567
+ )
2568
+ )
2569
+ if _default_content_type is not None:
2570
+ _header_params['Content-Type'] = _default_content_type
2571
+
2572
+ # authentication setting
2573
+ _auth_settings: List[str] = [
2574
+ 'APIKey'
2575
+ ]
2576
+
2577
+ return self.api_client.param_serialize(
2578
+ method='PATCH',
2579
+ resource_path='/v2/functions/{function_id}/ai-decompilation/rating',
2580
+ path_params=_path_params,
2581
+ query_params=_query_params,
2582
+ header_params=_header_params,
2583
+ body=_body_params,
2584
+ post_params=_form_params,
2585
+ files=_files,
2586
+ auth_settings=_auth_settings,
2587
+ collection_formats=_collection_formats,
2588
+ _host=_host,
2589
+ _request_auth=_request_auth
2590
+ )
2591
+
2592
+