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,1454 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ RevEng.AI API
5
+
6
+ RevEng.AI is Similarity Search Engine for executable binaries
7
+
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import Field, StrictBool, StrictStr
19
+ from typing import List, Optional
20
+ from typing_extensions import Annotated
21
+ from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
22
+ from revengai.models.base_response_binary_search_response import BaseResponseBinarySearchResponse
23
+ from revengai.models.base_response_collection_search_response import BaseResponseCollectionSearchResponse
24
+ from revengai.models.base_response_function_search_response import BaseResponseFunctionSearchResponse
25
+ from revengai.models.base_response_tag_search_response import BaseResponseTagSearchResponse
26
+ from revengai.models.filters import Filters
27
+ from revengai.models.order import Order
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 SearchApi:
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 search_binaries(
49
+ self,
50
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
51
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
52
+ partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary being searched")] = None,
53
+ partial_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary being searched")] = None,
54
+ tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
55
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
56
+ user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None,
57
+ _request_timeout: Union[
58
+ None,
59
+ Annotated[StrictFloat, Field(gt=0)],
60
+ Tuple[
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Annotated[StrictFloat, Field(gt=0)]
63
+ ]
64
+ ] = None,
65
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
66
+ _content_type: Optional[StrictStr] = None,
67
+ _headers: Optional[Dict[StrictStr, Any]] = None,
68
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
69
+ ) -> BaseResponseBinarySearchResponse:
70
+ """Binaries search
71
+
72
+ Searches for a specific binary
73
+
74
+ :param page: The page number to retrieve.
75
+ :type page: int
76
+ :param page_size: Number of items per page.
77
+ :type page_size: int
78
+ :param partial_name: The partial or full name of the binary being searched
79
+ :type partial_name: str
80
+ :param partial_sha256: The partial or full sha256 of the binary being searched
81
+ :type partial_sha256: str
82
+ :param tags: The tags to be searched for
83
+ :type tags: List[str]
84
+ :param model_name: The name of the model used to analyze the binary the function belongs to
85
+ :type model_name: str
86
+ :param user_files_only: Whether to only search user's uploaded files
87
+ :type user_files_only: bool
88
+ :param _request_timeout: timeout setting for this request. If one
89
+ number provided, it will be total request
90
+ timeout. It can also be a pair (tuple) of
91
+ (connection, read) timeouts.
92
+ :type _request_timeout: int, tuple(int, int), optional
93
+ :param _request_auth: set to override the auth_settings for an a single
94
+ request; this effectively ignores the
95
+ authentication in the spec for a single request.
96
+ :type _request_auth: dict, optional
97
+ :param _content_type: force content-type for the request.
98
+ :type _content_type: str, Optional
99
+ :param _headers: set to override the headers for a single
100
+ request; this effectively ignores the headers
101
+ in the spec for a single request.
102
+ :type _headers: dict, optional
103
+ :param _host_index: set to override the host_index for a single
104
+ request; this effectively ignores the host_index
105
+ in the spec for a single request.
106
+ :type _host_index: int, optional
107
+ :return: Returns the result object.
108
+ """ # noqa: E501
109
+
110
+ _param = self._search_binaries_serialize(
111
+ page=page,
112
+ page_size=page_size,
113
+ partial_name=partial_name,
114
+ partial_sha256=partial_sha256,
115
+ tags=tags,
116
+ model_name=model_name,
117
+ user_files_only=user_files_only,
118
+ _request_auth=_request_auth,
119
+ _content_type=_content_type,
120
+ _headers=_headers,
121
+ _host_index=_host_index
122
+ )
123
+
124
+ _response_types_map: Dict[str, Optional[str]] = {
125
+ '200': "BaseResponseBinarySearchResponse",
126
+ '422': "BaseResponse",
127
+ }
128
+ response_data = self.api_client.call_api(
129
+ *_param,
130
+ _request_timeout=_request_timeout
131
+ )
132
+ response_data.read()
133
+ return self.api_client.response_deserialize(
134
+ response_data=response_data,
135
+ response_types_map=_response_types_map,
136
+ ).data
137
+
138
+
139
+ @validate_call
140
+ def search_binaries_with_http_info(
141
+ self,
142
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
143
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
144
+ partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary being searched")] = None,
145
+ partial_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary being searched")] = None,
146
+ tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
147
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
148
+ user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None,
149
+ _request_timeout: Union[
150
+ None,
151
+ Annotated[StrictFloat, Field(gt=0)],
152
+ Tuple[
153
+ Annotated[StrictFloat, Field(gt=0)],
154
+ Annotated[StrictFloat, Field(gt=0)]
155
+ ]
156
+ ] = None,
157
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
158
+ _content_type: Optional[StrictStr] = None,
159
+ _headers: Optional[Dict[StrictStr, Any]] = None,
160
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
161
+ ) -> ApiResponse[BaseResponseBinarySearchResponse]:
162
+ """Binaries search
163
+
164
+ Searches for a specific binary
165
+
166
+ :param page: The page number to retrieve.
167
+ :type page: int
168
+ :param page_size: Number of items per page.
169
+ :type page_size: int
170
+ :param partial_name: The partial or full name of the binary being searched
171
+ :type partial_name: str
172
+ :param partial_sha256: The partial or full sha256 of the binary being searched
173
+ :type partial_sha256: str
174
+ :param tags: The tags to be searched for
175
+ :type tags: List[str]
176
+ :param model_name: The name of the model used to analyze the binary the function belongs to
177
+ :type model_name: str
178
+ :param user_files_only: Whether to only search user's uploaded files
179
+ :type user_files_only: bool
180
+ :param _request_timeout: timeout setting for this request. If one
181
+ number provided, it will be total request
182
+ timeout. It can also be a pair (tuple) of
183
+ (connection, read) timeouts.
184
+ :type _request_timeout: int, tuple(int, int), optional
185
+ :param _request_auth: set to override the auth_settings for an a single
186
+ request; this effectively ignores the
187
+ authentication in the spec for a single request.
188
+ :type _request_auth: dict, optional
189
+ :param _content_type: force content-type for the request.
190
+ :type _content_type: str, Optional
191
+ :param _headers: set to override the headers for a single
192
+ request; this effectively ignores the headers
193
+ in the spec for a single request.
194
+ :type _headers: dict, optional
195
+ :param _host_index: set to override the host_index for a single
196
+ request; this effectively ignores the host_index
197
+ in the spec for a single request.
198
+ :type _host_index: int, optional
199
+ :return: Returns the result object.
200
+ """ # noqa: E501
201
+
202
+ _param = self._search_binaries_serialize(
203
+ page=page,
204
+ page_size=page_size,
205
+ partial_name=partial_name,
206
+ partial_sha256=partial_sha256,
207
+ tags=tags,
208
+ model_name=model_name,
209
+ user_files_only=user_files_only,
210
+ _request_auth=_request_auth,
211
+ _content_type=_content_type,
212
+ _headers=_headers,
213
+ _host_index=_host_index
214
+ )
215
+
216
+ _response_types_map: Dict[str, Optional[str]] = {
217
+ '200': "BaseResponseBinarySearchResponse",
218
+ '422': "BaseResponse",
219
+ }
220
+ response_data = self.api_client.call_api(
221
+ *_param,
222
+ _request_timeout=_request_timeout
223
+ )
224
+ response_data.read()
225
+ return self.api_client.response_deserialize(
226
+ response_data=response_data,
227
+ response_types_map=_response_types_map,
228
+ )
229
+
230
+
231
+ @validate_call
232
+ def search_binaries_without_preload_content(
233
+ self,
234
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
235
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
236
+ partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary being searched")] = None,
237
+ partial_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary being searched")] = None,
238
+ tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
239
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
240
+ user_files_only: Annotated[Optional[StrictBool], Field(description="Whether to only search user's uploaded files")] = None,
241
+ _request_timeout: Union[
242
+ None,
243
+ Annotated[StrictFloat, Field(gt=0)],
244
+ Tuple[
245
+ Annotated[StrictFloat, Field(gt=0)],
246
+ Annotated[StrictFloat, Field(gt=0)]
247
+ ]
248
+ ] = None,
249
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
250
+ _content_type: Optional[StrictStr] = None,
251
+ _headers: Optional[Dict[StrictStr, Any]] = None,
252
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
253
+ ) -> RESTResponseType:
254
+ """Binaries search
255
+
256
+ Searches for a specific binary
257
+
258
+ :param page: The page number to retrieve.
259
+ :type page: int
260
+ :param page_size: Number of items per page.
261
+ :type page_size: int
262
+ :param partial_name: The partial or full name of the binary being searched
263
+ :type partial_name: str
264
+ :param partial_sha256: The partial or full sha256 of the binary being searched
265
+ :type partial_sha256: str
266
+ :param tags: The tags to be searched for
267
+ :type tags: List[str]
268
+ :param model_name: The name of the model used to analyze the binary the function belongs to
269
+ :type model_name: str
270
+ :param user_files_only: Whether to only search user's uploaded files
271
+ :type user_files_only: bool
272
+ :param _request_timeout: timeout setting for this request. If one
273
+ number provided, it will be total request
274
+ timeout. It can also be a pair (tuple) of
275
+ (connection, read) timeouts.
276
+ :type _request_timeout: int, tuple(int, int), optional
277
+ :param _request_auth: set to override the auth_settings for an a single
278
+ request; this effectively ignores the
279
+ authentication in the spec for a single request.
280
+ :type _request_auth: dict, optional
281
+ :param _content_type: force content-type for the request.
282
+ :type _content_type: str, Optional
283
+ :param _headers: set to override the headers for a single
284
+ request; this effectively ignores the headers
285
+ in the spec for a single request.
286
+ :type _headers: dict, optional
287
+ :param _host_index: set to override the host_index for a single
288
+ request; this effectively ignores the host_index
289
+ in the spec for a single request.
290
+ :type _host_index: int, optional
291
+ :return: Returns the result object.
292
+ """ # noqa: E501
293
+
294
+ _param = self._search_binaries_serialize(
295
+ page=page,
296
+ page_size=page_size,
297
+ partial_name=partial_name,
298
+ partial_sha256=partial_sha256,
299
+ tags=tags,
300
+ model_name=model_name,
301
+ user_files_only=user_files_only,
302
+ _request_auth=_request_auth,
303
+ _content_type=_content_type,
304
+ _headers=_headers,
305
+ _host_index=_host_index
306
+ )
307
+
308
+ _response_types_map: Dict[str, Optional[str]] = {
309
+ '200': "BaseResponseBinarySearchResponse",
310
+ '422': "BaseResponse",
311
+ }
312
+ response_data = self.api_client.call_api(
313
+ *_param,
314
+ _request_timeout=_request_timeout
315
+ )
316
+ return response_data.response
317
+
318
+
319
+ def _search_binaries_serialize(
320
+ self,
321
+ page,
322
+ page_size,
323
+ partial_name,
324
+ partial_sha256,
325
+ tags,
326
+ model_name,
327
+ user_files_only,
328
+ _request_auth,
329
+ _content_type,
330
+ _headers,
331
+ _host_index,
332
+ ) -> RequestSerialized:
333
+
334
+ _host = None
335
+
336
+ _collection_formats: Dict[str, str] = {
337
+ 'tags': 'multi',
338
+ }
339
+
340
+ _path_params: Dict[str, str] = {}
341
+ _query_params: List[Tuple[str, str]] = []
342
+ _header_params: Dict[str, Optional[str]] = _headers or {}
343
+ _form_params: List[Tuple[str, str]] = []
344
+ _files: Dict[
345
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
346
+ ] = {}
347
+ _body_params: Optional[bytes] = None
348
+
349
+ # process the path parameters
350
+ # process the query parameters
351
+ if page is not None:
352
+
353
+ _query_params.append(('page', page))
354
+
355
+ if page_size is not None:
356
+
357
+ _query_params.append(('page_size', page_size))
358
+
359
+ if partial_name is not None:
360
+
361
+ _query_params.append(('partial_name', partial_name))
362
+
363
+ if partial_sha256 is not None:
364
+
365
+ _query_params.append(('partial_sha256', partial_sha256))
366
+
367
+ if tags is not None:
368
+
369
+ _query_params.append(('tags', tags))
370
+
371
+ if model_name is not None:
372
+
373
+ _query_params.append(('model_name', model_name))
374
+
375
+ if user_files_only is not None:
376
+
377
+ _query_params.append(('user_files_only', user_files_only))
378
+
379
+ # process the header parameters
380
+ # process the form parameters
381
+ # process the body parameter
382
+
383
+
384
+ # set the HTTP header `Accept`
385
+ if 'Accept' not in _header_params:
386
+ _header_params['Accept'] = self.api_client.select_header_accept(
387
+ [
388
+ 'application/json'
389
+ ]
390
+ )
391
+
392
+
393
+ # authentication setting
394
+ _auth_settings: List[str] = [
395
+ 'APIKey'
396
+ ]
397
+
398
+ return self.api_client.param_serialize(
399
+ method='GET',
400
+ resource_path='/v2/search/binaries',
401
+ path_params=_path_params,
402
+ query_params=_query_params,
403
+ header_params=_header_params,
404
+ body=_body_params,
405
+ post_params=_form_params,
406
+ files=_files,
407
+ auth_settings=_auth_settings,
408
+ collection_formats=_collection_formats,
409
+ _host=_host,
410
+ _request_auth=_request_auth
411
+ )
412
+
413
+
414
+
415
+
416
+ @validate_call
417
+ def search_collections(
418
+ self,
419
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
420
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
421
+ partial_collection_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the collection being searched")] = None,
422
+ partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None,
423
+ partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None,
424
+ tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
425
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
426
+ filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
427
+ order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
428
+ order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
429
+ _request_timeout: Union[
430
+ None,
431
+ Annotated[StrictFloat, Field(gt=0)],
432
+ Tuple[
433
+ Annotated[StrictFloat, Field(gt=0)],
434
+ Annotated[StrictFloat, Field(gt=0)]
435
+ ]
436
+ ] = None,
437
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
438
+ _content_type: Optional[StrictStr] = None,
439
+ _headers: Optional[Dict[StrictStr, Any]] = None,
440
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
441
+ ) -> BaseResponseCollectionSearchResponse:
442
+ """Collections search
443
+
444
+ Searches for a specific collection
445
+
446
+ :param page: The page number to retrieve.
447
+ :type page: int
448
+ :param page_size: Number of items per page.
449
+ :type page_size: int
450
+ :param partial_collection_name: The partial or full name of the collection being searched
451
+ :type partial_collection_name: str
452
+ :param partial_binary_name: The partial or full name of the binary belonging to the collection
453
+ :type partial_binary_name: str
454
+ :param partial_binary_sha256: The partial or full sha256 of the binary belonging to the collection
455
+ :type partial_binary_sha256: str
456
+ :param tags: The tags to be searched for
457
+ :type tags: List[str]
458
+ :param model_name: The name of the model used to analyze the binary the function belongs to
459
+ :type model_name: str
460
+ :param filters: The filters to be used for the search
461
+ :type filters: List[Filters]
462
+ :param order_by: The field to sort the order by in the results
463
+ :type order_by: AppApiRestV2CollectionsEnumsOrderBy
464
+ :param order_by_direction: The order direction in which to return results
465
+ :type order_by_direction: Order
466
+ :param _request_timeout: timeout setting for this request. If one
467
+ number provided, it will be total request
468
+ timeout. It can also be a pair (tuple) of
469
+ (connection, read) timeouts.
470
+ :type _request_timeout: int, tuple(int, int), optional
471
+ :param _request_auth: set to override the auth_settings for an a single
472
+ request; this effectively ignores the
473
+ authentication in the spec for a single request.
474
+ :type _request_auth: dict, optional
475
+ :param _content_type: force content-type for the request.
476
+ :type _content_type: str, Optional
477
+ :param _headers: set to override the headers for a single
478
+ request; this effectively ignores the headers
479
+ in the spec for a single request.
480
+ :type _headers: dict, optional
481
+ :param _host_index: set to override the host_index for a single
482
+ request; this effectively ignores the host_index
483
+ in the spec for a single request.
484
+ :type _host_index: int, optional
485
+ :return: Returns the result object.
486
+ """ # noqa: E501
487
+
488
+ _param = self._search_collections_serialize(
489
+ page=page,
490
+ page_size=page_size,
491
+ partial_collection_name=partial_collection_name,
492
+ partial_binary_name=partial_binary_name,
493
+ partial_binary_sha256=partial_binary_sha256,
494
+ tags=tags,
495
+ model_name=model_name,
496
+ filters=filters,
497
+ order_by=order_by,
498
+ order_by_direction=order_by_direction,
499
+ _request_auth=_request_auth,
500
+ _content_type=_content_type,
501
+ _headers=_headers,
502
+ _host_index=_host_index
503
+ )
504
+
505
+ _response_types_map: Dict[str, Optional[str]] = {
506
+ '200': "BaseResponseCollectionSearchResponse",
507
+ '422': "BaseResponse",
508
+ '404': "BaseResponse",
509
+ }
510
+ response_data = self.api_client.call_api(
511
+ *_param,
512
+ _request_timeout=_request_timeout
513
+ )
514
+ response_data.read()
515
+ return self.api_client.response_deserialize(
516
+ response_data=response_data,
517
+ response_types_map=_response_types_map,
518
+ ).data
519
+
520
+
521
+ @validate_call
522
+ def search_collections_with_http_info(
523
+ self,
524
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
525
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
526
+ partial_collection_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the collection being searched")] = None,
527
+ partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None,
528
+ partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None,
529
+ tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
530
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
531
+ filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
532
+ order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
533
+ order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
534
+ _request_timeout: Union[
535
+ None,
536
+ Annotated[StrictFloat, Field(gt=0)],
537
+ Tuple[
538
+ Annotated[StrictFloat, Field(gt=0)],
539
+ Annotated[StrictFloat, Field(gt=0)]
540
+ ]
541
+ ] = None,
542
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
543
+ _content_type: Optional[StrictStr] = None,
544
+ _headers: Optional[Dict[StrictStr, Any]] = None,
545
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
546
+ ) -> ApiResponse[BaseResponseCollectionSearchResponse]:
547
+ """Collections search
548
+
549
+ Searches for a specific collection
550
+
551
+ :param page: The page number to retrieve.
552
+ :type page: int
553
+ :param page_size: Number of items per page.
554
+ :type page_size: int
555
+ :param partial_collection_name: The partial or full name of the collection being searched
556
+ :type partial_collection_name: str
557
+ :param partial_binary_name: The partial or full name of the binary belonging to the collection
558
+ :type partial_binary_name: str
559
+ :param partial_binary_sha256: The partial or full sha256 of the binary belonging to the collection
560
+ :type partial_binary_sha256: str
561
+ :param tags: The tags to be searched for
562
+ :type tags: List[str]
563
+ :param model_name: The name of the model used to analyze the binary the function belongs to
564
+ :type model_name: str
565
+ :param filters: The filters to be used for the search
566
+ :type filters: List[Filters]
567
+ :param order_by: The field to sort the order by in the results
568
+ :type order_by: AppApiRestV2CollectionsEnumsOrderBy
569
+ :param order_by_direction: The order direction in which to return results
570
+ :type order_by_direction: Order
571
+ :param _request_timeout: timeout setting for this request. If one
572
+ number provided, it will be total request
573
+ timeout. It can also be a pair (tuple) of
574
+ (connection, read) timeouts.
575
+ :type _request_timeout: int, tuple(int, int), optional
576
+ :param _request_auth: set to override the auth_settings for an a single
577
+ request; this effectively ignores the
578
+ authentication in the spec for a single request.
579
+ :type _request_auth: dict, optional
580
+ :param _content_type: force content-type for the request.
581
+ :type _content_type: str, Optional
582
+ :param _headers: set to override the headers for a single
583
+ request; this effectively ignores the headers
584
+ in the spec for a single request.
585
+ :type _headers: dict, optional
586
+ :param _host_index: set to override the host_index for a single
587
+ request; this effectively ignores the host_index
588
+ in the spec for a single request.
589
+ :type _host_index: int, optional
590
+ :return: Returns the result object.
591
+ """ # noqa: E501
592
+
593
+ _param = self._search_collections_serialize(
594
+ page=page,
595
+ page_size=page_size,
596
+ partial_collection_name=partial_collection_name,
597
+ partial_binary_name=partial_binary_name,
598
+ partial_binary_sha256=partial_binary_sha256,
599
+ tags=tags,
600
+ model_name=model_name,
601
+ filters=filters,
602
+ order_by=order_by,
603
+ order_by_direction=order_by_direction,
604
+ _request_auth=_request_auth,
605
+ _content_type=_content_type,
606
+ _headers=_headers,
607
+ _host_index=_host_index
608
+ )
609
+
610
+ _response_types_map: Dict[str, Optional[str]] = {
611
+ '200': "BaseResponseCollectionSearchResponse",
612
+ '422': "BaseResponse",
613
+ '404': "BaseResponse",
614
+ }
615
+ response_data = self.api_client.call_api(
616
+ *_param,
617
+ _request_timeout=_request_timeout
618
+ )
619
+ response_data.read()
620
+ return self.api_client.response_deserialize(
621
+ response_data=response_data,
622
+ response_types_map=_response_types_map,
623
+ )
624
+
625
+
626
+ @validate_call
627
+ def search_collections_without_preload_content(
628
+ self,
629
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
630
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
631
+ partial_collection_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the collection being searched")] = None,
632
+ partial_binary_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the binary belonging to the collection")] = None,
633
+ partial_binary_sha256: Annotated[Optional[StrictStr], Field(description="The partial or full sha256 of the binary belonging to the collection")] = None,
634
+ tags: Annotated[Optional[List[StrictStr]], Field(description="The tags to be searched for")] = None,
635
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
636
+ filters: Annotated[Optional[List[Filters]], Field(description="The filters to be used for the search")] = None,
637
+ order_by: Annotated[Optional[AppApiRestV2CollectionsEnumsOrderBy], Field(description="The field to sort the order by in the results")] = None,
638
+ order_by_direction: Annotated[Optional[Order], Field(description="The order direction in which to return results")] = None,
639
+ _request_timeout: Union[
640
+ None,
641
+ Annotated[StrictFloat, Field(gt=0)],
642
+ Tuple[
643
+ Annotated[StrictFloat, Field(gt=0)],
644
+ Annotated[StrictFloat, Field(gt=0)]
645
+ ]
646
+ ] = None,
647
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
648
+ _content_type: Optional[StrictStr] = None,
649
+ _headers: Optional[Dict[StrictStr, Any]] = None,
650
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
651
+ ) -> RESTResponseType:
652
+ """Collections search
653
+
654
+ Searches for a specific collection
655
+
656
+ :param page: The page number to retrieve.
657
+ :type page: int
658
+ :param page_size: Number of items per page.
659
+ :type page_size: int
660
+ :param partial_collection_name: The partial or full name of the collection being searched
661
+ :type partial_collection_name: str
662
+ :param partial_binary_name: The partial or full name of the binary belonging to the collection
663
+ :type partial_binary_name: str
664
+ :param partial_binary_sha256: The partial or full sha256 of the binary belonging to the collection
665
+ :type partial_binary_sha256: str
666
+ :param tags: The tags to be searched for
667
+ :type tags: List[str]
668
+ :param model_name: The name of the model used to analyze the binary the function belongs to
669
+ :type model_name: str
670
+ :param filters: The filters to be used for the search
671
+ :type filters: List[Filters]
672
+ :param order_by: The field to sort the order by in the results
673
+ :type order_by: AppApiRestV2CollectionsEnumsOrderBy
674
+ :param order_by_direction: The order direction in which to return results
675
+ :type order_by_direction: Order
676
+ :param _request_timeout: timeout setting for this request. If one
677
+ number provided, it will be total request
678
+ timeout. It can also be a pair (tuple) of
679
+ (connection, read) timeouts.
680
+ :type _request_timeout: int, tuple(int, int), optional
681
+ :param _request_auth: set to override the auth_settings for an a single
682
+ request; this effectively ignores the
683
+ authentication in the spec for a single request.
684
+ :type _request_auth: dict, optional
685
+ :param _content_type: force content-type for the request.
686
+ :type _content_type: str, Optional
687
+ :param _headers: set to override the headers for a single
688
+ request; this effectively ignores the headers
689
+ in the spec for a single request.
690
+ :type _headers: dict, optional
691
+ :param _host_index: set to override the host_index for a single
692
+ request; this effectively ignores the host_index
693
+ in the spec for a single request.
694
+ :type _host_index: int, optional
695
+ :return: Returns the result object.
696
+ """ # noqa: E501
697
+
698
+ _param = self._search_collections_serialize(
699
+ page=page,
700
+ page_size=page_size,
701
+ partial_collection_name=partial_collection_name,
702
+ partial_binary_name=partial_binary_name,
703
+ partial_binary_sha256=partial_binary_sha256,
704
+ tags=tags,
705
+ model_name=model_name,
706
+ filters=filters,
707
+ order_by=order_by,
708
+ order_by_direction=order_by_direction,
709
+ _request_auth=_request_auth,
710
+ _content_type=_content_type,
711
+ _headers=_headers,
712
+ _host_index=_host_index
713
+ )
714
+
715
+ _response_types_map: Dict[str, Optional[str]] = {
716
+ '200': "BaseResponseCollectionSearchResponse",
717
+ '422': "BaseResponse",
718
+ '404': "BaseResponse",
719
+ }
720
+ response_data = self.api_client.call_api(
721
+ *_param,
722
+ _request_timeout=_request_timeout
723
+ )
724
+ return response_data.response
725
+
726
+
727
+ def _search_collections_serialize(
728
+ self,
729
+ page,
730
+ page_size,
731
+ partial_collection_name,
732
+ partial_binary_name,
733
+ partial_binary_sha256,
734
+ tags,
735
+ model_name,
736
+ filters,
737
+ order_by,
738
+ order_by_direction,
739
+ _request_auth,
740
+ _content_type,
741
+ _headers,
742
+ _host_index,
743
+ ) -> RequestSerialized:
744
+
745
+ _host = None
746
+
747
+ _collection_formats: Dict[str, str] = {
748
+ 'tags': 'multi',
749
+ 'filters': 'multi',
750
+ }
751
+
752
+ _path_params: Dict[str, str] = {}
753
+ _query_params: List[Tuple[str, str]] = []
754
+ _header_params: Dict[str, Optional[str]] = _headers or {}
755
+ _form_params: List[Tuple[str, str]] = []
756
+ _files: Dict[
757
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
758
+ ] = {}
759
+ _body_params: Optional[bytes] = None
760
+
761
+ # process the path parameters
762
+ # process the query parameters
763
+ if page is not None:
764
+
765
+ _query_params.append(('page', page))
766
+
767
+ if page_size is not None:
768
+
769
+ _query_params.append(('page_size', page_size))
770
+
771
+ if partial_collection_name is not None:
772
+
773
+ _query_params.append(('partial_collection_name', partial_collection_name))
774
+
775
+ if partial_binary_name is not None:
776
+
777
+ _query_params.append(('partial_binary_name', partial_binary_name))
778
+
779
+ if partial_binary_sha256 is not None:
780
+
781
+ _query_params.append(('partial_binary_sha256', partial_binary_sha256))
782
+
783
+ if tags is not None:
784
+
785
+ _query_params.append(('tags', tags))
786
+
787
+ if model_name is not None:
788
+
789
+ _query_params.append(('model_name', model_name))
790
+
791
+ if filters is not None:
792
+
793
+ _query_params.append(('filters', filters))
794
+
795
+ if order_by is not None:
796
+
797
+ _query_params.append(('order_by', order_by.value))
798
+
799
+ if order_by_direction is not None:
800
+
801
+ _query_params.append(('order_by_direction', order_by_direction.value))
802
+
803
+ # process the header parameters
804
+ # process the form parameters
805
+ # process the body parameter
806
+
807
+
808
+ # set the HTTP header `Accept`
809
+ if 'Accept' not in _header_params:
810
+ _header_params['Accept'] = self.api_client.select_header_accept(
811
+ [
812
+ 'application/json'
813
+ ]
814
+ )
815
+
816
+
817
+ # authentication setting
818
+ _auth_settings: List[str] = [
819
+ 'APIKey'
820
+ ]
821
+
822
+ return self.api_client.param_serialize(
823
+ method='GET',
824
+ resource_path='/v2/search/collections',
825
+ path_params=_path_params,
826
+ query_params=_query_params,
827
+ header_params=_header_params,
828
+ body=_body_params,
829
+ post_params=_form_params,
830
+ files=_files,
831
+ auth_settings=_auth_settings,
832
+ collection_formats=_collection_formats,
833
+ _host=_host,
834
+ _request_auth=_request_auth
835
+ )
836
+
837
+
838
+
839
+
840
+ @validate_call
841
+ def search_functions(
842
+ self,
843
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
844
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
845
+ partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the function being searched")] = None,
846
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
847
+ _request_timeout: Union[
848
+ None,
849
+ Annotated[StrictFloat, Field(gt=0)],
850
+ Tuple[
851
+ Annotated[StrictFloat, Field(gt=0)],
852
+ Annotated[StrictFloat, Field(gt=0)]
853
+ ]
854
+ ] = None,
855
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
856
+ _content_type: Optional[StrictStr] = None,
857
+ _headers: Optional[Dict[StrictStr, Any]] = None,
858
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
859
+ ) -> BaseResponseFunctionSearchResponse:
860
+ """Functions search
861
+
862
+ Searches for a specific function
863
+
864
+ :param page: The page number to retrieve.
865
+ :type page: int
866
+ :param page_size: Number of items per page.
867
+ :type page_size: int
868
+ :param partial_name: The partial or full name of the function being searched
869
+ :type partial_name: str
870
+ :param model_name: The name of the model used to analyze the binary the function belongs to
871
+ :type model_name: str
872
+ :param _request_timeout: timeout setting for this request. If one
873
+ number provided, it will be total request
874
+ timeout. It can also be a pair (tuple) of
875
+ (connection, read) timeouts.
876
+ :type _request_timeout: int, tuple(int, int), optional
877
+ :param _request_auth: set to override the auth_settings for an a single
878
+ request; this effectively ignores the
879
+ authentication in the spec for a single request.
880
+ :type _request_auth: dict, optional
881
+ :param _content_type: force content-type for the request.
882
+ :type _content_type: str, Optional
883
+ :param _headers: set to override the headers for a single
884
+ request; this effectively ignores the headers
885
+ in the spec for a single request.
886
+ :type _headers: dict, optional
887
+ :param _host_index: set to override the host_index for a single
888
+ request; this effectively ignores the host_index
889
+ in the spec for a single request.
890
+ :type _host_index: int, optional
891
+ :return: Returns the result object.
892
+ """ # noqa: E501
893
+
894
+ _param = self._search_functions_serialize(
895
+ page=page,
896
+ page_size=page_size,
897
+ partial_name=partial_name,
898
+ model_name=model_name,
899
+ _request_auth=_request_auth,
900
+ _content_type=_content_type,
901
+ _headers=_headers,
902
+ _host_index=_host_index
903
+ )
904
+
905
+ _response_types_map: Dict[str, Optional[str]] = {
906
+ '200': "BaseResponseFunctionSearchResponse",
907
+ '422': "BaseResponse",
908
+ }
909
+ response_data = self.api_client.call_api(
910
+ *_param,
911
+ _request_timeout=_request_timeout
912
+ )
913
+ response_data.read()
914
+ return self.api_client.response_deserialize(
915
+ response_data=response_data,
916
+ response_types_map=_response_types_map,
917
+ ).data
918
+
919
+
920
+ @validate_call
921
+ def search_functions_with_http_info(
922
+ self,
923
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
924
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
925
+ partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the function being searched")] = None,
926
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
927
+ _request_timeout: Union[
928
+ None,
929
+ Annotated[StrictFloat, Field(gt=0)],
930
+ Tuple[
931
+ Annotated[StrictFloat, Field(gt=0)],
932
+ Annotated[StrictFloat, Field(gt=0)]
933
+ ]
934
+ ] = None,
935
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
936
+ _content_type: Optional[StrictStr] = None,
937
+ _headers: Optional[Dict[StrictStr, Any]] = None,
938
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
939
+ ) -> ApiResponse[BaseResponseFunctionSearchResponse]:
940
+ """Functions search
941
+
942
+ Searches for a specific function
943
+
944
+ :param page: The page number to retrieve.
945
+ :type page: int
946
+ :param page_size: Number of items per page.
947
+ :type page_size: int
948
+ :param partial_name: The partial or full name of the function being searched
949
+ :type partial_name: str
950
+ :param model_name: The name of the model used to analyze the binary the function belongs to
951
+ :type model_name: str
952
+ :param _request_timeout: timeout setting for this request. If one
953
+ number provided, it will be total request
954
+ timeout. It can also be a pair (tuple) of
955
+ (connection, read) timeouts.
956
+ :type _request_timeout: int, tuple(int, int), optional
957
+ :param _request_auth: set to override the auth_settings for an a single
958
+ request; this effectively ignores the
959
+ authentication in the spec for a single request.
960
+ :type _request_auth: dict, optional
961
+ :param _content_type: force content-type for the request.
962
+ :type _content_type: str, Optional
963
+ :param _headers: set to override the headers for a single
964
+ request; this effectively ignores the headers
965
+ in the spec for a single request.
966
+ :type _headers: dict, optional
967
+ :param _host_index: set to override the host_index for a single
968
+ request; this effectively ignores the host_index
969
+ in the spec for a single request.
970
+ :type _host_index: int, optional
971
+ :return: Returns the result object.
972
+ """ # noqa: E501
973
+
974
+ _param = self._search_functions_serialize(
975
+ page=page,
976
+ page_size=page_size,
977
+ partial_name=partial_name,
978
+ model_name=model_name,
979
+ _request_auth=_request_auth,
980
+ _content_type=_content_type,
981
+ _headers=_headers,
982
+ _host_index=_host_index
983
+ )
984
+
985
+ _response_types_map: Dict[str, Optional[str]] = {
986
+ '200': "BaseResponseFunctionSearchResponse",
987
+ '422': "BaseResponse",
988
+ }
989
+ response_data = self.api_client.call_api(
990
+ *_param,
991
+ _request_timeout=_request_timeout
992
+ )
993
+ response_data.read()
994
+ return self.api_client.response_deserialize(
995
+ response_data=response_data,
996
+ response_types_map=_response_types_map,
997
+ )
998
+
999
+
1000
+ @validate_call
1001
+ def search_functions_without_preload_content(
1002
+ self,
1003
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
1004
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
1005
+ partial_name: Annotated[Optional[StrictStr], Field(description="The partial or full name of the function being searched")] = None,
1006
+ model_name: Annotated[Optional[StrictStr], Field(description="The name of the model used to analyze the binary the function belongs to")] = None,
1007
+ _request_timeout: Union[
1008
+ None,
1009
+ Annotated[StrictFloat, Field(gt=0)],
1010
+ Tuple[
1011
+ Annotated[StrictFloat, Field(gt=0)],
1012
+ Annotated[StrictFloat, Field(gt=0)]
1013
+ ]
1014
+ ] = None,
1015
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1016
+ _content_type: Optional[StrictStr] = None,
1017
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1018
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1019
+ ) -> RESTResponseType:
1020
+ """Functions search
1021
+
1022
+ Searches for a specific function
1023
+
1024
+ :param page: The page number to retrieve.
1025
+ :type page: int
1026
+ :param page_size: Number of items per page.
1027
+ :type page_size: int
1028
+ :param partial_name: The partial or full name of the function being searched
1029
+ :type partial_name: str
1030
+ :param model_name: The name of the model used to analyze the binary the function belongs to
1031
+ :type model_name: str
1032
+ :param _request_timeout: timeout setting for this request. If one
1033
+ number provided, it will be total request
1034
+ timeout. It can also be a pair (tuple) of
1035
+ (connection, read) timeouts.
1036
+ :type _request_timeout: int, tuple(int, int), optional
1037
+ :param _request_auth: set to override the auth_settings for an a single
1038
+ request; this effectively ignores the
1039
+ authentication in the spec for a single request.
1040
+ :type _request_auth: dict, optional
1041
+ :param _content_type: force content-type for the request.
1042
+ :type _content_type: str, Optional
1043
+ :param _headers: set to override the headers for a single
1044
+ request; this effectively ignores the headers
1045
+ in the spec for a single request.
1046
+ :type _headers: dict, optional
1047
+ :param _host_index: set to override the host_index for a single
1048
+ request; this effectively ignores the host_index
1049
+ in the spec for a single request.
1050
+ :type _host_index: int, optional
1051
+ :return: Returns the result object.
1052
+ """ # noqa: E501
1053
+
1054
+ _param = self._search_functions_serialize(
1055
+ page=page,
1056
+ page_size=page_size,
1057
+ partial_name=partial_name,
1058
+ model_name=model_name,
1059
+ _request_auth=_request_auth,
1060
+ _content_type=_content_type,
1061
+ _headers=_headers,
1062
+ _host_index=_host_index
1063
+ )
1064
+
1065
+ _response_types_map: Dict[str, Optional[str]] = {
1066
+ '200': "BaseResponseFunctionSearchResponse",
1067
+ '422': "BaseResponse",
1068
+ }
1069
+ response_data = self.api_client.call_api(
1070
+ *_param,
1071
+ _request_timeout=_request_timeout
1072
+ )
1073
+ return response_data.response
1074
+
1075
+
1076
+ def _search_functions_serialize(
1077
+ self,
1078
+ page,
1079
+ page_size,
1080
+ partial_name,
1081
+ model_name,
1082
+ _request_auth,
1083
+ _content_type,
1084
+ _headers,
1085
+ _host_index,
1086
+ ) -> RequestSerialized:
1087
+
1088
+ _host = None
1089
+
1090
+ _collection_formats: Dict[str, str] = {
1091
+ }
1092
+
1093
+ _path_params: Dict[str, str] = {}
1094
+ _query_params: List[Tuple[str, str]] = []
1095
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1096
+ _form_params: List[Tuple[str, str]] = []
1097
+ _files: Dict[
1098
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1099
+ ] = {}
1100
+ _body_params: Optional[bytes] = None
1101
+
1102
+ # process the path parameters
1103
+ # process the query parameters
1104
+ if page is not None:
1105
+
1106
+ _query_params.append(('page', page))
1107
+
1108
+ if page_size is not None:
1109
+
1110
+ _query_params.append(('page_size', page_size))
1111
+
1112
+ if partial_name is not None:
1113
+
1114
+ _query_params.append(('partial_name', partial_name))
1115
+
1116
+ if model_name is not None:
1117
+
1118
+ _query_params.append(('model_name', model_name))
1119
+
1120
+ # process the header parameters
1121
+ # process the form parameters
1122
+ # process the body parameter
1123
+
1124
+
1125
+ # set the HTTP header `Accept`
1126
+ if 'Accept' not in _header_params:
1127
+ _header_params['Accept'] = self.api_client.select_header_accept(
1128
+ [
1129
+ 'application/json'
1130
+ ]
1131
+ )
1132
+
1133
+
1134
+ # authentication setting
1135
+ _auth_settings: List[str] = [
1136
+ 'APIKey'
1137
+ ]
1138
+
1139
+ return self.api_client.param_serialize(
1140
+ method='GET',
1141
+ resource_path='/v2/search/functions',
1142
+ path_params=_path_params,
1143
+ query_params=_query_params,
1144
+ header_params=_header_params,
1145
+ body=_body_params,
1146
+ post_params=_form_params,
1147
+ files=_files,
1148
+ auth_settings=_auth_settings,
1149
+ collection_formats=_collection_formats,
1150
+ _host=_host,
1151
+ _request_auth=_request_auth
1152
+ )
1153
+
1154
+
1155
+
1156
+
1157
+ @validate_call
1158
+ def search_tags(
1159
+ self,
1160
+ partial_name: Annotated[StrictStr, Field(description="The partial or full name of the tag to search for")],
1161
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
1162
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
1163
+ _request_timeout: Union[
1164
+ None,
1165
+ Annotated[StrictFloat, Field(gt=0)],
1166
+ Tuple[
1167
+ Annotated[StrictFloat, Field(gt=0)],
1168
+ Annotated[StrictFloat, Field(gt=0)]
1169
+ ]
1170
+ ] = None,
1171
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1172
+ _content_type: Optional[StrictStr] = None,
1173
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1174
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1175
+ ) -> BaseResponseTagSearchResponse:
1176
+ """Tags search
1177
+
1178
+ Searches for tags by there name
1179
+
1180
+ :param partial_name: The partial or full name of the tag to search for (required)
1181
+ :type partial_name: str
1182
+ :param page: The page number to retrieve.
1183
+ :type page: int
1184
+ :param page_size: Number of items per page.
1185
+ :type page_size: int
1186
+ :param _request_timeout: timeout setting for this request. If one
1187
+ number provided, it will be total request
1188
+ timeout. It can also be a pair (tuple) of
1189
+ (connection, read) timeouts.
1190
+ :type _request_timeout: int, tuple(int, int), optional
1191
+ :param _request_auth: set to override the auth_settings for an a single
1192
+ request; this effectively ignores the
1193
+ authentication in the spec for a single request.
1194
+ :type _request_auth: dict, optional
1195
+ :param _content_type: force content-type for the request.
1196
+ :type _content_type: str, Optional
1197
+ :param _headers: set to override the headers for a single
1198
+ request; this effectively ignores the headers
1199
+ in the spec for a single request.
1200
+ :type _headers: dict, optional
1201
+ :param _host_index: set to override the host_index for a single
1202
+ request; this effectively ignores the host_index
1203
+ in the spec for a single request.
1204
+ :type _host_index: int, optional
1205
+ :return: Returns the result object.
1206
+ """ # noqa: E501
1207
+
1208
+ _param = self._search_tags_serialize(
1209
+ partial_name=partial_name,
1210
+ page=page,
1211
+ page_size=page_size,
1212
+ _request_auth=_request_auth,
1213
+ _content_type=_content_type,
1214
+ _headers=_headers,
1215
+ _host_index=_host_index
1216
+ )
1217
+
1218
+ _response_types_map: Dict[str, Optional[str]] = {
1219
+ '200': "BaseResponseTagSearchResponse",
1220
+ '422': "BaseResponse",
1221
+ }
1222
+ response_data = self.api_client.call_api(
1223
+ *_param,
1224
+ _request_timeout=_request_timeout
1225
+ )
1226
+ response_data.read()
1227
+ return self.api_client.response_deserialize(
1228
+ response_data=response_data,
1229
+ response_types_map=_response_types_map,
1230
+ ).data
1231
+
1232
+
1233
+ @validate_call
1234
+ def search_tags_with_http_info(
1235
+ self,
1236
+ partial_name: Annotated[StrictStr, Field(description="The partial or full name of the tag to search for")],
1237
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
1238
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
1239
+ _request_timeout: Union[
1240
+ None,
1241
+ Annotated[StrictFloat, Field(gt=0)],
1242
+ Tuple[
1243
+ Annotated[StrictFloat, Field(gt=0)],
1244
+ Annotated[StrictFloat, Field(gt=0)]
1245
+ ]
1246
+ ] = None,
1247
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1248
+ _content_type: Optional[StrictStr] = None,
1249
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1250
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1251
+ ) -> ApiResponse[BaseResponseTagSearchResponse]:
1252
+ """Tags search
1253
+
1254
+ Searches for tags by there name
1255
+
1256
+ :param partial_name: The partial or full name of the tag to search for (required)
1257
+ :type partial_name: str
1258
+ :param page: The page number to retrieve.
1259
+ :type page: int
1260
+ :param page_size: Number of items per page.
1261
+ :type page_size: int
1262
+ :param _request_timeout: timeout setting for this request. If one
1263
+ number provided, it will be total request
1264
+ timeout. It can also be a pair (tuple) of
1265
+ (connection, read) timeouts.
1266
+ :type _request_timeout: int, tuple(int, int), optional
1267
+ :param _request_auth: set to override the auth_settings for an a single
1268
+ request; this effectively ignores the
1269
+ authentication in the spec for a single request.
1270
+ :type _request_auth: dict, optional
1271
+ :param _content_type: force content-type for the request.
1272
+ :type _content_type: str, Optional
1273
+ :param _headers: set to override the headers for a single
1274
+ request; this effectively ignores the headers
1275
+ in the spec for a single request.
1276
+ :type _headers: dict, optional
1277
+ :param _host_index: set to override the host_index for a single
1278
+ request; this effectively ignores the host_index
1279
+ in the spec for a single request.
1280
+ :type _host_index: int, optional
1281
+ :return: Returns the result object.
1282
+ """ # noqa: E501
1283
+
1284
+ _param = self._search_tags_serialize(
1285
+ partial_name=partial_name,
1286
+ page=page,
1287
+ page_size=page_size,
1288
+ _request_auth=_request_auth,
1289
+ _content_type=_content_type,
1290
+ _headers=_headers,
1291
+ _host_index=_host_index
1292
+ )
1293
+
1294
+ _response_types_map: Dict[str, Optional[str]] = {
1295
+ '200': "BaseResponseTagSearchResponse",
1296
+ '422': "BaseResponse",
1297
+ }
1298
+ response_data = self.api_client.call_api(
1299
+ *_param,
1300
+ _request_timeout=_request_timeout
1301
+ )
1302
+ response_data.read()
1303
+ return self.api_client.response_deserialize(
1304
+ response_data=response_data,
1305
+ response_types_map=_response_types_map,
1306
+ )
1307
+
1308
+
1309
+ @validate_call
1310
+ def search_tags_without_preload_content(
1311
+ self,
1312
+ partial_name: Annotated[StrictStr, Field(description="The partial or full name of the tag to search for")],
1313
+ page: Annotated[Optional[Annotated[int, Field(le=100000, strict=True, ge=1)]], Field(description="The page number to retrieve.")] = None,
1314
+ page_size: Annotated[Optional[Annotated[int, Field(strict=True, ge=1)]], Field(description="Number of items per page.")] = None,
1315
+ _request_timeout: Union[
1316
+ None,
1317
+ Annotated[StrictFloat, Field(gt=0)],
1318
+ Tuple[
1319
+ Annotated[StrictFloat, Field(gt=0)],
1320
+ Annotated[StrictFloat, Field(gt=0)]
1321
+ ]
1322
+ ] = None,
1323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1324
+ _content_type: Optional[StrictStr] = None,
1325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1327
+ ) -> RESTResponseType:
1328
+ """Tags search
1329
+
1330
+ Searches for tags by there name
1331
+
1332
+ :param partial_name: The partial or full name of the tag to search for (required)
1333
+ :type partial_name: str
1334
+ :param page: The page number to retrieve.
1335
+ :type page: int
1336
+ :param page_size: Number of items per page.
1337
+ :type page_size: int
1338
+ :param _request_timeout: timeout setting for this request. If one
1339
+ number provided, it will be total request
1340
+ timeout. It can also be a pair (tuple) of
1341
+ (connection, read) timeouts.
1342
+ :type _request_timeout: int, tuple(int, int), optional
1343
+ :param _request_auth: set to override the auth_settings for an a single
1344
+ request; this effectively ignores the
1345
+ authentication in the spec for a single request.
1346
+ :type _request_auth: dict, optional
1347
+ :param _content_type: force content-type for the request.
1348
+ :type _content_type: str, Optional
1349
+ :param _headers: set to override the headers for a single
1350
+ request; this effectively ignores the headers
1351
+ in the spec for a single request.
1352
+ :type _headers: dict, optional
1353
+ :param _host_index: set to override the host_index for a single
1354
+ request; this effectively ignores the host_index
1355
+ in the spec for a single request.
1356
+ :type _host_index: int, optional
1357
+ :return: Returns the result object.
1358
+ """ # noqa: E501
1359
+
1360
+ _param = self._search_tags_serialize(
1361
+ partial_name=partial_name,
1362
+ page=page,
1363
+ page_size=page_size,
1364
+ _request_auth=_request_auth,
1365
+ _content_type=_content_type,
1366
+ _headers=_headers,
1367
+ _host_index=_host_index
1368
+ )
1369
+
1370
+ _response_types_map: Dict[str, Optional[str]] = {
1371
+ '200': "BaseResponseTagSearchResponse",
1372
+ '422': "BaseResponse",
1373
+ }
1374
+ response_data = self.api_client.call_api(
1375
+ *_param,
1376
+ _request_timeout=_request_timeout
1377
+ )
1378
+ return response_data.response
1379
+
1380
+
1381
+ def _search_tags_serialize(
1382
+ self,
1383
+ partial_name,
1384
+ page,
1385
+ page_size,
1386
+ _request_auth,
1387
+ _content_type,
1388
+ _headers,
1389
+ _host_index,
1390
+ ) -> RequestSerialized:
1391
+
1392
+ _host = None
1393
+
1394
+ _collection_formats: Dict[str, str] = {
1395
+ }
1396
+
1397
+ _path_params: Dict[str, str] = {}
1398
+ _query_params: List[Tuple[str, str]] = []
1399
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1400
+ _form_params: List[Tuple[str, str]] = []
1401
+ _files: Dict[
1402
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1403
+ ] = {}
1404
+ _body_params: Optional[bytes] = None
1405
+
1406
+ # process the path parameters
1407
+ # process the query parameters
1408
+ if page is not None:
1409
+
1410
+ _query_params.append(('page', page))
1411
+
1412
+ if page_size is not None:
1413
+
1414
+ _query_params.append(('page_size', page_size))
1415
+
1416
+ if partial_name is not None:
1417
+
1418
+ _query_params.append(('partial_name', partial_name))
1419
+
1420
+ # process the header parameters
1421
+ # process the form parameters
1422
+ # process the body parameter
1423
+
1424
+
1425
+ # set the HTTP header `Accept`
1426
+ if 'Accept' not in _header_params:
1427
+ _header_params['Accept'] = self.api_client.select_header_accept(
1428
+ [
1429
+ 'application/json'
1430
+ ]
1431
+ )
1432
+
1433
+
1434
+ # authentication setting
1435
+ _auth_settings: List[str] = [
1436
+ 'APIKey'
1437
+ ]
1438
+
1439
+ return self.api_client.param_serialize(
1440
+ method='GET',
1441
+ resource_path='/v2/search/tags',
1442
+ path_params=_path_params,
1443
+ query_params=_query_params,
1444
+ header_params=_header_params,
1445
+ body=_body_params,
1446
+ post_params=_form_params,
1447
+ files=_files,
1448
+ auth_settings=_auth_settings,
1449
+ collection_formats=_collection_formats,
1450
+ _host=_host,
1451
+ _request_auth=_request_auth
1452
+ )
1453
+
1454
+