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,2240 @@
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, StrictInt, StrictStr
19
+ from typing import Any, Optional
20
+ from typing_extensions import Annotated
21
+ from revengai.models.base_response_analysis_functions import BaseResponseAnalysisFunctions
22
+ from revengai.models.base_response_analysis_functions_list import BaseResponseAnalysisFunctionsList
23
+ from revengai.models.base_response_analysis_tags import BaseResponseAnalysisTags
24
+ from revengai.models.base_response_capabilities import BaseResponseCapabilities
25
+ from revengai.models.base_response_communities import BaseResponseCommunities
26
+ from revengai.models.base_response_list_sbom import BaseResponseListSBOM
27
+ from revengai.models.base_response_vulnerabilities import BaseResponseVulnerabilities
28
+
29
+ from revengai.api_client import ApiClient, RequestSerialized
30
+ from revengai.api_response import ApiResponse
31
+ from revengai.rest import RESTResponseType
32
+
33
+
34
+ class AnalysesResultsMetadataApi:
35
+ """NOTE: This class is auto generated by OpenAPI Generator
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+ """
40
+
41
+ def __init__(self, api_client=None) -> None:
42
+ if api_client is None:
43
+ api_client = ApiClient.get_default()
44
+ self.api_client = api_client
45
+
46
+
47
+ @validate_call
48
+ def get_analysis_functions_paginated(
49
+ self,
50
+ analysis_id: StrictInt,
51
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
52
+ page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
53
+ _request_timeout: Union[
54
+ None,
55
+ Annotated[StrictFloat, Field(gt=0)],
56
+ Tuple[
57
+ Annotated[StrictFloat, Field(gt=0)],
58
+ Annotated[StrictFloat, Field(gt=0)]
59
+ ]
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> BaseResponseAnalysisFunctionsList:
66
+ """Get functions from analysis
67
+
68
+ Returns a paginated list of functions identified during analysis
69
+
70
+ :param analysis_id: (required)
71
+ :type analysis_id: int
72
+ :param page: The page number to retrieve.
73
+ :type page: int
74
+ :param page_size: Number of items per page.
75
+ :type page_size: int
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._get_analysis_functions_paginated_serialize(
99
+ analysis_id=analysis_id,
100
+ page=page,
101
+ page_size=page_size,
102
+ _request_auth=_request_auth,
103
+ _content_type=_content_type,
104
+ _headers=_headers,
105
+ _host_index=_host_index
106
+ )
107
+
108
+ _response_types_map: Dict[str, Optional[str]] = {
109
+ '200': "BaseResponseAnalysisFunctionsList",
110
+ '422': "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 get_analysis_functions_paginated_with_http_info(
125
+ self,
126
+ analysis_id: StrictInt,
127
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
128
+ page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
129
+ _request_timeout: Union[
130
+ None,
131
+ Annotated[StrictFloat, Field(gt=0)],
132
+ Tuple[
133
+ Annotated[StrictFloat, Field(gt=0)],
134
+ Annotated[StrictFloat, Field(gt=0)]
135
+ ]
136
+ ] = None,
137
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
138
+ _content_type: Optional[StrictStr] = None,
139
+ _headers: Optional[Dict[StrictStr, Any]] = None,
140
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
141
+ ) -> ApiResponse[BaseResponseAnalysisFunctionsList]:
142
+ """Get functions from analysis
143
+
144
+ Returns a paginated list of functions identified during analysis
145
+
146
+ :param analysis_id: (required)
147
+ :type analysis_id: int
148
+ :param page: The page number to retrieve.
149
+ :type page: int
150
+ :param page_size: Number of items per page.
151
+ :type page_size: int
152
+ :param _request_timeout: timeout setting for this request. If one
153
+ number provided, it will be total request
154
+ timeout. It can also be a pair (tuple) of
155
+ (connection, read) timeouts.
156
+ :type _request_timeout: int, tuple(int, int), optional
157
+ :param _request_auth: set to override the auth_settings for an a single
158
+ request; this effectively ignores the
159
+ authentication in the spec for a single request.
160
+ :type _request_auth: dict, optional
161
+ :param _content_type: force content-type for the request.
162
+ :type _content_type: str, Optional
163
+ :param _headers: set to override the headers for a single
164
+ request; this effectively ignores the headers
165
+ in the spec for a single request.
166
+ :type _headers: dict, optional
167
+ :param _host_index: set to override the host_index for a single
168
+ request; this effectively ignores the host_index
169
+ in the spec for a single request.
170
+ :type _host_index: int, optional
171
+ :return: Returns the result object.
172
+ """ # noqa: E501
173
+
174
+ _param = self._get_analysis_functions_paginated_serialize(
175
+ analysis_id=analysis_id,
176
+ page=page,
177
+ page_size=page_size,
178
+ _request_auth=_request_auth,
179
+ _content_type=_content_type,
180
+ _headers=_headers,
181
+ _host_index=_host_index
182
+ )
183
+
184
+ _response_types_map: Dict[str, Optional[str]] = {
185
+ '200': "BaseResponseAnalysisFunctionsList",
186
+ '422': "BaseResponse",
187
+ }
188
+ response_data = self.api_client.call_api(
189
+ *_param,
190
+ _request_timeout=_request_timeout
191
+ )
192
+ response_data.read()
193
+ return self.api_client.response_deserialize(
194
+ response_data=response_data,
195
+ response_types_map=_response_types_map,
196
+ )
197
+
198
+
199
+ @validate_call
200
+ def get_analysis_functions_paginated_without_preload_content(
201
+ self,
202
+ analysis_id: StrictInt,
203
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
204
+ page_size: Annotated[Optional[Annotated[int, Field(le=1000, strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
205
+ _request_timeout: Union[
206
+ None,
207
+ Annotated[StrictFloat, Field(gt=0)],
208
+ Tuple[
209
+ Annotated[StrictFloat, Field(gt=0)],
210
+ Annotated[StrictFloat, Field(gt=0)]
211
+ ]
212
+ ] = None,
213
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
214
+ _content_type: Optional[StrictStr] = None,
215
+ _headers: Optional[Dict[StrictStr, Any]] = None,
216
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
217
+ ) -> RESTResponseType:
218
+ """Get functions from analysis
219
+
220
+ Returns a paginated list of functions identified during analysis
221
+
222
+ :param analysis_id: (required)
223
+ :type analysis_id: int
224
+ :param page: The page number to retrieve.
225
+ :type page: int
226
+ :param page_size: Number of items per page.
227
+ :type page_size: int
228
+ :param _request_timeout: timeout setting for this request. If one
229
+ number provided, it will be total request
230
+ timeout. It can also be a pair (tuple) of
231
+ (connection, read) timeouts.
232
+ :type _request_timeout: int, tuple(int, int), optional
233
+ :param _request_auth: set to override the auth_settings for an a single
234
+ request; this effectively ignores the
235
+ authentication in the spec for a single request.
236
+ :type _request_auth: dict, optional
237
+ :param _content_type: force content-type for the request.
238
+ :type _content_type: str, Optional
239
+ :param _headers: set to override the headers for a single
240
+ request; this effectively ignores the headers
241
+ in the spec for a single request.
242
+ :type _headers: dict, optional
243
+ :param _host_index: set to override the host_index for a single
244
+ request; this effectively ignores the host_index
245
+ in the spec for a single request.
246
+ :type _host_index: int, optional
247
+ :return: Returns the result object.
248
+ """ # noqa: E501
249
+
250
+ _param = self._get_analysis_functions_paginated_serialize(
251
+ analysis_id=analysis_id,
252
+ page=page,
253
+ page_size=page_size,
254
+ _request_auth=_request_auth,
255
+ _content_type=_content_type,
256
+ _headers=_headers,
257
+ _host_index=_host_index
258
+ )
259
+
260
+ _response_types_map: Dict[str, Optional[str]] = {
261
+ '200': "BaseResponseAnalysisFunctionsList",
262
+ '422': "BaseResponse",
263
+ }
264
+ response_data = self.api_client.call_api(
265
+ *_param,
266
+ _request_timeout=_request_timeout
267
+ )
268
+ return response_data.response
269
+
270
+
271
+ def _get_analysis_functions_paginated_serialize(
272
+ self,
273
+ analysis_id,
274
+ page,
275
+ page_size,
276
+ _request_auth,
277
+ _content_type,
278
+ _headers,
279
+ _host_index,
280
+ ) -> RequestSerialized:
281
+
282
+ _host = None
283
+
284
+ _collection_formats: Dict[str, str] = {
285
+ }
286
+
287
+ _path_params: Dict[str, str] = {}
288
+ _query_params: List[Tuple[str, str]] = []
289
+ _header_params: Dict[str, Optional[str]] = _headers or {}
290
+ _form_params: List[Tuple[str, str]] = []
291
+ _files: Dict[
292
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
293
+ ] = {}
294
+ _body_params: Optional[bytes] = None
295
+
296
+ # process the path parameters
297
+ if analysis_id is not None:
298
+ _path_params['analysis_id'] = analysis_id
299
+ # process the query parameters
300
+ if page is not None:
301
+
302
+ _query_params.append(('page', page))
303
+
304
+ if page_size is not None:
305
+
306
+ _query_params.append(('page_size', page_size))
307
+
308
+ # process the header parameters
309
+ # process the form parameters
310
+ # process the body parameter
311
+
312
+
313
+ # set the HTTP header `Accept`
314
+ if 'Accept' not in _header_params:
315
+ _header_params['Accept'] = self.api_client.select_header_accept(
316
+ [
317
+ 'application/json'
318
+ ]
319
+ )
320
+
321
+
322
+ # authentication setting
323
+ _auth_settings: List[str] = [
324
+ 'APIKey'
325
+ ]
326
+
327
+ return self.api_client.param_serialize(
328
+ method='GET',
329
+ resource_path='/v2/analyses/{analysis_id}/functions',
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 get_capabilities(
347
+ self,
348
+ analysis_id: StrictInt,
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
+ ) -> BaseResponseCapabilities:
362
+ """Gets the capabilities from the analysis
363
+
364
+
365
+ :param analysis_id: (required)
366
+ :type analysis_id: int
367
+ :param _request_timeout: timeout setting for this request. If one
368
+ number provided, it will be total request
369
+ timeout. It can also be a pair (tuple) of
370
+ (connection, read) timeouts.
371
+ :type _request_timeout: int, tuple(int, int), optional
372
+ :param _request_auth: set to override the auth_settings for an a single
373
+ request; this effectively ignores the
374
+ authentication in the spec for a single request.
375
+ :type _request_auth: dict, optional
376
+ :param _content_type: force content-type for the request.
377
+ :type _content_type: str, Optional
378
+ :param _headers: set to override the headers for a single
379
+ request; this effectively ignores the headers
380
+ in the spec for a single request.
381
+ :type _headers: dict, optional
382
+ :param _host_index: set to override the host_index for a single
383
+ request; this effectively ignores the host_index
384
+ in the spec for a single request.
385
+ :type _host_index: int, optional
386
+ :return: Returns the result object.
387
+ """ # noqa: E501
388
+
389
+ _param = self._get_capabilities_serialize(
390
+ analysis_id=analysis_id,
391
+ _request_auth=_request_auth,
392
+ _content_type=_content_type,
393
+ _headers=_headers,
394
+ _host_index=_host_index
395
+ )
396
+
397
+ _response_types_map: Dict[str, Optional[str]] = {
398
+ '200': "BaseResponseCapabilities",
399
+ '422': "BaseResponse",
400
+ }
401
+ response_data = self.api_client.call_api(
402
+ *_param,
403
+ _request_timeout=_request_timeout
404
+ )
405
+ response_data.read()
406
+ return self.api_client.response_deserialize(
407
+ response_data=response_data,
408
+ response_types_map=_response_types_map,
409
+ ).data
410
+
411
+
412
+ @validate_call
413
+ def get_capabilities_with_http_info(
414
+ self,
415
+ analysis_id: StrictInt,
416
+ _request_timeout: Union[
417
+ None,
418
+ Annotated[StrictFloat, Field(gt=0)],
419
+ Tuple[
420
+ Annotated[StrictFloat, Field(gt=0)],
421
+ Annotated[StrictFloat, Field(gt=0)]
422
+ ]
423
+ ] = None,
424
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
425
+ _content_type: Optional[StrictStr] = None,
426
+ _headers: Optional[Dict[StrictStr, Any]] = None,
427
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
428
+ ) -> ApiResponse[BaseResponseCapabilities]:
429
+ """Gets the capabilities from the analysis
430
+
431
+
432
+ :param analysis_id: (required)
433
+ :type analysis_id: int
434
+ :param _request_timeout: timeout setting for this request. If one
435
+ number provided, it will be total request
436
+ timeout. It can also be a pair (tuple) of
437
+ (connection, read) timeouts.
438
+ :type _request_timeout: int, tuple(int, int), optional
439
+ :param _request_auth: set to override the auth_settings for an a single
440
+ request; this effectively ignores the
441
+ authentication in the spec for a single request.
442
+ :type _request_auth: dict, optional
443
+ :param _content_type: force content-type for the request.
444
+ :type _content_type: str, Optional
445
+ :param _headers: set to override the headers for a single
446
+ request; this effectively ignores the headers
447
+ in the spec for a single request.
448
+ :type _headers: dict, optional
449
+ :param _host_index: set to override the host_index for a single
450
+ request; this effectively ignores the host_index
451
+ in the spec for a single request.
452
+ :type _host_index: int, optional
453
+ :return: Returns the result object.
454
+ """ # noqa: E501
455
+
456
+ _param = self._get_capabilities_serialize(
457
+ analysis_id=analysis_id,
458
+ _request_auth=_request_auth,
459
+ _content_type=_content_type,
460
+ _headers=_headers,
461
+ _host_index=_host_index
462
+ )
463
+
464
+ _response_types_map: Dict[str, Optional[str]] = {
465
+ '200': "BaseResponseCapabilities",
466
+ '422': "BaseResponse",
467
+ }
468
+ response_data = self.api_client.call_api(
469
+ *_param,
470
+ _request_timeout=_request_timeout
471
+ )
472
+ response_data.read()
473
+ return self.api_client.response_deserialize(
474
+ response_data=response_data,
475
+ response_types_map=_response_types_map,
476
+ )
477
+
478
+
479
+ @validate_call
480
+ def get_capabilities_without_preload_content(
481
+ self,
482
+ analysis_id: StrictInt,
483
+ _request_timeout: Union[
484
+ None,
485
+ Annotated[StrictFloat, Field(gt=0)],
486
+ Tuple[
487
+ Annotated[StrictFloat, Field(gt=0)],
488
+ Annotated[StrictFloat, Field(gt=0)]
489
+ ]
490
+ ] = None,
491
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
492
+ _content_type: Optional[StrictStr] = None,
493
+ _headers: Optional[Dict[StrictStr, Any]] = None,
494
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
495
+ ) -> RESTResponseType:
496
+ """Gets the capabilities from the analysis
497
+
498
+
499
+ :param analysis_id: (required)
500
+ :type analysis_id: int
501
+ :param _request_timeout: timeout setting for this request. If one
502
+ number provided, it will be total request
503
+ timeout. It can also be a pair (tuple) of
504
+ (connection, read) timeouts.
505
+ :type _request_timeout: int, tuple(int, int), optional
506
+ :param _request_auth: set to override the auth_settings for an a single
507
+ request; this effectively ignores the
508
+ authentication in the spec for a single request.
509
+ :type _request_auth: dict, optional
510
+ :param _content_type: force content-type for the request.
511
+ :type _content_type: str, Optional
512
+ :param _headers: set to override the headers for a single
513
+ request; this effectively ignores the headers
514
+ in the spec for a single request.
515
+ :type _headers: dict, optional
516
+ :param _host_index: set to override the host_index for a single
517
+ request; this effectively ignores the host_index
518
+ in the spec for a single request.
519
+ :type _host_index: int, optional
520
+ :return: Returns the result object.
521
+ """ # noqa: E501
522
+
523
+ _param = self._get_capabilities_serialize(
524
+ analysis_id=analysis_id,
525
+ _request_auth=_request_auth,
526
+ _content_type=_content_type,
527
+ _headers=_headers,
528
+ _host_index=_host_index
529
+ )
530
+
531
+ _response_types_map: Dict[str, Optional[str]] = {
532
+ '200': "BaseResponseCapabilities",
533
+ '422': "BaseResponse",
534
+ }
535
+ response_data = self.api_client.call_api(
536
+ *_param,
537
+ _request_timeout=_request_timeout
538
+ )
539
+ return response_data.response
540
+
541
+
542
+ def _get_capabilities_serialize(
543
+ self,
544
+ analysis_id,
545
+ _request_auth,
546
+ _content_type,
547
+ _headers,
548
+ _host_index,
549
+ ) -> RequestSerialized:
550
+
551
+ _host = None
552
+
553
+ _collection_formats: Dict[str, str] = {
554
+ }
555
+
556
+ _path_params: Dict[str, str] = {}
557
+ _query_params: List[Tuple[str, str]] = []
558
+ _header_params: Dict[str, Optional[str]] = _headers or {}
559
+ _form_params: List[Tuple[str, str]] = []
560
+ _files: Dict[
561
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
562
+ ] = {}
563
+ _body_params: Optional[bytes] = None
564
+
565
+ # process the path parameters
566
+ if analysis_id is not None:
567
+ _path_params['analysis_id'] = analysis_id
568
+ # process the query parameters
569
+ # process the header parameters
570
+ # process the form parameters
571
+ # process the body parameter
572
+
573
+
574
+ # set the HTTP header `Accept`
575
+ if 'Accept' not in _header_params:
576
+ _header_params['Accept'] = self.api_client.select_header_accept(
577
+ [
578
+ 'application/json'
579
+ ]
580
+ )
581
+
582
+
583
+ # authentication setting
584
+ _auth_settings: List[str] = [
585
+ 'APIKey'
586
+ ]
587
+
588
+ return self.api_client.param_serialize(
589
+ method='GET',
590
+ resource_path='/v2/analyses/{analysis_id}/capabilities',
591
+ path_params=_path_params,
592
+ query_params=_query_params,
593
+ header_params=_header_params,
594
+ body=_body_params,
595
+ post_params=_form_params,
596
+ files=_files,
597
+ auth_settings=_auth_settings,
598
+ collection_formats=_collection_formats,
599
+ _host=_host,
600
+ _request_auth=_request_auth
601
+ )
602
+
603
+
604
+
605
+
606
+ @validate_call
607
+ def get_communities(
608
+ self,
609
+ analysis_id: StrictInt,
610
+ user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = None,
611
+ _request_timeout: Union[
612
+ None,
613
+ Annotated[StrictFloat, Field(gt=0)],
614
+ Tuple[
615
+ Annotated[StrictFloat, Field(gt=0)],
616
+ Annotated[StrictFloat, Field(gt=0)]
617
+ ]
618
+ ] = None,
619
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
620
+ _content_type: Optional[StrictStr] = None,
621
+ _headers: Optional[Dict[StrictStr, Any]] = None,
622
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
623
+ ) -> BaseResponseCommunities:
624
+ """Gets the communities found in the analysis
625
+
626
+
627
+ :param analysis_id: (required)
628
+ :type analysis_id: int
629
+ :param user_name: The user name to limit communities to
630
+ :type user_name: str
631
+ :param _request_timeout: timeout setting for this request. If one
632
+ number provided, it will be total request
633
+ timeout. It can also be a pair (tuple) of
634
+ (connection, read) timeouts.
635
+ :type _request_timeout: int, tuple(int, int), optional
636
+ :param _request_auth: set to override the auth_settings for an a single
637
+ request; this effectively ignores the
638
+ authentication in the spec for a single request.
639
+ :type _request_auth: dict, optional
640
+ :param _content_type: force content-type for the request.
641
+ :type _content_type: str, Optional
642
+ :param _headers: set to override the headers for a single
643
+ request; this effectively ignores the headers
644
+ in the spec for a single request.
645
+ :type _headers: dict, optional
646
+ :param _host_index: set to override the host_index for a single
647
+ request; this effectively ignores the host_index
648
+ in the spec for a single request.
649
+ :type _host_index: int, optional
650
+ :return: Returns the result object.
651
+ """ # noqa: E501
652
+
653
+ _param = self._get_communities_serialize(
654
+ analysis_id=analysis_id,
655
+ user_name=user_name,
656
+ _request_auth=_request_auth,
657
+ _content_type=_content_type,
658
+ _headers=_headers,
659
+ _host_index=_host_index
660
+ )
661
+
662
+ _response_types_map: Dict[str, Optional[str]] = {
663
+ '200': "BaseResponseCommunities",
664
+ '422': "BaseResponse",
665
+ }
666
+ response_data = self.api_client.call_api(
667
+ *_param,
668
+ _request_timeout=_request_timeout
669
+ )
670
+ response_data.read()
671
+ return self.api_client.response_deserialize(
672
+ response_data=response_data,
673
+ response_types_map=_response_types_map,
674
+ ).data
675
+
676
+
677
+ @validate_call
678
+ def get_communities_with_http_info(
679
+ self,
680
+ analysis_id: StrictInt,
681
+ user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = None,
682
+ _request_timeout: Union[
683
+ None,
684
+ Annotated[StrictFloat, Field(gt=0)],
685
+ Tuple[
686
+ Annotated[StrictFloat, Field(gt=0)],
687
+ Annotated[StrictFloat, Field(gt=0)]
688
+ ]
689
+ ] = None,
690
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
691
+ _content_type: Optional[StrictStr] = None,
692
+ _headers: Optional[Dict[StrictStr, Any]] = None,
693
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
694
+ ) -> ApiResponse[BaseResponseCommunities]:
695
+ """Gets the communities found in the analysis
696
+
697
+
698
+ :param analysis_id: (required)
699
+ :type analysis_id: int
700
+ :param user_name: The user name to limit communities to
701
+ :type user_name: str
702
+ :param _request_timeout: timeout setting for this request. If one
703
+ number provided, it will be total request
704
+ timeout. It can also be a pair (tuple) of
705
+ (connection, read) timeouts.
706
+ :type _request_timeout: int, tuple(int, int), optional
707
+ :param _request_auth: set to override the auth_settings for an a single
708
+ request; this effectively ignores the
709
+ authentication in the spec for a single request.
710
+ :type _request_auth: dict, optional
711
+ :param _content_type: force content-type for the request.
712
+ :type _content_type: str, Optional
713
+ :param _headers: set to override the headers for a single
714
+ request; this effectively ignores the headers
715
+ in the spec for a single request.
716
+ :type _headers: dict, optional
717
+ :param _host_index: set to override the host_index for a single
718
+ request; this effectively ignores the host_index
719
+ in the spec for a single request.
720
+ :type _host_index: int, optional
721
+ :return: Returns the result object.
722
+ """ # noqa: E501
723
+
724
+ _param = self._get_communities_serialize(
725
+ analysis_id=analysis_id,
726
+ user_name=user_name,
727
+ _request_auth=_request_auth,
728
+ _content_type=_content_type,
729
+ _headers=_headers,
730
+ _host_index=_host_index
731
+ )
732
+
733
+ _response_types_map: Dict[str, Optional[str]] = {
734
+ '200': "BaseResponseCommunities",
735
+ '422': "BaseResponse",
736
+ }
737
+ response_data = self.api_client.call_api(
738
+ *_param,
739
+ _request_timeout=_request_timeout
740
+ )
741
+ response_data.read()
742
+ return self.api_client.response_deserialize(
743
+ response_data=response_data,
744
+ response_types_map=_response_types_map,
745
+ )
746
+
747
+
748
+ @validate_call
749
+ def get_communities_without_preload_content(
750
+ self,
751
+ analysis_id: StrictInt,
752
+ user_name: Annotated[Optional[StrictStr], Field(description="The user name to limit communities to")] = None,
753
+ _request_timeout: Union[
754
+ None,
755
+ Annotated[StrictFloat, Field(gt=0)],
756
+ Tuple[
757
+ Annotated[StrictFloat, Field(gt=0)],
758
+ Annotated[StrictFloat, Field(gt=0)]
759
+ ]
760
+ ] = None,
761
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
762
+ _content_type: Optional[StrictStr] = None,
763
+ _headers: Optional[Dict[StrictStr, Any]] = None,
764
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
765
+ ) -> RESTResponseType:
766
+ """Gets the communities found in the analysis
767
+
768
+
769
+ :param analysis_id: (required)
770
+ :type analysis_id: int
771
+ :param user_name: The user name to limit communities to
772
+ :type user_name: str
773
+ :param _request_timeout: timeout setting for this request. If one
774
+ number provided, it will be total request
775
+ timeout. It can also be a pair (tuple) of
776
+ (connection, read) timeouts.
777
+ :type _request_timeout: int, tuple(int, int), optional
778
+ :param _request_auth: set to override the auth_settings for an a single
779
+ request; this effectively ignores the
780
+ authentication in the spec for a single request.
781
+ :type _request_auth: dict, optional
782
+ :param _content_type: force content-type for the request.
783
+ :type _content_type: str, Optional
784
+ :param _headers: set to override the headers for a single
785
+ request; this effectively ignores the headers
786
+ in the spec for a single request.
787
+ :type _headers: dict, optional
788
+ :param _host_index: set to override the host_index for a single
789
+ request; this effectively ignores the host_index
790
+ in the spec for a single request.
791
+ :type _host_index: int, optional
792
+ :return: Returns the result object.
793
+ """ # noqa: E501
794
+
795
+ _param = self._get_communities_serialize(
796
+ analysis_id=analysis_id,
797
+ user_name=user_name,
798
+ _request_auth=_request_auth,
799
+ _content_type=_content_type,
800
+ _headers=_headers,
801
+ _host_index=_host_index
802
+ )
803
+
804
+ _response_types_map: Dict[str, Optional[str]] = {
805
+ '200': "BaseResponseCommunities",
806
+ '422': "BaseResponse",
807
+ }
808
+ response_data = self.api_client.call_api(
809
+ *_param,
810
+ _request_timeout=_request_timeout
811
+ )
812
+ return response_data.response
813
+
814
+
815
+ def _get_communities_serialize(
816
+ self,
817
+ analysis_id,
818
+ user_name,
819
+ _request_auth,
820
+ _content_type,
821
+ _headers,
822
+ _host_index,
823
+ ) -> RequestSerialized:
824
+
825
+ _host = None
826
+
827
+ _collection_formats: Dict[str, str] = {
828
+ }
829
+
830
+ _path_params: Dict[str, str] = {}
831
+ _query_params: List[Tuple[str, str]] = []
832
+ _header_params: Dict[str, Optional[str]] = _headers or {}
833
+ _form_params: List[Tuple[str, str]] = []
834
+ _files: Dict[
835
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
836
+ ] = {}
837
+ _body_params: Optional[bytes] = None
838
+
839
+ # process the path parameters
840
+ if analysis_id is not None:
841
+ _path_params['analysis_id'] = analysis_id
842
+ # process the query parameters
843
+ if user_name is not None:
844
+
845
+ _query_params.append(('user_name', user_name))
846
+
847
+ # process the header parameters
848
+ # process the form parameters
849
+ # process the body parameter
850
+
851
+
852
+ # set the HTTP header `Accept`
853
+ if 'Accept' not in _header_params:
854
+ _header_params['Accept'] = self.api_client.select_header_accept(
855
+ [
856
+ 'application/json'
857
+ ]
858
+ )
859
+
860
+
861
+ # authentication setting
862
+ _auth_settings: List[str] = [
863
+ 'APIKey'
864
+ ]
865
+
866
+ return self.api_client.param_serialize(
867
+ method='GET',
868
+ resource_path='/v2/analyses/{analysis_id}/communities',
869
+ path_params=_path_params,
870
+ query_params=_query_params,
871
+ header_params=_header_params,
872
+ body=_body_params,
873
+ post_params=_form_params,
874
+ files=_files,
875
+ auth_settings=_auth_settings,
876
+ collection_formats=_collection_formats,
877
+ _host=_host,
878
+ _request_auth=_request_auth
879
+ )
880
+
881
+
882
+
883
+
884
+ @validate_call
885
+ def get_functions_list(
886
+ self,
887
+ analysis_id: StrictInt,
888
+ search_term: Optional[StrictStr] = None,
889
+ min_v_addr: Optional[StrictInt] = None,
890
+ max_v_addr: Optional[StrictInt] = None,
891
+ _request_timeout: Union[
892
+ None,
893
+ Annotated[StrictFloat, Field(gt=0)],
894
+ Tuple[
895
+ Annotated[StrictFloat, Field(gt=0)],
896
+ Annotated[StrictFloat, Field(gt=0)]
897
+ ]
898
+ ] = None,
899
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
900
+ _content_type: Optional[StrictStr] = None,
901
+ _headers: Optional[Dict[StrictStr, Any]] = None,
902
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
903
+ ) -> BaseResponseAnalysisFunctions:
904
+ """Gets functions from analysis
905
+
906
+ Gets the functions identified during analysis
907
+
908
+ :param analysis_id: (required)
909
+ :type analysis_id: int
910
+ :param search_term:
911
+ :type search_term: str
912
+ :param min_v_addr:
913
+ :type min_v_addr: int
914
+ :param max_v_addr:
915
+ :type max_v_addr: int
916
+ :param _request_timeout: timeout setting for this request. If one
917
+ number provided, it will be total request
918
+ timeout. It can also be a pair (tuple) of
919
+ (connection, read) timeouts.
920
+ :type _request_timeout: int, tuple(int, int), optional
921
+ :param _request_auth: set to override the auth_settings for an a single
922
+ request; this effectively ignores the
923
+ authentication in the spec for a single request.
924
+ :type _request_auth: dict, optional
925
+ :param _content_type: force content-type for the request.
926
+ :type _content_type: str, Optional
927
+ :param _headers: set to override the headers for a single
928
+ request; this effectively ignores the headers
929
+ in the spec for a single request.
930
+ :type _headers: dict, optional
931
+ :param _host_index: set to override the host_index for a single
932
+ request; this effectively ignores the host_index
933
+ in the spec for a single request.
934
+ :type _host_index: int, optional
935
+ :return: Returns the result object.
936
+ """ # noqa: E501
937
+
938
+ _param = self._get_functions_list_serialize(
939
+ analysis_id=analysis_id,
940
+ search_term=search_term,
941
+ min_v_addr=min_v_addr,
942
+ max_v_addr=max_v_addr,
943
+ _request_auth=_request_auth,
944
+ _content_type=_content_type,
945
+ _headers=_headers,
946
+ _host_index=_host_index
947
+ )
948
+
949
+ _response_types_map: Dict[str, Optional[str]] = {
950
+ '200': "BaseResponseAnalysisFunctions",
951
+ '422': "BaseResponse",
952
+ }
953
+ response_data = self.api_client.call_api(
954
+ *_param,
955
+ _request_timeout=_request_timeout
956
+ )
957
+ response_data.read()
958
+ return self.api_client.response_deserialize(
959
+ response_data=response_data,
960
+ response_types_map=_response_types_map,
961
+ ).data
962
+
963
+
964
+ @validate_call
965
+ def get_functions_list_with_http_info(
966
+ self,
967
+ analysis_id: StrictInt,
968
+ search_term: Optional[StrictStr] = None,
969
+ min_v_addr: Optional[StrictInt] = None,
970
+ max_v_addr: Optional[StrictInt] = None,
971
+ _request_timeout: Union[
972
+ None,
973
+ Annotated[StrictFloat, Field(gt=0)],
974
+ Tuple[
975
+ Annotated[StrictFloat, Field(gt=0)],
976
+ Annotated[StrictFloat, Field(gt=0)]
977
+ ]
978
+ ] = None,
979
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
980
+ _content_type: Optional[StrictStr] = None,
981
+ _headers: Optional[Dict[StrictStr, Any]] = None,
982
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
983
+ ) -> ApiResponse[BaseResponseAnalysisFunctions]:
984
+ """Gets functions from analysis
985
+
986
+ Gets the functions identified during analysis
987
+
988
+ :param analysis_id: (required)
989
+ :type analysis_id: int
990
+ :param search_term:
991
+ :type search_term: str
992
+ :param min_v_addr:
993
+ :type min_v_addr: int
994
+ :param max_v_addr:
995
+ :type max_v_addr: int
996
+ :param _request_timeout: timeout setting for this request. If one
997
+ number provided, it will be total request
998
+ timeout. It can also be a pair (tuple) of
999
+ (connection, read) timeouts.
1000
+ :type _request_timeout: int, tuple(int, int), optional
1001
+ :param _request_auth: set to override the auth_settings for an a single
1002
+ request; this effectively ignores the
1003
+ authentication in the spec for a single request.
1004
+ :type _request_auth: dict, optional
1005
+ :param _content_type: force content-type for the request.
1006
+ :type _content_type: str, Optional
1007
+ :param _headers: set to override the headers for a single
1008
+ request; this effectively ignores the headers
1009
+ in the spec for a single request.
1010
+ :type _headers: dict, optional
1011
+ :param _host_index: set to override the host_index for a single
1012
+ request; this effectively ignores the host_index
1013
+ in the spec for a single request.
1014
+ :type _host_index: int, optional
1015
+ :return: Returns the result object.
1016
+ """ # noqa: E501
1017
+
1018
+ _param = self._get_functions_list_serialize(
1019
+ analysis_id=analysis_id,
1020
+ search_term=search_term,
1021
+ min_v_addr=min_v_addr,
1022
+ max_v_addr=max_v_addr,
1023
+ _request_auth=_request_auth,
1024
+ _content_type=_content_type,
1025
+ _headers=_headers,
1026
+ _host_index=_host_index
1027
+ )
1028
+
1029
+ _response_types_map: Dict[str, Optional[str]] = {
1030
+ '200': "BaseResponseAnalysisFunctions",
1031
+ '422': "BaseResponse",
1032
+ }
1033
+ response_data = self.api_client.call_api(
1034
+ *_param,
1035
+ _request_timeout=_request_timeout
1036
+ )
1037
+ response_data.read()
1038
+ return self.api_client.response_deserialize(
1039
+ response_data=response_data,
1040
+ response_types_map=_response_types_map,
1041
+ )
1042
+
1043
+
1044
+ @validate_call
1045
+ def get_functions_list_without_preload_content(
1046
+ self,
1047
+ analysis_id: StrictInt,
1048
+ search_term: Optional[StrictStr] = None,
1049
+ min_v_addr: Optional[StrictInt] = None,
1050
+ max_v_addr: Optional[StrictInt] = None,
1051
+ _request_timeout: Union[
1052
+ None,
1053
+ Annotated[StrictFloat, Field(gt=0)],
1054
+ Tuple[
1055
+ Annotated[StrictFloat, Field(gt=0)],
1056
+ Annotated[StrictFloat, Field(gt=0)]
1057
+ ]
1058
+ ] = None,
1059
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1060
+ _content_type: Optional[StrictStr] = None,
1061
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1062
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1063
+ ) -> RESTResponseType:
1064
+ """Gets functions from analysis
1065
+
1066
+ Gets the functions identified during analysis
1067
+
1068
+ :param analysis_id: (required)
1069
+ :type analysis_id: int
1070
+ :param search_term:
1071
+ :type search_term: str
1072
+ :param min_v_addr:
1073
+ :type min_v_addr: int
1074
+ :param max_v_addr:
1075
+ :type max_v_addr: int
1076
+ :param _request_timeout: timeout setting for this request. If one
1077
+ number provided, it will be total request
1078
+ timeout. It can also be a pair (tuple) of
1079
+ (connection, read) timeouts.
1080
+ :type _request_timeout: int, tuple(int, int), optional
1081
+ :param _request_auth: set to override the auth_settings for an a single
1082
+ request; this effectively ignores the
1083
+ authentication in the spec for a single request.
1084
+ :type _request_auth: dict, optional
1085
+ :param _content_type: force content-type for the request.
1086
+ :type _content_type: str, Optional
1087
+ :param _headers: set to override the headers for a single
1088
+ request; this effectively ignores the headers
1089
+ in the spec for a single request.
1090
+ :type _headers: dict, optional
1091
+ :param _host_index: set to override the host_index for a single
1092
+ request; this effectively ignores the host_index
1093
+ in the spec for a single request.
1094
+ :type _host_index: int, optional
1095
+ :return: Returns the result object.
1096
+ """ # noqa: E501
1097
+
1098
+ _param = self._get_functions_list_serialize(
1099
+ analysis_id=analysis_id,
1100
+ search_term=search_term,
1101
+ min_v_addr=min_v_addr,
1102
+ max_v_addr=max_v_addr,
1103
+ _request_auth=_request_auth,
1104
+ _content_type=_content_type,
1105
+ _headers=_headers,
1106
+ _host_index=_host_index
1107
+ )
1108
+
1109
+ _response_types_map: Dict[str, Optional[str]] = {
1110
+ '200': "BaseResponseAnalysisFunctions",
1111
+ '422': "BaseResponse",
1112
+ }
1113
+ response_data = self.api_client.call_api(
1114
+ *_param,
1115
+ _request_timeout=_request_timeout
1116
+ )
1117
+ return response_data.response
1118
+
1119
+
1120
+ def _get_functions_list_serialize(
1121
+ self,
1122
+ analysis_id,
1123
+ search_term,
1124
+ min_v_addr,
1125
+ max_v_addr,
1126
+ _request_auth,
1127
+ _content_type,
1128
+ _headers,
1129
+ _host_index,
1130
+ ) -> RequestSerialized:
1131
+
1132
+ _host = None
1133
+
1134
+ _collection_formats: Dict[str, str] = {
1135
+ }
1136
+
1137
+ _path_params: Dict[str, str] = {}
1138
+ _query_params: List[Tuple[str, str]] = []
1139
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1140
+ _form_params: List[Tuple[str, str]] = []
1141
+ _files: Dict[
1142
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1143
+ ] = {}
1144
+ _body_params: Optional[bytes] = None
1145
+
1146
+ # process the path parameters
1147
+ if analysis_id is not None:
1148
+ _path_params['analysis_id'] = analysis_id
1149
+ # process the query parameters
1150
+ if search_term is not None:
1151
+
1152
+ _query_params.append(('search_term', search_term))
1153
+
1154
+ if min_v_addr is not None:
1155
+
1156
+ _query_params.append(('min_v_addr', min_v_addr))
1157
+
1158
+ if max_v_addr is not None:
1159
+
1160
+ _query_params.append(('max_v_addr', max_v_addr))
1161
+
1162
+ # process the header parameters
1163
+ # process the form parameters
1164
+ # process the body parameter
1165
+
1166
+
1167
+ # set the HTTP header `Accept`
1168
+ if 'Accept' not in _header_params:
1169
+ _header_params['Accept'] = self.api_client.select_header_accept(
1170
+ [
1171
+ 'application/json'
1172
+ ]
1173
+ )
1174
+
1175
+
1176
+ # authentication setting
1177
+ _auth_settings: List[str] = [
1178
+ 'APIKey'
1179
+ ]
1180
+
1181
+ return self.api_client.param_serialize(
1182
+ method='GET',
1183
+ resource_path='/v2/analyses/{analysis_id}/functions/list',
1184
+ path_params=_path_params,
1185
+ query_params=_query_params,
1186
+ header_params=_header_params,
1187
+ body=_body_params,
1188
+ post_params=_form_params,
1189
+ files=_files,
1190
+ auth_settings=_auth_settings,
1191
+ collection_formats=_collection_formats,
1192
+ _host=_host,
1193
+ _request_auth=_request_auth
1194
+ )
1195
+
1196
+
1197
+
1198
+
1199
+ @validate_call
1200
+ def get_pdf(
1201
+ self,
1202
+ analysis_id: StrictInt,
1203
+ _request_timeout: Union[
1204
+ None,
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Tuple[
1207
+ Annotated[StrictFloat, Field(gt=0)],
1208
+ Annotated[StrictFloat, Field(gt=0)]
1209
+ ]
1210
+ ] = None,
1211
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1212
+ _content_type: Optional[StrictStr] = None,
1213
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1214
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1215
+ ) -> object:
1216
+ """Gets the PDF found in the analysis
1217
+
1218
+
1219
+ :param analysis_id: (required)
1220
+ :type analysis_id: int
1221
+ :param _request_timeout: timeout setting for this request. If one
1222
+ number provided, it will be total request
1223
+ timeout. It can also be a pair (tuple) of
1224
+ (connection, read) timeouts.
1225
+ :type _request_timeout: int, tuple(int, int), optional
1226
+ :param _request_auth: set to override the auth_settings for an a single
1227
+ request; this effectively ignores the
1228
+ authentication in the spec for a single request.
1229
+ :type _request_auth: dict, optional
1230
+ :param _content_type: force content-type for the request.
1231
+ :type _content_type: str, Optional
1232
+ :param _headers: set to override the headers for a single
1233
+ request; this effectively ignores the headers
1234
+ in the spec for a single request.
1235
+ :type _headers: dict, optional
1236
+ :param _host_index: set to override the host_index for a single
1237
+ request; this effectively ignores the host_index
1238
+ in the spec for a single request.
1239
+ :type _host_index: int, optional
1240
+ :return: Returns the result object.
1241
+ """ # noqa: E501
1242
+
1243
+ _param = self._get_pdf_serialize(
1244
+ analysis_id=analysis_id,
1245
+ _request_auth=_request_auth,
1246
+ _content_type=_content_type,
1247
+ _headers=_headers,
1248
+ _host_index=_host_index
1249
+ )
1250
+
1251
+ _response_types_map: Dict[str, Optional[str]] = {
1252
+ '200': "object",
1253
+ '422': "BaseResponse",
1254
+ }
1255
+ response_data = self.api_client.call_api(
1256
+ *_param,
1257
+ _request_timeout=_request_timeout
1258
+ )
1259
+ response_data.read()
1260
+ return self.api_client.response_deserialize(
1261
+ response_data=response_data,
1262
+ response_types_map=_response_types_map,
1263
+ ).data
1264
+
1265
+
1266
+ @validate_call
1267
+ def get_pdf_with_http_info(
1268
+ self,
1269
+ analysis_id: StrictInt,
1270
+ _request_timeout: Union[
1271
+ None,
1272
+ Annotated[StrictFloat, Field(gt=0)],
1273
+ Tuple[
1274
+ Annotated[StrictFloat, Field(gt=0)],
1275
+ Annotated[StrictFloat, Field(gt=0)]
1276
+ ]
1277
+ ] = None,
1278
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1279
+ _content_type: Optional[StrictStr] = None,
1280
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1281
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1282
+ ) -> ApiResponse[object]:
1283
+ """Gets the PDF found in the analysis
1284
+
1285
+
1286
+ :param analysis_id: (required)
1287
+ :type analysis_id: int
1288
+ :param _request_timeout: timeout setting for this request. If one
1289
+ number provided, it will be total request
1290
+ timeout. It can also be a pair (tuple) of
1291
+ (connection, read) timeouts.
1292
+ :type _request_timeout: int, tuple(int, int), optional
1293
+ :param _request_auth: set to override the auth_settings for an a single
1294
+ request; this effectively ignores the
1295
+ authentication in the spec for a single request.
1296
+ :type _request_auth: dict, optional
1297
+ :param _content_type: force content-type for the request.
1298
+ :type _content_type: str, Optional
1299
+ :param _headers: set to override the headers for a single
1300
+ request; this effectively ignores the headers
1301
+ in the spec for a single request.
1302
+ :type _headers: dict, optional
1303
+ :param _host_index: set to override the host_index for a single
1304
+ request; this effectively ignores the host_index
1305
+ in the spec for a single request.
1306
+ :type _host_index: int, optional
1307
+ :return: Returns the result object.
1308
+ """ # noqa: E501
1309
+
1310
+ _param = self._get_pdf_serialize(
1311
+ analysis_id=analysis_id,
1312
+ _request_auth=_request_auth,
1313
+ _content_type=_content_type,
1314
+ _headers=_headers,
1315
+ _host_index=_host_index
1316
+ )
1317
+
1318
+ _response_types_map: Dict[str, Optional[str]] = {
1319
+ '200': "object",
1320
+ '422': "BaseResponse",
1321
+ }
1322
+ response_data = self.api_client.call_api(
1323
+ *_param,
1324
+ _request_timeout=_request_timeout
1325
+ )
1326
+ response_data.read()
1327
+ return self.api_client.response_deserialize(
1328
+ response_data=response_data,
1329
+ response_types_map=_response_types_map,
1330
+ )
1331
+
1332
+
1333
+ @validate_call
1334
+ def get_pdf_without_preload_content(
1335
+ self,
1336
+ analysis_id: StrictInt,
1337
+ _request_timeout: Union[
1338
+ None,
1339
+ Annotated[StrictFloat, Field(gt=0)],
1340
+ Tuple[
1341
+ Annotated[StrictFloat, Field(gt=0)],
1342
+ Annotated[StrictFloat, Field(gt=0)]
1343
+ ]
1344
+ ] = None,
1345
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1346
+ _content_type: Optional[StrictStr] = None,
1347
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1348
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1349
+ ) -> RESTResponseType:
1350
+ """Gets the PDF found in the analysis
1351
+
1352
+
1353
+ :param analysis_id: (required)
1354
+ :type analysis_id: int
1355
+ :param _request_timeout: timeout setting for this request. If one
1356
+ number provided, it will be total request
1357
+ timeout. It can also be a pair (tuple) of
1358
+ (connection, read) timeouts.
1359
+ :type _request_timeout: int, tuple(int, int), optional
1360
+ :param _request_auth: set to override the auth_settings for an a single
1361
+ request; this effectively ignores the
1362
+ authentication in the spec for a single request.
1363
+ :type _request_auth: dict, optional
1364
+ :param _content_type: force content-type for the request.
1365
+ :type _content_type: str, Optional
1366
+ :param _headers: set to override the headers for a single
1367
+ request; this effectively ignores the headers
1368
+ in the spec for a single request.
1369
+ :type _headers: dict, optional
1370
+ :param _host_index: set to override the host_index for a single
1371
+ request; this effectively ignores the host_index
1372
+ in the spec for a single request.
1373
+ :type _host_index: int, optional
1374
+ :return: Returns the result object.
1375
+ """ # noqa: E501
1376
+
1377
+ _param = self._get_pdf_serialize(
1378
+ analysis_id=analysis_id,
1379
+ _request_auth=_request_auth,
1380
+ _content_type=_content_type,
1381
+ _headers=_headers,
1382
+ _host_index=_host_index
1383
+ )
1384
+
1385
+ _response_types_map: Dict[str, Optional[str]] = {
1386
+ '200': "object",
1387
+ '422': "BaseResponse",
1388
+ }
1389
+ response_data = self.api_client.call_api(
1390
+ *_param,
1391
+ _request_timeout=_request_timeout
1392
+ )
1393
+ return response_data.response
1394
+
1395
+
1396
+ def _get_pdf_serialize(
1397
+ self,
1398
+ analysis_id,
1399
+ _request_auth,
1400
+ _content_type,
1401
+ _headers,
1402
+ _host_index,
1403
+ ) -> RequestSerialized:
1404
+
1405
+ _host = None
1406
+
1407
+ _collection_formats: Dict[str, str] = {
1408
+ }
1409
+
1410
+ _path_params: Dict[str, str] = {}
1411
+ _query_params: List[Tuple[str, str]] = []
1412
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1413
+ _form_params: List[Tuple[str, str]] = []
1414
+ _files: Dict[
1415
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1416
+ ] = {}
1417
+ _body_params: Optional[bytes] = None
1418
+
1419
+ # process the path parameters
1420
+ if analysis_id is not None:
1421
+ _path_params['analysis_id'] = analysis_id
1422
+ # process the query parameters
1423
+ # process the header parameters
1424
+ # process the form parameters
1425
+ # process the body parameter
1426
+
1427
+
1428
+ # set the HTTP header `Accept`
1429
+ if 'Accept' not in _header_params:
1430
+ _header_params['Accept'] = self.api_client.select_header_accept(
1431
+ [
1432
+ 'application/json'
1433
+ ]
1434
+ )
1435
+
1436
+
1437
+ # authentication setting
1438
+ _auth_settings: List[str] = [
1439
+ 'APIKey'
1440
+ ]
1441
+
1442
+ return self.api_client.param_serialize(
1443
+ method='GET',
1444
+ resource_path='/v2/analyses/{analysis_id}/pdf',
1445
+ path_params=_path_params,
1446
+ query_params=_query_params,
1447
+ header_params=_header_params,
1448
+ body=_body_params,
1449
+ post_params=_form_params,
1450
+ files=_files,
1451
+ auth_settings=_auth_settings,
1452
+ collection_formats=_collection_formats,
1453
+ _host=_host,
1454
+ _request_auth=_request_auth
1455
+ )
1456
+
1457
+
1458
+
1459
+
1460
+ @validate_call
1461
+ def get_sbom(
1462
+ self,
1463
+ analysis_id: StrictInt,
1464
+ _request_timeout: Union[
1465
+ None,
1466
+ Annotated[StrictFloat, Field(gt=0)],
1467
+ Tuple[
1468
+ Annotated[StrictFloat, Field(gt=0)],
1469
+ Annotated[StrictFloat, Field(gt=0)]
1470
+ ]
1471
+ ] = None,
1472
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1473
+ _content_type: Optional[StrictStr] = None,
1474
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1475
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1476
+ ) -> BaseResponseListSBOM:
1477
+ """Gets the software-bill-of-materials (SBOM) found in the analysis
1478
+
1479
+
1480
+ :param analysis_id: (required)
1481
+ :type analysis_id: int
1482
+ :param _request_timeout: timeout setting for this request. If one
1483
+ number provided, it will be total request
1484
+ timeout. It can also be a pair (tuple) of
1485
+ (connection, read) timeouts.
1486
+ :type _request_timeout: int, tuple(int, int), optional
1487
+ :param _request_auth: set to override the auth_settings for an a single
1488
+ request; this effectively ignores the
1489
+ authentication in the spec for a single request.
1490
+ :type _request_auth: dict, optional
1491
+ :param _content_type: force content-type for the request.
1492
+ :type _content_type: str, Optional
1493
+ :param _headers: set to override the headers for a single
1494
+ request; this effectively ignores the headers
1495
+ in the spec for a single request.
1496
+ :type _headers: dict, optional
1497
+ :param _host_index: set to override the host_index for a single
1498
+ request; this effectively ignores the host_index
1499
+ in the spec for a single request.
1500
+ :type _host_index: int, optional
1501
+ :return: Returns the result object.
1502
+ """ # noqa: E501
1503
+
1504
+ _param = self._get_sbom_serialize(
1505
+ analysis_id=analysis_id,
1506
+ _request_auth=_request_auth,
1507
+ _content_type=_content_type,
1508
+ _headers=_headers,
1509
+ _host_index=_host_index
1510
+ )
1511
+
1512
+ _response_types_map: Dict[str, Optional[str]] = {
1513
+ '200': "BaseResponseListSBOM",
1514
+ '422': "BaseResponse",
1515
+ }
1516
+ response_data = self.api_client.call_api(
1517
+ *_param,
1518
+ _request_timeout=_request_timeout
1519
+ )
1520
+ response_data.read()
1521
+ return self.api_client.response_deserialize(
1522
+ response_data=response_data,
1523
+ response_types_map=_response_types_map,
1524
+ ).data
1525
+
1526
+
1527
+ @validate_call
1528
+ def get_sbom_with_http_info(
1529
+ self,
1530
+ analysis_id: StrictInt,
1531
+ _request_timeout: Union[
1532
+ None,
1533
+ Annotated[StrictFloat, Field(gt=0)],
1534
+ Tuple[
1535
+ Annotated[StrictFloat, Field(gt=0)],
1536
+ Annotated[StrictFloat, Field(gt=0)]
1537
+ ]
1538
+ ] = None,
1539
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1540
+ _content_type: Optional[StrictStr] = None,
1541
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1542
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1543
+ ) -> ApiResponse[BaseResponseListSBOM]:
1544
+ """Gets the software-bill-of-materials (SBOM) found in the analysis
1545
+
1546
+
1547
+ :param analysis_id: (required)
1548
+ :type analysis_id: int
1549
+ :param _request_timeout: timeout setting for this request. If one
1550
+ number provided, it will be total request
1551
+ timeout. It can also be a pair (tuple) of
1552
+ (connection, read) timeouts.
1553
+ :type _request_timeout: int, tuple(int, int), optional
1554
+ :param _request_auth: set to override the auth_settings for an a single
1555
+ request; this effectively ignores the
1556
+ authentication in the spec for a single request.
1557
+ :type _request_auth: dict, optional
1558
+ :param _content_type: force content-type for the request.
1559
+ :type _content_type: str, Optional
1560
+ :param _headers: set to override the headers for a single
1561
+ request; this effectively ignores the headers
1562
+ in the spec for a single request.
1563
+ :type _headers: dict, optional
1564
+ :param _host_index: set to override the host_index for a single
1565
+ request; this effectively ignores the host_index
1566
+ in the spec for a single request.
1567
+ :type _host_index: int, optional
1568
+ :return: Returns the result object.
1569
+ """ # noqa: E501
1570
+
1571
+ _param = self._get_sbom_serialize(
1572
+ analysis_id=analysis_id,
1573
+ _request_auth=_request_auth,
1574
+ _content_type=_content_type,
1575
+ _headers=_headers,
1576
+ _host_index=_host_index
1577
+ )
1578
+
1579
+ _response_types_map: Dict[str, Optional[str]] = {
1580
+ '200': "BaseResponseListSBOM",
1581
+ '422': "BaseResponse",
1582
+ }
1583
+ response_data = self.api_client.call_api(
1584
+ *_param,
1585
+ _request_timeout=_request_timeout
1586
+ )
1587
+ response_data.read()
1588
+ return self.api_client.response_deserialize(
1589
+ response_data=response_data,
1590
+ response_types_map=_response_types_map,
1591
+ )
1592
+
1593
+
1594
+ @validate_call
1595
+ def get_sbom_without_preload_content(
1596
+ self,
1597
+ analysis_id: StrictInt,
1598
+ _request_timeout: Union[
1599
+ None,
1600
+ Annotated[StrictFloat, Field(gt=0)],
1601
+ Tuple[
1602
+ Annotated[StrictFloat, Field(gt=0)],
1603
+ Annotated[StrictFloat, Field(gt=0)]
1604
+ ]
1605
+ ] = None,
1606
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1607
+ _content_type: Optional[StrictStr] = None,
1608
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1609
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1610
+ ) -> RESTResponseType:
1611
+ """Gets the software-bill-of-materials (SBOM) found in the analysis
1612
+
1613
+
1614
+ :param analysis_id: (required)
1615
+ :type analysis_id: int
1616
+ :param _request_timeout: timeout setting for this request. If one
1617
+ number provided, it will be total request
1618
+ timeout. It can also be a pair (tuple) of
1619
+ (connection, read) timeouts.
1620
+ :type _request_timeout: int, tuple(int, int), optional
1621
+ :param _request_auth: set to override the auth_settings for an a single
1622
+ request; this effectively ignores the
1623
+ authentication in the spec for a single request.
1624
+ :type _request_auth: dict, optional
1625
+ :param _content_type: force content-type for the request.
1626
+ :type _content_type: str, Optional
1627
+ :param _headers: set to override the headers for a single
1628
+ request; this effectively ignores the headers
1629
+ in the spec for a single request.
1630
+ :type _headers: dict, optional
1631
+ :param _host_index: set to override the host_index for a single
1632
+ request; this effectively ignores the host_index
1633
+ in the spec for a single request.
1634
+ :type _host_index: int, optional
1635
+ :return: Returns the result object.
1636
+ """ # noqa: E501
1637
+
1638
+ _param = self._get_sbom_serialize(
1639
+ analysis_id=analysis_id,
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': "BaseResponseListSBOM",
1648
+ '422': "BaseResponse",
1649
+ }
1650
+ response_data = self.api_client.call_api(
1651
+ *_param,
1652
+ _request_timeout=_request_timeout
1653
+ )
1654
+ return response_data.response
1655
+
1656
+
1657
+ def _get_sbom_serialize(
1658
+ self,
1659
+ analysis_id,
1660
+ _request_auth,
1661
+ _content_type,
1662
+ _headers,
1663
+ _host_index,
1664
+ ) -> RequestSerialized:
1665
+
1666
+ _host = None
1667
+
1668
+ _collection_formats: Dict[str, str] = {
1669
+ }
1670
+
1671
+ _path_params: Dict[str, str] = {}
1672
+ _query_params: List[Tuple[str, str]] = []
1673
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1674
+ _form_params: List[Tuple[str, str]] = []
1675
+ _files: Dict[
1676
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1677
+ ] = {}
1678
+ _body_params: Optional[bytes] = None
1679
+
1680
+ # process the path parameters
1681
+ if analysis_id is not None:
1682
+ _path_params['analysis_id'] = analysis_id
1683
+ # process the query parameters
1684
+ # process the header parameters
1685
+ # process the form parameters
1686
+ # process the body parameter
1687
+
1688
+
1689
+ # set the HTTP header `Accept`
1690
+ if 'Accept' not in _header_params:
1691
+ _header_params['Accept'] = self.api_client.select_header_accept(
1692
+ [
1693
+ 'application/json'
1694
+ ]
1695
+ )
1696
+
1697
+
1698
+ # authentication setting
1699
+ _auth_settings: List[str] = [
1700
+ 'APIKey'
1701
+ ]
1702
+
1703
+ return self.api_client.param_serialize(
1704
+ method='GET',
1705
+ resource_path='/v2/analyses/{analysis_id}/sbom',
1706
+ path_params=_path_params,
1707
+ query_params=_query_params,
1708
+ header_params=_header_params,
1709
+ body=_body_params,
1710
+ post_params=_form_params,
1711
+ files=_files,
1712
+ auth_settings=_auth_settings,
1713
+ collection_formats=_collection_formats,
1714
+ _host=_host,
1715
+ _request_auth=_request_auth
1716
+ )
1717
+
1718
+
1719
+
1720
+
1721
+ @validate_call
1722
+ def get_tags(
1723
+ self,
1724
+ analysis_id: StrictInt,
1725
+ _request_timeout: Union[
1726
+ None,
1727
+ Annotated[StrictFloat, Field(gt=0)],
1728
+ Tuple[
1729
+ Annotated[StrictFloat, Field(gt=0)],
1730
+ Annotated[StrictFloat, Field(gt=0)]
1731
+ ]
1732
+ ] = None,
1733
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1734
+ _content_type: Optional[StrictStr] = None,
1735
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1736
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1737
+ ) -> BaseResponseAnalysisTags:
1738
+ """Get function tags with maliciousness score
1739
+
1740
+
1741
+ :param analysis_id: (required)
1742
+ :type analysis_id: int
1743
+ :param _request_timeout: timeout setting for this request. If one
1744
+ number provided, it will be total request
1745
+ timeout. It can also be a pair (tuple) of
1746
+ (connection, read) timeouts.
1747
+ :type _request_timeout: int, tuple(int, int), optional
1748
+ :param _request_auth: set to override the auth_settings for an a single
1749
+ request; this effectively ignores the
1750
+ authentication in the spec for a single request.
1751
+ :type _request_auth: dict, optional
1752
+ :param _content_type: force content-type for the request.
1753
+ :type _content_type: str, Optional
1754
+ :param _headers: set to override the headers for a single
1755
+ request; this effectively ignores the headers
1756
+ in the spec for a single request.
1757
+ :type _headers: dict, optional
1758
+ :param _host_index: set to override the host_index for a single
1759
+ request; this effectively ignores the host_index
1760
+ in the spec for a single request.
1761
+ :type _host_index: int, optional
1762
+ :return: Returns the result object.
1763
+ """ # noqa: E501
1764
+
1765
+ _param = self._get_tags_serialize(
1766
+ analysis_id=analysis_id,
1767
+ _request_auth=_request_auth,
1768
+ _content_type=_content_type,
1769
+ _headers=_headers,
1770
+ _host_index=_host_index
1771
+ )
1772
+
1773
+ _response_types_map: Dict[str, Optional[str]] = {
1774
+ '200': "BaseResponseAnalysisTags",
1775
+ '422': "BaseResponse",
1776
+ }
1777
+ response_data = self.api_client.call_api(
1778
+ *_param,
1779
+ _request_timeout=_request_timeout
1780
+ )
1781
+ response_data.read()
1782
+ return self.api_client.response_deserialize(
1783
+ response_data=response_data,
1784
+ response_types_map=_response_types_map,
1785
+ ).data
1786
+
1787
+
1788
+ @validate_call
1789
+ def get_tags_with_http_info(
1790
+ self,
1791
+ analysis_id: StrictInt,
1792
+ _request_timeout: Union[
1793
+ None,
1794
+ Annotated[StrictFloat, Field(gt=0)],
1795
+ Tuple[
1796
+ Annotated[StrictFloat, Field(gt=0)],
1797
+ Annotated[StrictFloat, Field(gt=0)]
1798
+ ]
1799
+ ] = None,
1800
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1801
+ _content_type: Optional[StrictStr] = None,
1802
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1803
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1804
+ ) -> ApiResponse[BaseResponseAnalysisTags]:
1805
+ """Get function tags with maliciousness score
1806
+
1807
+
1808
+ :param analysis_id: (required)
1809
+ :type analysis_id: int
1810
+ :param _request_timeout: timeout setting for this request. If one
1811
+ number provided, it will be total request
1812
+ timeout. It can also be a pair (tuple) of
1813
+ (connection, read) timeouts.
1814
+ :type _request_timeout: int, tuple(int, int), optional
1815
+ :param _request_auth: set to override the auth_settings for an a single
1816
+ request; this effectively ignores the
1817
+ authentication in the spec for a single request.
1818
+ :type _request_auth: dict, optional
1819
+ :param _content_type: force content-type for the request.
1820
+ :type _content_type: str, Optional
1821
+ :param _headers: set to override the headers for a single
1822
+ request; this effectively ignores the headers
1823
+ in the spec for a single request.
1824
+ :type _headers: dict, optional
1825
+ :param _host_index: set to override the host_index for a single
1826
+ request; this effectively ignores the host_index
1827
+ in the spec for a single request.
1828
+ :type _host_index: int, optional
1829
+ :return: Returns the result object.
1830
+ """ # noqa: E501
1831
+
1832
+ _param = self._get_tags_serialize(
1833
+ analysis_id=analysis_id,
1834
+ _request_auth=_request_auth,
1835
+ _content_type=_content_type,
1836
+ _headers=_headers,
1837
+ _host_index=_host_index
1838
+ )
1839
+
1840
+ _response_types_map: Dict[str, Optional[str]] = {
1841
+ '200': "BaseResponseAnalysisTags",
1842
+ '422': "BaseResponse",
1843
+ }
1844
+ response_data = self.api_client.call_api(
1845
+ *_param,
1846
+ _request_timeout=_request_timeout
1847
+ )
1848
+ response_data.read()
1849
+ return self.api_client.response_deserialize(
1850
+ response_data=response_data,
1851
+ response_types_map=_response_types_map,
1852
+ )
1853
+
1854
+
1855
+ @validate_call
1856
+ def get_tags_without_preload_content(
1857
+ self,
1858
+ analysis_id: StrictInt,
1859
+ _request_timeout: Union[
1860
+ None,
1861
+ Annotated[StrictFloat, Field(gt=0)],
1862
+ Tuple[
1863
+ Annotated[StrictFloat, Field(gt=0)],
1864
+ Annotated[StrictFloat, Field(gt=0)]
1865
+ ]
1866
+ ] = None,
1867
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1868
+ _content_type: Optional[StrictStr] = None,
1869
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1870
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1871
+ ) -> RESTResponseType:
1872
+ """Get function tags with maliciousness score
1873
+
1874
+
1875
+ :param analysis_id: (required)
1876
+ :type analysis_id: int
1877
+ :param _request_timeout: timeout setting for this request. If one
1878
+ number provided, it will be total request
1879
+ timeout. It can also be a pair (tuple) of
1880
+ (connection, read) timeouts.
1881
+ :type _request_timeout: int, tuple(int, int), optional
1882
+ :param _request_auth: set to override the auth_settings for an a single
1883
+ request; this effectively ignores the
1884
+ authentication in the spec for a single request.
1885
+ :type _request_auth: dict, optional
1886
+ :param _content_type: force content-type for the request.
1887
+ :type _content_type: str, Optional
1888
+ :param _headers: set to override the headers for a single
1889
+ request; this effectively ignores the headers
1890
+ in the spec for a single request.
1891
+ :type _headers: dict, optional
1892
+ :param _host_index: set to override the host_index for a single
1893
+ request; this effectively ignores the host_index
1894
+ in the spec for a single request.
1895
+ :type _host_index: int, optional
1896
+ :return: Returns the result object.
1897
+ """ # noqa: E501
1898
+
1899
+ _param = self._get_tags_serialize(
1900
+ analysis_id=analysis_id,
1901
+ _request_auth=_request_auth,
1902
+ _content_type=_content_type,
1903
+ _headers=_headers,
1904
+ _host_index=_host_index
1905
+ )
1906
+
1907
+ _response_types_map: Dict[str, Optional[str]] = {
1908
+ '200': "BaseResponseAnalysisTags",
1909
+ '422': "BaseResponse",
1910
+ }
1911
+ response_data = self.api_client.call_api(
1912
+ *_param,
1913
+ _request_timeout=_request_timeout
1914
+ )
1915
+ return response_data.response
1916
+
1917
+
1918
+ def _get_tags_serialize(
1919
+ self,
1920
+ analysis_id,
1921
+ _request_auth,
1922
+ _content_type,
1923
+ _headers,
1924
+ _host_index,
1925
+ ) -> RequestSerialized:
1926
+
1927
+ _host = None
1928
+
1929
+ _collection_formats: Dict[str, str] = {
1930
+ }
1931
+
1932
+ _path_params: Dict[str, str] = {}
1933
+ _query_params: List[Tuple[str, str]] = []
1934
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1935
+ _form_params: List[Tuple[str, str]] = []
1936
+ _files: Dict[
1937
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1938
+ ] = {}
1939
+ _body_params: Optional[bytes] = None
1940
+
1941
+ # process the path parameters
1942
+ if analysis_id is not None:
1943
+ _path_params['analysis_id'] = analysis_id
1944
+ # process the query parameters
1945
+ # process the header parameters
1946
+ # process the form parameters
1947
+ # process the body parameter
1948
+
1949
+
1950
+ # set the HTTP header `Accept`
1951
+ if 'Accept' not in _header_params:
1952
+ _header_params['Accept'] = self.api_client.select_header_accept(
1953
+ [
1954
+ 'application/json'
1955
+ ]
1956
+ )
1957
+
1958
+
1959
+ # authentication setting
1960
+ _auth_settings: List[str] = [
1961
+ 'APIKey'
1962
+ ]
1963
+
1964
+ return self.api_client.param_serialize(
1965
+ method='GET',
1966
+ resource_path='/v2/analyses/{analysis_id}/tags',
1967
+ path_params=_path_params,
1968
+ query_params=_query_params,
1969
+ header_params=_header_params,
1970
+ body=_body_params,
1971
+ post_params=_form_params,
1972
+ files=_files,
1973
+ auth_settings=_auth_settings,
1974
+ collection_formats=_collection_formats,
1975
+ _host=_host,
1976
+ _request_auth=_request_auth
1977
+ )
1978
+
1979
+
1980
+
1981
+
1982
+ @validate_call
1983
+ def get_vulnerabilities(
1984
+ self,
1985
+ analysis_id: StrictInt,
1986
+ _request_timeout: Union[
1987
+ None,
1988
+ Annotated[StrictFloat, Field(gt=0)],
1989
+ Tuple[
1990
+ Annotated[StrictFloat, Field(gt=0)],
1991
+ Annotated[StrictFloat, Field(gt=0)]
1992
+ ]
1993
+ ] = None,
1994
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1995
+ _content_type: Optional[StrictStr] = None,
1996
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1997
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1998
+ ) -> BaseResponseVulnerabilities:
1999
+ """Gets the vulnerabilities found in the analysis
2000
+
2001
+
2002
+ :param analysis_id: (required)
2003
+ :type analysis_id: int
2004
+ :param _request_timeout: timeout setting for this request. If one
2005
+ number provided, it will be total request
2006
+ timeout. It can also be a pair (tuple) of
2007
+ (connection, read) timeouts.
2008
+ :type _request_timeout: int, tuple(int, int), optional
2009
+ :param _request_auth: set to override the auth_settings for an a single
2010
+ request; this effectively ignores the
2011
+ authentication in the spec for a single request.
2012
+ :type _request_auth: dict, optional
2013
+ :param _content_type: force content-type for the request.
2014
+ :type _content_type: str, Optional
2015
+ :param _headers: set to override the headers for a single
2016
+ request; this effectively ignores the headers
2017
+ in the spec for a single request.
2018
+ :type _headers: dict, optional
2019
+ :param _host_index: set to override the host_index for a single
2020
+ request; this effectively ignores the host_index
2021
+ in the spec for a single request.
2022
+ :type _host_index: int, optional
2023
+ :return: Returns the result object.
2024
+ """ # noqa: E501
2025
+
2026
+ _param = self._get_vulnerabilities_serialize(
2027
+ analysis_id=analysis_id,
2028
+ _request_auth=_request_auth,
2029
+ _content_type=_content_type,
2030
+ _headers=_headers,
2031
+ _host_index=_host_index
2032
+ )
2033
+
2034
+ _response_types_map: Dict[str, Optional[str]] = {
2035
+ '200': "BaseResponseVulnerabilities",
2036
+ '422': "BaseResponse",
2037
+ }
2038
+ response_data = self.api_client.call_api(
2039
+ *_param,
2040
+ _request_timeout=_request_timeout
2041
+ )
2042
+ response_data.read()
2043
+ return self.api_client.response_deserialize(
2044
+ response_data=response_data,
2045
+ response_types_map=_response_types_map,
2046
+ ).data
2047
+
2048
+
2049
+ @validate_call
2050
+ def get_vulnerabilities_with_http_info(
2051
+ self,
2052
+ analysis_id: StrictInt,
2053
+ _request_timeout: Union[
2054
+ None,
2055
+ Annotated[StrictFloat, Field(gt=0)],
2056
+ Tuple[
2057
+ Annotated[StrictFloat, Field(gt=0)],
2058
+ Annotated[StrictFloat, Field(gt=0)]
2059
+ ]
2060
+ ] = None,
2061
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2062
+ _content_type: Optional[StrictStr] = None,
2063
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2064
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2065
+ ) -> ApiResponse[BaseResponseVulnerabilities]:
2066
+ """Gets the vulnerabilities found in the analysis
2067
+
2068
+
2069
+ :param analysis_id: (required)
2070
+ :type analysis_id: int
2071
+ :param _request_timeout: timeout setting for this request. If one
2072
+ number provided, it will be total request
2073
+ timeout. It can also be a pair (tuple) of
2074
+ (connection, read) timeouts.
2075
+ :type _request_timeout: int, tuple(int, int), optional
2076
+ :param _request_auth: set to override the auth_settings for an a single
2077
+ request; this effectively ignores the
2078
+ authentication in the spec for a single request.
2079
+ :type _request_auth: dict, optional
2080
+ :param _content_type: force content-type for the request.
2081
+ :type _content_type: str, Optional
2082
+ :param _headers: set to override the headers for a single
2083
+ request; this effectively ignores the headers
2084
+ in the spec for a single request.
2085
+ :type _headers: dict, optional
2086
+ :param _host_index: set to override the host_index for a single
2087
+ request; this effectively ignores the host_index
2088
+ in the spec for a single request.
2089
+ :type _host_index: int, optional
2090
+ :return: Returns the result object.
2091
+ """ # noqa: E501
2092
+
2093
+ _param = self._get_vulnerabilities_serialize(
2094
+ analysis_id=analysis_id,
2095
+ _request_auth=_request_auth,
2096
+ _content_type=_content_type,
2097
+ _headers=_headers,
2098
+ _host_index=_host_index
2099
+ )
2100
+
2101
+ _response_types_map: Dict[str, Optional[str]] = {
2102
+ '200': "BaseResponseVulnerabilities",
2103
+ '422': "BaseResponse",
2104
+ }
2105
+ response_data = self.api_client.call_api(
2106
+ *_param,
2107
+ _request_timeout=_request_timeout
2108
+ )
2109
+ response_data.read()
2110
+ return self.api_client.response_deserialize(
2111
+ response_data=response_data,
2112
+ response_types_map=_response_types_map,
2113
+ )
2114
+
2115
+
2116
+ @validate_call
2117
+ def get_vulnerabilities_without_preload_content(
2118
+ self,
2119
+ analysis_id: StrictInt,
2120
+ _request_timeout: Union[
2121
+ None,
2122
+ Annotated[StrictFloat, Field(gt=0)],
2123
+ Tuple[
2124
+ Annotated[StrictFloat, Field(gt=0)],
2125
+ Annotated[StrictFloat, Field(gt=0)]
2126
+ ]
2127
+ ] = None,
2128
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2129
+ _content_type: Optional[StrictStr] = None,
2130
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2131
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2132
+ ) -> RESTResponseType:
2133
+ """Gets the vulnerabilities found in the analysis
2134
+
2135
+
2136
+ :param analysis_id: (required)
2137
+ :type analysis_id: int
2138
+ :param _request_timeout: timeout setting for this request. If one
2139
+ number provided, it will be total request
2140
+ timeout. It can also be a pair (tuple) of
2141
+ (connection, read) timeouts.
2142
+ :type _request_timeout: int, tuple(int, int), optional
2143
+ :param _request_auth: set to override the auth_settings for an a single
2144
+ request; this effectively ignores the
2145
+ authentication in the spec for a single request.
2146
+ :type _request_auth: dict, optional
2147
+ :param _content_type: force content-type for the request.
2148
+ :type _content_type: str, Optional
2149
+ :param _headers: set to override the headers for a single
2150
+ request; this effectively ignores the headers
2151
+ in the spec for a single request.
2152
+ :type _headers: dict, optional
2153
+ :param _host_index: set to override the host_index for a single
2154
+ request; this effectively ignores the host_index
2155
+ in the spec for a single request.
2156
+ :type _host_index: int, optional
2157
+ :return: Returns the result object.
2158
+ """ # noqa: E501
2159
+
2160
+ _param = self._get_vulnerabilities_serialize(
2161
+ analysis_id=analysis_id,
2162
+ _request_auth=_request_auth,
2163
+ _content_type=_content_type,
2164
+ _headers=_headers,
2165
+ _host_index=_host_index
2166
+ )
2167
+
2168
+ _response_types_map: Dict[str, Optional[str]] = {
2169
+ '200': "BaseResponseVulnerabilities",
2170
+ '422': "BaseResponse",
2171
+ }
2172
+ response_data = self.api_client.call_api(
2173
+ *_param,
2174
+ _request_timeout=_request_timeout
2175
+ )
2176
+ return response_data.response
2177
+
2178
+
2179
+ def _get_vulnerabilities_serialize(
2180
+ self,
2181
+ analysis_id,
2182
+ _request_auth,
2183
+ _content_type,
2184
+ _headers,
2185
+ _host_index,
2186
+ ) -> RequestSerialized:
2187
+
2188
+ _host = None
2189
+
2190
+ _collection_formats: Dict[str, str] = {
2191
+ }
2192
+
2193
+ _path_params: Dict[str, str] = {}
2194
+ _query_params: List[Tuple[str, str]] = []
2195
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2196
+ _form_params: List[Tuple[str, str]] = []
2197
+ _files: Dict[
2198
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2199
+ ] = {}
2200
+ _body_params: Optional[bytes] = None
2201
+
2202
+ # process the path parameters
2203
+ if analysis_id is not None:
2204
+ _path_params['analysis_id'] = analysis_id
2205
+ # process the query parameters
2206
+ # process the header parameters
2207
+ # process the form parameters
2208
+ # process the body parameter
2209
+
2210
+
2211
+ # set the HTTP header `Accept`
2212
+ if 'Accept' not in _header_params:
2213
+ _header_params['Accept'] = self.api_client.select_header_accept(
2214
+ [
2215
+ 'application/json'
2216
+ ]
2217
+ )
2218
+
2219
+
2220
+ # authentication setting
2221
+ _auth_settings: List[str] = [
2222
+ 'APIKey'
2223
+ ]
2224
+
2225
+ return self.api_client.param_serialize(
2226
+ method='GET',
2227
+ resource_path='/v2/analyses/{analysis_id}/vulnerabilities',
2228
+ path_params=_path_params,
2229
+ query_params=_query_params,
2230
+ header_params=_header_params,
2231
+ body=_body_params,
2232
+ post_params=_form_params,
2233
+ files=_files,
2234
+ auth_settings=_auth_settings,
2235
+ collection_formats=_collection_formats,
2236
+ _host=_host,
2237
+ _request_auth=_request_auth
2238
+ )
2239
+
2240
+