revengai 1.1.1__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 (741) hide show
  1. revengai/__init__.py +1035 -0
  2. revengai/api/__init__.py +58 -0
  3. revengai/api/analyses_comments_api.py +1260 -0
  4. revengai/api/analyses_core_api.py +4305 -0
  5. revengai/api/analyses_dynamic_execution_api.py +1991 -0
  6. revengai/api/analyses_results_metadata_api.py +2324 -0
  7. revengai/api/analyses_security_checks_api.py +909 -0
  8. revengai/api/authentication_users_api.py +1386 -0
  9. revengai/api/binaries_api.py +1702 -0
  10. revengai/api/collections_api.py +2222 -0
  11. revengai/api/confidence_api.py +1214 -0
  12. revengai/api/external_sources_api.py +1709 -0
  13. revengai/api/firmware_api.py +624 -0
  14. revengai/api/functions_ai_decompilation_api.py +2728 -0
  15. revengai/api/functions_block_comments_api.py +897 -0
  16. revengai/api/functions_core_api.py +2216 -0
  17. revengai/api/functions_data_types_api.py +1838 -0
  18. revengai/api/functions_decompilation_api.py +2097 -0
  19. revengai/api/functions_renaming_history_api.py +1214 -0
  20. revengai/api/functions_threat_score_api.py +610 -0
  21. revengai/api/models_api.py +303 -0
  22. revengai/api/search_api.py +1483 -0
  23. revengai/api/v1_api.py +6373 -0
  24. revengai/api_client.py +804 -0
  25. revengai/api_response.py +21 -0
  26. revengai/configuration.py +602 -0
  27. revengai/exceptions.py +216 -0
  28. revengai/models/__init__.py +631 -0
  29. revengai/models/addr.py +144 -0
  30. revengai/models/ai_decompilation_rating.py +37 -0
  31. revengai/models/analyse_created.py +99 -0
  32. revengai/models/analysis_access_info.py +89 -0
  33. revengai/models/analysis_config.py +107 -0
  34. revengai/models/analysis_create_request.py +132 -0
  35. revengai/models/analysis_create_response.py +89 -0
  36. revengai/models/analysis_detail_response.py +122 -0
  37. revengai/models/analysis_form.py +138 -0
  38. revengai/models/analysis_functions.py +95 -0
  39. revengai/models/analysis_record.py +123 -0
  40. revengai/models/analysis_scope.py +37 -0
  41. revengai/models/analysis_status.py +94 -0
  42. revengai/models/analysis_strings_response.py +97 -0
  43. revengai/models/analysis_threat_score_data.py +99 -0
  44. revengai/models/analysis_update_request.py +109 -0
  45. revengai/models/analysis_update_tags_request.py +87 -0
  46. revengai/models/analysis_update_tags_response.py +95 -0
  47. revengai/models/ann_function.py +121 -0
  48. revengai/models/ann_input.py +108 -0
  49. revengai/models/app_api_rest_v1_analyse_schema_model_name.py +44 -0
  50. revengai/models/app_api_rest_v1_analyse_schema_status.py +40 -0
  51. revengai/models/app_api_rest_v1_analyse_schema_symbols.py +97 -0
  52. revengai/models/app_api_rest_v1_analysis_info_responses_logs.py +99 -0
  53. revengai/models/app_api_rest_v1_analysis_info_schema_function_rename.py +88 -0
  54. revengai/models/app_api_rest_v1_ann_schema_ann_function.py +135 -0
  55. revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py +39 -0
  56. revengai/models/app_api_rest_v2_analyses_enums_model_name.py +43 -0
  57. revengai/models/app_api_rest_v2_analyses_enums_order_by.py +38 -0
  58. revengai/models/app_api_rest_v2_analyses_enums_status.py +41 -0
  59. revengai/models/app_api_rest_v2_analyses_responses_analysis_tags.py +104 -0
  60. revengai/models/app_api_rest_v2_analyses_responses_logs.py +87 -0
  61. revengai/models/app_api_rest_v2_analyses_responses_tag_item.py +96 -0
  62. revengai/models/app_api_rest_v2_analyses_schemas_symbols.py +97 -0
  63. revengai/models/app_api_rest_v2_collections_enums_order_by.py +41 -0
  64. revengai/models/app_api_rest_v2_functions_rename_schema_function_rename.py +94 -0
  65. revengai/models/app_api_rest_v2_functions_responses_function.py +89 -0
  66. revengai/models/app_api_rest_v2_functions_types_function.py +109 -0
  67. revengai/models/app_api_rest_v2_info_responses_analysis_tags.py +104 -0
  68. revengai/models/app_api_rest_v2_similarity_schema_ann_function.py +121 -0
  69. revengai/models/app_core_responses_base_base_response_analysis_tags1.py +126 -0
  70. revengai/models/app_core_responses_base_base_response_analysis_tags2.py +126 -0
  71. revengai/models/app_services_binary_ann_schema_tag_item.py +99 -0
  72. revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py +87 -0
  73. revengai/models/argument.py +100 -0
  74. revengai/models/base_response.py +125 -0
  75. revengai/models/base_response_analysis_create_response.py +126 -0
  76. revengai/models/base_response_analysis_detail_response.py +126 -0
  77. revengai/models/base_response_analysis_functions.py +126 -0
  78. revengai/models/base_response_analysis_strings_response.py +126 -0
  79. revengai/models/base_response_analysis_threat_score_data.py +126 -0
  80. revengai/models/base_response_analysis_update_tags_response.py +126 -0
  81. revengai/models/base_response_basic.py +126 -0
  82. revengai/models/base_response_binary_additional_response.py +126 -0
  83. revengai/models/base_response_binary_ann_list_response.py +126 -0
  84. revengai/models/base_response_binary_details_response.py +126 -0
  85. revengai/models/base_response_binary_externals_response.py +126 -0
  86. revengai/models/base_response_binary_search_response.py +126 -0
  87. revengai/models/base_response_block_comments_generation_for_function_response.py +126 -0
  88. revengai/models/base_response_block_comments_overview_generation_response.py +117 -0
  89. revengai/models/base_response_bool.py +122 -0
  90. revengai/models/base_response_box_plot_confidence.py +126 -0
  91. revengai/models/base_response_callees_caller_functions_response.py +126 -0
  92. revengai/models/base_response_capabilities.py +126 -0
  93. revengai/models/base_response_check_security_checks_task_response.py +126 -0
  94. revengai/models/base_response_child_binaries_response.py +126 -0
  95. revengai/models/base_response_collection_binaries_update_response.py +126 -0
  96. revengai/models/base_response_collection_response.py +126 -0
  97. revengai/models/base_response_collection_search_response.py +126 -0
  98. revengai/models/base_response_collection_tags_update_response.py +126 -0
  99. revengai/models/base_response_comment_response.py +126 -0
  100. revengai/models/base_response_communities.py +126 -0
  101. revengai/models/base_response_created.py +126 -0
  102. revengai/models/base_response_decompilation_response.py +126 -0
  103. revengai/models/base_response_dict.py +122 -0
  104. revengai/models/base_response_dynamic_execution_status.py +126 -0
  105. revengai/models/base_response_external_response.py +126 -0
  106. revengai/models/base_response_function_analysis_threat_score_data.py +126 -0
  107. revengai/models/base_response_function_blocks_response.py +126 -0
  108. revengai/models/base_response_function_capability_response.py +126 -0
  109. revengai/models/base_response_function_data_types.py +126 -0
  110. revengai/models/base_response_function_data_types_list.py +126 -0
  111. revengai/models/base_response_function_search_response.py +126 -0
  112. revengai/models/base_response_function_strings_response.py +126 -0
  113. revengai/models/base_response_function_task_response.py +126 -0
  114. revengai/models/base_response_function_threat_score.py +126 -0
  115. revengai/models/base_response_functions_detail_response.py +126 -0
  116. revengai/models/base_response_generate_function_data_types.py +126 -0
  117. revengai/models/base_response_generation_status_list.py +126 -0
  118. revengai/models/base_response_get_ai_decompilation_rating_response.py +126 -0
  119. revengai/models/base_response_get_ai_decompilation_task.py +126 -0
  120. revengai/models/base_response_get_public_user_response.py +126 -0
  121. revengai/models/base_response_get_user_response.py +126 -0
  122. revengai/models/base_response_list_collection_results.py +126 -0
  123. revengai/models/base_response_list_comment_response.py +130 -0
  124. revengai/models/base_response_list_die_match.py +130 -0
  125. revengai/models/base_response_list_function_box_plot_confidence.py +130 -0
  126. revengai/models/base_response_list_function_name_history.py +130 -0
  127. revengai/models/base_response_list_sbom.py +130 -0
  128. revengai/models/base_response_list_similar_functions_response.py +130 -0
  129. revengai/models/base_response_list_tag_origin_box_plot_confidence.py +130 -0
  130. revengai/models/base_response_list_user_activity_response.py +130 -0
  131. revengai/models/base_response_login_response.py +126 -0
  132. revengai/models/base_response_logs.py +126 -0
  133. revengai/models/base_response_models_response.py +126 -0
  134. revengai/models/base_response_nearest_neighbor_analysis.py +136 -0
  135. revengai/models/base_response_network_overview_response.py +126 -0
  136. revengai/models/base_response_params.py +126 -0
  137. revengai/models/base_response_process_dumps.py +126 -0
  138. revengai/models/base_response_process_registry.py +126 -0
  139. revengai/models/base_response_process_tree.py +126 -0
  140. revengai/models/base_response_queued_security_checks_task_response.py +126 -0
  141. revengai/models/base_response_recent.py +126 -0
  142. revengai/models/base_response_security_checks_response.py +126 -0
  143. revengai/models/base_response_status.py +126 -0
  144. revengai/models/base_response_str.py +122 -0
  145. revengai/models/base_response_symbols_info.py +126 -0
  146. revengai/models/base_response_tag_search_response.py +126 -0
  147. revengai/models/base_response_task_response.py +126 -0
  148. revengai/models/base_response_ttps.py +126 -0
  149. revengai/models/base_response_vulnerabilities.py +126 -0
  150. revengai/models/basic.py +108 -0
  151. revengai/models/batch_ann.py +106 -0
  152. revengai/models/batch_function_rename.py +95 -0
  153. revengai/models/batch_function_rename_record.py +90 -0
  154. revengai/models/binary_additional_details_data_response.py +113 -0
  155. revengai/models/binary_additional_response.py +106 -0
  156. revengai/models/binary_ann_form.py +94 -0
  157. revengai/models/binary_ann_list_response.py +95 -0
  158. revengai/models/binary_config.py +109 -0
  159. revengai/models/binary_details_response.py +126 -0
  160. revengai/models/binary_externals_response.py +96 -0
  161. revengai/models/binary_search_response.py +95 -0
  162. revengai/models/binary_search_result.py +109 -0
  163. revengai/models/binary_task_status.py +40 -0
  164. revengai/models/block.py +87 -0
  165. revengai/models/block_comments_generation_for_function_response.py +87 -0
  166. revengai/models/boundary.py +91 -0
  167. revengai/models/box_plot_confidence.py +99 -0
  168. revengai/models/callee_function_info.py +107 -0
  169. revengai/models/callees_caller_functions_response.py +107 -0
  170. revengai/models/caller_function_info.py +107 -0
  171. revengai/models/capabilities.py +95 -0
  172. revengai/models/capability.py +91 -0
  173. revengai/models/check_security_checks_task_response.py +88 -0
  174. revengai/models/child_binaries_response.py +105 -0
  175. revengai/models/code_signature_model.py +99 -0
  176. revengai/models/collection_binaries_update_request.py +87 -0
  177. revengai/models/collection_binaries_update_response.py +95 -0
  178. revengai/models/collection_binary_response.py +98 -0
  179. revengai/models/collection_count.py +99 -0
  180. revengai/models/collection_create_request.py +108 -0
  181. revengai/models/collection_list_item.py +113 -0
  182. revengai/models/collection_response.py +132 -0
  183. revengai/models/collection_response_binaries_inner.py +136 -0
  184. revengai/models/collection_scope.py +39 -0
  185. revengai/models/collection_search_response.py +95 -0
  186. revengai/models/collection_search_result.py +125 -0
  187. revengai/models/collection_tags_update_request.py +87 -0
  188. revengai/models/collection_tags_update_response.py +87 -0
  189. revengai/models/collection_update_request.py +107 -0
  190. revengai/models/collections_count_form.py +88 -0
  191. revengai/models/comment_base.py +87 -0
  192. revengai/models/comment_response.py +111 -0
  193. revengai/models/comment_update_request.py +87 -0
  194. revengai/models/communities.py +101 -0
  195. revengai/models/community_match_percentages.py +93 -0
  196. revengai/models/confidence_type.py +40 -0
  197. revengai/models/config_settings.py +101 -0
  198. revengai/models/context.py +142 -0
  199. revengai/models/create_ai_decompilation_request.py +87 -0
  200. revengai/models/created.py +91 -0
  201. revengai/models/decompilation_comment_context.py +99 -0
  202. revengai/models/decompilation_response.py +91 -0
  203. revengai/models/deleted_analysis.py +99 -0
  204. revengai/models/die_match.py +93 -0
  205. revengai/models/dynamic_execution_status_input.py +39 -0
  206. revengai/models/elf_dynamic_entry.py +89 -0
  207. revengai/models/elf_import_model.py +89 -0
  208. revengai/models/elf_model.py +180 -0
  209. revengai/models/elf_relocation.py +99 -0
  210. revengai/models/elf_section.py +105 -0
  211. revengai/models/elf_security.py +95 -0
  212. revengai/models/elf_segment.py +103 -0
  213. revengai/models/elf_symbol.py +99 -0
  214. revengai/models/entrypoint_model.py +89 -0
  215. revengai/models/enumeration.py +98 -0
  216. revengai/models/error_model.py +89 -0
  217. revengai/models/export_model.py +89 -0
  218. revengai/models/exported_binary_ann_result.py +111 -0
  219. revengai/models/external_response.py +92 -0
  220. revengai/models/file_format.py +38 -0
  221. revengai/models/file_hashes.py +141 -0
  222. revengai/models/file_metadata.py +97 -0
  223. revengai/models/file_options.py +41 -0
  224. revengai/models/filters.py +40 -0
  225. revengai/models/function_analysis_threat_score_data.py +99 -0
  226. revengai/models/function_batch_ann.py +106 -0
  227. revengai/models/function_block_destination_response.py +96 -0
  228. revengai/models/function_block_response.py +110 -0
  229. revengai/models/function_blocks_response.py +122 -0
  230. revengai/models/function_boundary.py +91 -0
  231. revengai/models/function_box_plot_confidence.py +93 -0
  232. revengai/models/function_capability_response.py +87 -0
  233. revengai/models/function_comment_create_request.py +93 -0
  234. revengai/models/function_data_types.py +107 -0
  235. revengai/models/function_data_types_list.py +99 -0
  236. revengai/models/function_data_types_list_item.py +109 -0
  237. revengai/models/function_data_types_params.py +87 -0
  238. revengai/models/function_data_types_status.py +91 -0
  239. revengai/models/function_dump.py +106 -0
  240. revengai/models/function_header.py +113 -0
  241. revengai/models/function_info_input.py +106 -0
  242. revengai/models/function_info_input_func_deps_inner.py +164 -0
  243. revengai/models/function_info_output.py +106 -0
  244. revengai/models/function_list.py +87 -0
  245. revengai/models/function_list_basic.py +99 -0
  246. revengai/models/function_local_variable_response.py +95 -0
  247. revengai/models/function_mapping_full.py +248 -0
  248. revengai/models/function_name_confidence_body.py +98 -0
  249. revengai/models/function_name_history.py +97 -0
  250. revengai/models/function_name_input.py +89 -0
  251. revengai/models/function_param_mapping.py +89 -0
  252. revengai/models/function_param_response.py +95 -0
  253. revengai/models/function_params.py +95 -0
  254. revengai/models/function_rename.py +94 -0
  255. revengai/models/function_rename_map.py +96 -0
  256. revengai/models/function_search_response.py +95 -0
  257. revengai/models/function_search_result.py +100 -0
  258. revengai/models/function_string.py +89 -0
  259. revengai/models/function_strings_response.py +97 -0
  260. revengai/models/function_task_response.py +95 -0
  261. revengai/models/function_task_status.py +40 -0
  262. revengai/models/function_threat_score.py +100 -0
  263. revengai/models/function_type_input.py +128 -0
  264. revengai/models/function_type_output.py +128 -0
  265. revengai/models/functions_detail_response.py +122 -0
  266. revengai/models/functions_list_rename.py +95 -0
  267. revengai/models/generate_function_data_types.py +95 -0
  268. revengai/models/generation_status_list.py +99 -0
  269. revengai/models/get_ai_decompilation_rating_response.py +88 -0
  270. revengai/models/get_ai_decompilation_task.py +153 -0
  271. revengai/models/get_public_user_response.py +89 -0
  272. revengai/models/get_user_response.py +100 -0
  273. revengai/models/global_variable.py +102 -0
  274. revengai/models/icon_model.py +92 -0
  275. revengai/models/import_model.py +89 -0
  276. revengai/models/inverse_function_map_item.py +100 -0
  277. revengai/models/inverse_string_map_item.py +94 -0
  278. revengai/models/inverse_value.py +87 -0
  279. revengai/models/isa.py +38 -0
  280. revengai/models/isa_options.py +39 -0
  281. revengai/models/list_collection_results.py +95 -0
  282. revengai/models/login_request.py +90 -0
  283. revengai/models/login_response.py +87 -0
  284. revengai/models/logs.py +87 -0
  285. revengai/models/meta_model.py +96 -0
  286. revengai/models/model_list.py +99 -0
  287. revengai/models/model_name.py +43 -0
  288. revengai/models/models_response.py +87 -0
  289. revengai/models/nearest_neighbor.py +106 -0
  290. revengai/models/network_overview_dns.py +99 -0
  291. revengai/models/network_overview_dns_answer.py +89 -0
  292. revengai/models/network_overview_metadata.py +100 -0
  293. revengai/models/network_overview_response.py +105 -0
  294. revengai/models/order.py +37 -0
  295. revengai/models/origin.py +43 -0
  296. revengai/models/pagination_model.py +91 -0
  297. revengai/models/params.py +104 -0
  298. revengai/models/pdb_debug_model.py +95 -0
  299. revengai/models/pe_model.py +216 -0
  300. revengai/models/platform.py +37 -0
  301. revengai/models/platform_options.py +40 -0
  302. revengai/models/process.py +104 -0
  303. revengai/models/process_dump.py +97 -0
  304. revengai/models/process_dump_metadata.py +91 -0
  305. revengai/models/process_dumps.py +93 -0
  306. revengai/models/process_dumps_data.py +97 -0
  307. revengai/models/process_registry.py +106 -0
  308. revengai/models/process_tree.py +97 -0
  309. revengai/models/queued_security_checks_task_response.py +87 -0
  310. revengai/models/quick_search.py +99 -0
  311. revengai/models/re_analysis_form.py +102 -0
  312. revengai/models/recent.py +95 -0
  313. revengai/models/recent_analysis.py +99 -0
  314. revengai/models/recent_analysis_form.py +92 -0
  315. revengai/models/registry.py +103 -0
  316. revengai/models/relative_binary_response.py +91 -0
  317. revengai/models/rename.py +99 -0
  318. revengai/models/sandbox_options.py +89 -0
  319. revengai/models/sbom.py +97 -0
  320. revengai/models/sbom_package.py +89 -0
  321. revengai/models/scope.py +39 -0
  322. revengai/models/scrape_third_party_config.py +87 -0
  323. revengai/models/search_binary_ids.py +138 -0
  324. revengai/models/search_form.py +97 -0
  325. revengai/models/search_function_ids.py +138 -0
  326. revengai/models/search_query.py +99 -0
  327. revengai/models/section_model.py +97 -0
  328. revengai/models/security_checks_response.py +99 -0
  329. revengai/models/security_checks_result.py +104 -0
  330. revengai/models/security_model.py +107 -0
  331. revengai/models/severity_type.py +41 -0
  332. revengai/models/similar_functions_response.py +101 -0
  333. revengai/models/single_code_certificate_model.py +97 -0
  334. revengai/models/single_code_signature_model.py +97 -0
  335. revengai/models/single_pdb_entry_model.py +91 -0
  336. revengai/models/single_section_model.py +99 -0
  337. revengai/models/stack_variable.py +102 -0
  338. revengai/models/status_input.py +41 -0
  339. revengai/models/status_output.py +89 -0
  340. revengai/models/string_functions.py +97 -0
  341. revengai/models/structure.py +118 -0
  342. revengai/models/structure_member.py +100 -0
  343. revengai/models/symbols.py +97 -0
  344. revengai/models/symbols_info.py +103 -0
  345. revengai/models/tag_confidence_body.py +96 -0
  346. revengai/models/tag_input.py +87 -0
  347. revengai/models/tag_origin_box_plot_confidence.py +97 -0
  348. revengai/models/tag_output.py +89 -0
  349. revengai/models/tag_response.py +89 -0
  350. revengai/models/tag_search_response.py +95 -0
  351. revengai/models/tag_search_result.py +89 -0
  352. revengai/models/tags.py +90 -0
  353. revengai/models/task_response.py +95 -0
  354. revengai/models/task_status.py +40 -0
  355. revengai/models/threat_score_function_body.py +88 -0
  356. revengai/models/timestamp_model.py +91 -0
  357. revengai/models/ttps.py +93 -0
  358. revengai/models/ttps_attack.py +89 -0
  359. revengai/models/ttps_data.py +97 -0
  360. revengai/models/ttps_element.py +109 -0
  361. revengai/models/ttps_occurance.py +89 -0
  362. revengai/models/type_definition.py +98 -0
  363. revengai/models/update_function_data_types.py +93 -0
  364. revengai/models/upload_success.py +106 -0
  365. revengai/models/upsert_ai_decomplation_rating_request.py +88 -0
  366. revengai/models/user_activity_response.py +98 -0
  367. revengai/models/user_boundaries.py +91 -0
  368. revengai/models/vulnerabilities.py +95 -0
  369. revengai/models/vulnerability.py +114 -0
  370. revengai/models/vulnerability_type.py +41 -0
  371. revengai/models/workspace.py +38 -0
  372. revengai/py.typed +0 -0
  373. revengai/rest.py +258 -0
  374. revengai/test/__init__.py +0 -0
  375. revengai/test/test_addr.py +50 -0
  376. revengai/test/test_ai_decompilation_rating.py +33 -0
  377. revengai/test/test_analyse_created.py +53 -0
  378. revengai/test/test_analyses_comments_api.py +59 -0
  379. revengai/test/test_analyses_core_api.py +136 -0
  380. revengai/test/test_analyses_dynamic_execution_api.py +80 -0
  381. revengai/test/test_analyses_results_metadata_api.py +143 -0
  382. revengai/test/test_analyses_security_checks_api.py +52 -0
  383. revengai/test/test_analysis_access_info.py +54 -0
  384. revengai/test/test_analysis_config.py +60 -0
  385. revengai/test/test_analysis_create_request.py +83 -0
  386. revengai/test/test_analysis_create_response.py +54 -0
  387. revengai/test/test_analysis_detail_response.py +83 -0
  388. revengai/test/test_analysis_form.py +81 -0
  389. revengai/test/test_analysis_functions.py +78 -0
  390. revengai/test/test_analysis_record.py +74 -0
  391. revengai/test/test_analysis_scope.py +33 -0
  392. revengai/test/test_analysis_status.py +53 -0
  393. revengai/test/test_analysis_strings_response.py +70 -0
  394. revengai/test/test_analysis_threat_score_data.py +64 -0
  395. revengai/test/test_analysis_update_request.py +52 -0
  396. revengai/test/test_analysis_update_tags_request.py +56 -0
  397. revengai/test/test_analysis_update_tags_response.py +60 -0
  398. revengai/test/test_ann_function.py +61 -0
  399. revengai/test/test_ann_input.py +56 -0
  400. revengai/test/test_app_api_rest_v1_analyse_schema_model_name.py +33 -0
  401. revengai/test/test_app_api_rest_v1_analyse_schema_status.py +33 -0
  402. revengai/test/test_app_api_rest_v1_analyse_schema_symbols.py +57 -0
  403. revengai/test/test_app_api_rest_v1_analysis_info_responses_logs.py +53 -0
  404. revengai/test/test_app_api_rest_v1_analysis_info_schema_function_rename.py +52 -0
  405. revengai/test/test_app_api_rest_v1_ann_schema_ann_function.py +74 -0
  406. revengai/test/test_app_api_rest_v2_analyses_enums_dynamic_execution_status.py +33 -0
  407. revengai/test/test_app_api_rest_v2_analyses_enums_model_name.py +33 -0
  408. revengai/test/test_app_api_rest_v2_analyses_enums_order_by.py +33 -0
  409. revengai/test/test_app_api_rest_v2_analyses_enums_status.py +33 -0
  410. revengai/test/test_app_api_rest_v2_analyses_responses_analysis_tags.py +74 -0
  411. revengai/test/test_app_api_rest_v2_analyses_responses_logs.py +52 -0
  412. revengai/test/test_app_api_rest_v2_analyses_responses_tag_item.py +55 -0
  413. revengai/test/test_app_api_rest_v2_analyses_schemas_symbols.py +57 -0
  414. revengai/test/test_app_api_rest_v2_collections_enums_order_by.py +33 -0
  415. revengai/test/test_app_api_rest_v2_functions_rename_schema_function_rename.py +52 -0
  416. revengai/test/test_app_api_rest_v2_functions_responses_function.py +54 -0
  417. revengai/test/test_app_api_rest_v2_functions_types_function.py +72 -0
  418. revengai/test/test_app_api_rest_v2_info_responses_analysis_tags.py +70 -0
  419. revengai/test/test_app_api_rest_v2_similarity_schema_ann_function.py +61 -0
  420. revengai/test/test_app_core_responses_base_base_response_analysis_tags1.py +73 -0
  421. revengai/test/test_app_core_responses_base_base_response_analysis_tags2.py +75 -0
  422. revengai/test/test_app_services_binary_ann_schema_tag_item.py +52 -0
  423. revengai/test/test_app_services_dynamic_execution_schemas_dynamic_execution_status.py +52 -0
  424. revengai/test/test_argument.py +59 -0
  425. revengai/test/test_authentication_users_api.py +66 -0
  426. revengai/test/test_base_response.py +63 -0
  427. revengai/test/test_base_response_analysis_create_response.py +65 -0
  428. revengai/test/test_base_response_analysis_detail_response.py +81 -0
  429. revengai/test/test_base_response_analysis_functions.py +77 -0
  430. revengai/test/test_base_response_analysis_strings_response.py +73 -0
  431. revengai/test/test_base_response_analysis_threat_score_data.py +70 -0
  432. revengai/test/test_base_response_analysis_update_tags_response.py +68 -0
  433. revengai/test/test_base_response_basic.py +74 -0
  434. revengai/test/test_base_response_binary_additional_response.py +259 -0
  435. revengai/test/test_base_response_binary_ann_list_response.py +83 -0
  436. revengai/test/test_base_response_binary_details_response.py +83 -0
  437. revengai/test/test_base_response_binary_externals_response.py +72 -0
  438. revengai/test/test_base_response_binary_search_response.py +77 -0
  439. revengai/test/test_base_response_block_comments_generation_for_function_response.py +64 -0
  440. revengai/test/test_base_response_block_comments_overview_generation_response.py +63 -0
  441. revengai/test/test_base_response_bool.py +63 -0
  442. revengai/test/test_base_response_box_plot_confidence.py +70 -0
  443. revengai/test/test_base_response_callees_caller_functions_response.py +82 -0
  444. revengai/test/test_base_response_capabilities.py +71 -0
  445. revengai/test/test_base_response_check_security_checks_task_response.py +64 -0
  446. revengai/test/test_base_response_child_binaries_response.py +73 -0
  447. revengai/test/test_base_response_collection_binaries_update_response.py +72 -0
  448. revengai/test/test_base_response_collection_response.py +78 -0
  449. revengai/test/test_base_response_collection_search_response.py +80 -0
  450. revengai/test/test_base_response_collection_tags_update_response.py +66 -0
  451. revengai/test/test_base_response_comment_response.py +71 -0
  452. revengai/test/test_base_response_communities.py +77 -0
  453. revengai/test/test_base_response_created.py +66 -0
  454. revengai/test/test_base_response_decompilation_response.py +66 -0
  455. revengai/test/test_base_response_dict.py +65 -0
  456. revengai/test/test_base_response_dynamic_execution_status.py +64 -0
  457. revengai/test/test_base_response_external_response.py +68 -0
  458. revengai/test/test_base_response_function_analysis_threat_score_data.py +70 -0
  459. revengai/test/test_base_response_function_blocks_response.py +96 -0
  460. revengai/test/test_base_response_function_capability_response.py +66 -0
  461. revengai/test/test_base_response_function_data_types.py +99 -0
  462. revengai/test/test_base_response_function_data_types_list.py +105 -0
  463. revengai/test/test_base_response_function_search_response.py +73 -0
  464. revengai/test/test_base_response_function_strings_response.py +69 -0
  465. revengai/test/test_base_response_function_task_response.py +65 -0
  466. revengai/test/test_base_response_function_threat_score.py +73 -0
  467. revengai/test/test_base_response_functions_detail_response.py +78 -0
  468. revengai/test/test_base_response_generate_function_data_types.py +74 -0
  469. revengai/test/test_base_response_generation_status_list.py +71 -0
  470. revengai/test/test_base_response_get_ai_decompilation_rating_response.py +64 -0
  471. revengai/test/test_base_response_get_ai_decompilation_task.py +118 -0
  472. revengai/test/test_base_response_get_public_user_response.py +65 -0
  473. revengai/test/test_base_response_get_user_response.py +70 -0
  474. revengai/test/test_base_response_list_collection_results.py +79 -0
  475. revengai/test/test_base_response_list_comment_response.py +73 -0
  476. revengai/test/test_base_response_list_die_match.py +69 -0
  477. revengai/test/test_base_response_list_function_box_plot_confidence.py +74 -0
  478. revengai/test/test_base_response_list_function_name_history.py +71 -0
  479. revengai/test/test_base_response_list_sbom.py +73 -0
  480. revengai/test/test_base_response_list_similar_functions_response.py +77 -0
  481. revengai/test/test_base_response_list_tag_origin_box_plot_confidence.py +76 -0
  482. revengai/test/test_base_response_list_user_activity_response.py +71 -0
  483. revengai/test/test_base_response_login_response.py +64 -0
  484. revengai/test/test_base_response_logs.py +64 -0
  485. revengai/test/test_base_response_models_response.py +66 -0
  486. revengai/test/test_base_response_nearest_neighbor_analysis.py +75 -0
  487. revengai/test/test_base_response_network_overview_response.py +80 -0
  488. revengai/test/test_base_response_params.py +70 -0
  489. revengai/test/test_base_response_process_dumps.py +76 -0
  490. revengai/test/test_base_response_process_registry.py +73 -0
  491. revengai/test/test_base_response_process_tree.py +78 -0
  492. revengai/test/test_base_response_queued_security_checks_task_response.py +64 -0
  493. revengai/test/test_base_response_recent.py +79 -0
  494. revengai/test/test_base_response_security_checks_response.py +76 -0
  495. revengai/test/test_base_response_status.py +65 -0
  496. revengai/test/test_base_response_str.py +63 -0
  497. revengai/test/test_base_response_symbols_info.py +68 -0
  498. revengai/test/test_base_response_tag_search_response.py +68 -0
  499. revengai/test/test_base_response_task_response.py +65 -0
  500. revengai/test/test_base_response_ttps.py +81 -0
  501. revengai/test/test_base_response_vulnerabilities.py +77 -0
  502. revengai/test/test_basic.py +72 -0
  503. revengai/test/test_batch_ann.py +55 -0
  504. revengai/test/test_batch_function_rename.py +60 -0
  505. revengai/test/test_batch_function_rename_record.py +54 -0
  506. revengai/test/test_binaries_api.py +73 -0
  507. revengai/test/test_binary_additional_details_data_response.py +256 -0
  508. revengai/test/test_binary_additional_response.py +441 -0
  509. revengai/test/test_binary_ann_form.py +58 -0
  510. revengai/test/test_binary_ann_list_response.py +90 -0
  511. revengai/test/test_binary_config.py +53 -0
  512. revengai/test/test_binary_details_response.py +90 -0
  513. revengai/test/test_binary_externals_response.py +68 -0
  514. revengai/test/test_binary_search_response.py +78 -0
  515. revengai/test/test_binary_search_result.py +72 -0
  516. revengai/test/test_binary_task_status.py +33 -0
  517. revengai/test/test_block.py +52 -0
  518. revengai/test/test_block_comments_generation_for_function_response.py +52 -0
  519. revengai/test/test_boundary.py +56 -0
  520. revengai/test/test_box_plot_confidence.py +64 -0
  521. revengai/test/test_callee_function_info.py +61 -0
  522. revengai/test/test_callees_caller_functions_response.py +87 -0
  523. revengai/test/test_caller_function_info.py +61 -0
  524. revengai/test/test_capabilities.py +66 -0
  525. revengai/test/test_capability.py +60 -0
  526. revengai/test/test_check_security_checks_task_response.py +52 -0
  527. revengai/test/test_child_binaries_response.py +66 -0
  528. revengai/test/test_code_signature_model.py +80 -0
  529. revengai/test/test_collection_binaries_update_request.py +56 -0
  530. revengai/test/test_collection_binaries_update_response.py +68 -0
  531. revengai/test/test_collection_binary_response.py +62 -0
  532. revengai/test/test_collection_count.py +53 -0
  533. revengai/test/test_collection_create_request.py +63 -0
  534. revengai/test/test_collection_list_item.py +72 -0
  535. revengai/test/test_collection_response.py +73 -0
  536. revengai/test/test_collection_response_binaries_inner.py +62 -0
  537. revengai/test/test_collection_scope.py +33 -0
  538. revengai/test/test_collection_search_response.py +84 -0
  539. revengai/test/test_collection_search_result.py +73 -0
  540. revengai/test/test_collection_tags_update_request.py +56 -0
  541. revengai/test/test_collection_tags_update_response.py +56 -0
  542. revengai/test/test_collection_update_request.py +53 -0
  543. revengai/test/test_collections_api.py +80 -0
  544. revengai/test/test_collections_count_form.py +52 -0
  545. revengai/test/test_comment_base.py +52 -0
  546. revengai/test/test_comment_response.py +65 -0
  547. revengai/test/test_comment_update_request.py +52 -0
  548. revengai/test/test_communities.py +78 -0
  549. revengai/test/test_community_match_percentages.py +58 -0
  550. revengai/test/test_confidence_api.py +59 -0
  551. revengai/test/test_confidence_type.py +33 -0
  552. revengai/test/test_config_settings.py +70 -0
  553. revengai/test/test_context.py +54 -0
  554. revengai/test/test_create_ai_decompilation_request.py +52 -0
  555. revengai/test/test_created.py +56 -0
  556. revengai/test/test_decompilation_comment_context.py +54 -0
  557. revengai/test/test_decompilation_response.py +56 -0
  558. revengai/test/test_deleted_analysis.py +52 -0
  559. revengai/test/test_die_match.py +58 -0
  560. revengai/test/test_dynamic_execution_status_input.py +33 -0
  561. revengai/test/test_elf_dynamic_entry.py +54 -0
  562. revengai/test/test_elf_import_model.py +58 -0
  563. revengai/test/test_elf_model.py +236 -0
  564. revengai/test/test_elf_relocation.py +64 -0
  565. revengai/test/test_elf_section.py +70 -0
  566. revengai/test/test_elf_security.py +60 -0
  567. revengai/test/test_elf_segment.py +68 -0
  568. revengai/test/test_elf_symbol.py +64 -0
  569. revengai/test/test_entrypoint_model.py +54 -0
  570. revengai/test/test_enumeration.py +60 -0
  571. revengai/test/test_error_model.py +54 -0
  572. revengai/test/test_export_model.py +62 -0
  573. revengai/test/test_exported_binary_ann_result.py +79 -0
  574. revengai/test/test_external_response.py +60 -0
  575. revengai/test/test_external_sources_api.py +73 -0
  576. revengai/test/test_file_format.py +33 -0
  577. revengai/test/test_file_hashes.py +66 -0
  578. revengai/test/test_file_metadata.py +74 -0
  579. revengai/test/test_file_options.py +33 -0
  580. revengai/test/test_filters.py +33 -0
  581. revengai/test/test_firmware_api.py +45 -0
  582. revengai/test/test_function_analysis_threat_score_data.py +64 -0
  583. revengai/test/test_function_batch_ann.py +55 -0
  584. revengai/test/test_function_block_destination_response.py +56 -0
  585. revengai/test/test_function_block_response.py +75 -0
  586. revengai/test/test_function_blocks_response.py +116 -0
  587. revengai/test/test_function_boundary.py +56 -0
  588. revengai/test/test_function_box_plot_confidence.py +68 -0
  589. revengai/test/test_function_capability_response.py +56 -0
  590. revengai/test/test_function_comment_create_request.py +55 -0
  591. revengai/test/test_function_data_types.py +88 -0
  592. revengai/test/test_function_data_types_list.py +132 -0
  593. revengai/test/test_function_data_types_list_item.py +90 -0
  594. revengai/test/test_function_data_types_params.py +56 -0
  595. revengai/test/test_function_data_types_status.py +56 -0
  596. revengai/test/test_function_dump.py +55 -0
  597. revengai/test/test_function_header.py +73 -0
  598. revengai/test/test_function_info_input.py +85 -0
  599. revengai/test/test_function_info_input_func_deps_inner.py +66 -0
  600. revengai/test/test_function_info_output.py +85 -0
  601. revengai/test/test_function_list.py +56 -0
  602. revengai/test/test_function_list_basic.py +53 -0
  603. revengai/test/test_function_local_variable_response.py +60 -0
  604. revengai/test/test_function_mapping_full.py +148 -0
  605. revengai/test/test_function_name_confidence_body.py +56 -0
  606. revengai/test/test_function_name_history.py +62 -0
  607. revengai/test/test_function_name_input.py +54 -0
  608. revengai/test/test_function_param_mapping.py +54 -0
  609. revengai/test/test_function_param_response.py +60 -0
  610. revengai/test/test_function_params.py +60 -0
  611. revengai/test/test_function_rename.py +52 -0
  612. revengai/test/test_function_rename_map.py +55 -0
  613. revengai/test/test_function_search_response.py +70 -0
  614. revengai/test/test_function_search_result.py +64 -0
  615. revengai/test/test_function_string.py +54 -0
  616. revengai/test/test_function_strings_response.py +62 -0
  617. revengai/test/test_function_task_response.py +52 -0
  618. revengai/test/test_function_task_status.py +33 -0
  619. revengai/test/test_function_threat_score.py +70 -0
  620. revengai/test/test_function_type_input.py +95 -0
  621. revengai/test/test_function_type_output.py +95 -0
  622. revengai/test/test_functions_ai_decompilation_api.py +108 -0
  623. revengai/test/test_functions_block_comments_api.py +73 -0
  624. revengai/test/test_functions_core_api.py +87 -0
  625. revengai/test/test_functions_data_types_api.py +101 -0
  626. revengai/test/test_functions_decompilation_api.py +80 -0
  627. revengai/test/test_functions_detail_response.py +74 -0
  628. revengai/test/test_functions_list_rename.py +62 -0
  629. revengai/test/test_functions_renaming_history_api.py +59 -0
  630. revengai/test/test_functions_threat_score_api.py +59 -0
  631. revengai/test/test_generate_function_data_types.py +72 -0
  632. revengai/test/test_generation_status_list.py +64 -0
  633. revengai/test/test_get_ai_decompilation_rating_response.py +52 -0
  634. revengai/test/test_get_ai_decompilation_task.py +157 -0
  635. revengai/test/test_get_public_user_response.py +54 -0
  636. revengai/test/test_get_user_response.py +64 -0
  637. revengai/test/test_global_variable.py +60 -0
  638. revengai/test/test_icon_model.py +52 -0
  639. revengai/test/test_import_model.py +66 -0
  640. revengai/test/test_inverse_function_map_item.py +55 -0
  641. revengai/test/test_inverse_string_map_item.py +54 -0
  642. revengai/test/test_inverse_value.py +52 -0
  643. revengai/test/test_isa.py +33 -0
  644. revengai/test/test_isa_options.py +33 -0
  645. revengai/test/test_list_collection_results.py +82 -0
  646. revengai/test/test_login_request.py +54 -0
  647. revengai/test/test_login_response.py +52 -0
  648. revengai/test/test_logs.py +52 -0
  649. revengai/test/test_meta_model.py +54 -0
  650. revengai/test/test_model_list.py +53 -0
  651. revengai/test/test_model_name.py +33 -0
  652. revengai/test/test_models_api.py +38 -0
  653. revengai/test/test_models_response.py +56 -0
  654. revengai/test/test_nearest_neighbor.py +66 -0
  655. revengai/test/test_network_overview_dns.py +64 -0
  656. revengai/test/test_network_overview_dns_answer.py +54 -0
  657. revengai/test/test_network_overview_metadata.py +58 -0
  658. revengai/test/test_network_overview_response.py +84 -0
  659. revengai/test/test_order.py +33 -0
  660. revengai/test/test_origin.py +33 -0
  661. revengai/test/test_pagination_model.py +56 -0
  662. revengai/test/test_params.py +64 -0
  663. revengai/test/test_pdb_debug_model.py +62 -0
  664. revengai/test/test_pe_model.py +220 -0
  665. revengai/test/test_platform.py +33 -0
  666. revengai/test/test_platform_options.py +33 -0
  667. revengai/test/test_process.py +72 -0
  668. revengai/test/test_process_dump.py +64 -0
  669. revengai/test/test_process_dump_metadata.py +56 -0
  670. revengai/test/test_process_dumps.py +76 -0
  671. revengai/test/test_process_dumps_data.py +72 -0
  672. revengai/test/test_process_registry.py +70 -0
  673. revengai/test/test_process_tree.py +80 -0
  674. revengai/test/test_queued_security_checks_task_response.py +52 -0
  675. revengai/test/test_quick_search.py +53 -0
  676. revengai/test/test_re_analysis_form.py +58 -0
  677. revengai/test/test_recent.py +82 -0
  678. revengai/test/test_recent_analysis.py +53 -0
  679. revengai/test/test_recent_analysis_form.py +53 -0
  680. revengai/test/test_registry.py +58 -0
  681. revengai/test/test_relative_binary_response.py +56 -0
  682. revengai/test/test_rename.py +53 -0
  683. revengai/test/test_sandbox_options.py +52 -0
  684. revengai/test/test_sbom.py +66 -0
  685. revengai/test/test_sbom_package.py +54 -0
  686. revengai/test/test_scope.py +33 -0
  687. revengai/test/test_scrape_third_party_config.py +51 -0
  688. revengai/test/test_search_api.py +59 -0
  689. revengai/test/test_search_binary_ids.py +50 -0
  690. revengai/test/test_search_form.py +56 -0
  691. revengai/test/test_search_function_ids.py +50 -0
  692. revengai/test/test_search_query.py +52 -0
  693. revengai/test/test_section_model.py +72 -0
  694. revengai/test/test_security_checks_response.py +76 -0
  695. revengai/test/test_security_checks_result.py +66 -0
  696. revengai/test/test_security_model.py +72 -0
  697. revengai/test/test_severity_type.py +33 -0
  698. revengai/test/test_similar_functions_response.py +74 -0
  699. revengai/test/test_single_code_certificate_model.py +62 -0
  700. revengai/test/test_single_code_signature_model.py +70 -0
  701. revengai/test/test_single_pdb_entry_model.py +56 -0
  702. revengai/test/test_single_section_model.py +64 -0
  703. revengai/test/test_stack_variable.py +61 -0
  704. revengai/test/test_status_input.py +33 -0
  705. revengai/test/test_status_output.py +54 -0
  706. revengai/test/test_string_functions.py +62 -0
  707. revengai/test/test_structure.py +71 -0
  708. revengai/test/test_structure_member.py +59 -0
  709. revengai/test/test_symbols.py +57 -0
  710. revengai/test/test_symbols_info.py +55 -0
  711. revengai/test/test_tag_confidence_body.py +60 -0
  712. revengai/test/test_tag_input.py +52 -0
  713. revengai/test/test_tag_origin_box_plot_confidence.py +72 -0
  714. revengai/test/test_tag_output.py +54 -0
  715. revengai/test/test_tag_response.py +54 -0
  716. revengai/test/test_tag_search_response.py +60 -0
  717. revengai/test/test_tag_search_result.py +54 -0
  718. revengai/test/test_tags.py +54 -0
  719. revengai/test/test_task_response.py +52 -0
  720. revengai/test/test_task_status.py +33 -0
  721. revengai/test/test_threat_score_function_body.py +53 -0
  722. revengai/test/test_timestamp_model.py +56 -0
  723. revengai/test/test_ttps.py +86 -0
  724. revengai/test/test_ttps_attack.py +54 -0
  725. revengai/test/test_ttps_data.py +82 -0
  726. revengai/test/test_ttps_element.py +74 -0
  727. revengai/test/test_ttps_occurance.py +54 -0
  728. revengai/test/test_type_definition.py +56 -0
  729. revengai/test/test_update_function_data_types.py +118 -0
  730. revengai/test/test_upload_success.py +54 -0
  731. revengai/test/test_upsert_ai_decomplation_rating_request.py +52 -0
  732. revengai/test/test_user_activity_response.py +62 -0
  733. revengai/test/test_user_boundaries.py +56 -0
  734. revengai/test/test_v1_api.py +185 -0
  735. revengai/test/test_vulnerabilities.py +78 -0
  736. revengai/test/test_vulnerability.py +71 -0
  737. revengai/test/test_vulnerability_type.py +33 -0
  738. revengai/test/test_workspace.py +33 -0
  739. revengai-1.1.1.dist-info/METADATA +470 -0
  740. revengai-1.1.1.dist-info/RECORD +741 -0
  741. revengai-1.1.1.dist-info/WHEEL +4 -0
@@ -0,0 +1,2222 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ RevEng.AI API
5
+
6
+ RevEng.AI is Similarity Search Engine for executable binaries
7
+
8
+ The version of the OpenAPI document: 0.0.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBool, StrictInt, StrictStr
20
+ from typing import List, Optional
21
+ from typing_extensions import Annotated
22
+ from revengai.models.app_api_rest_v2_collections_enums_order_by import AppApiRestV2CollectionsEnumsOrderBy
23
+ from revengai.models.base_response_bool import BaseResponseBool
24
+ from revengai.models.base_response_collection_binaries_update_response import BaseResponseCollectionBinariesUpdateResponse
25
+ from revengai.models.base_response_collection_response import BaseResponseCollectionResponse
26
+ from revengai.models.base_response_collection_tags_update_response import BaseResponseCollectionTagsUpdateResponse
27
+ from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults
28
+ from revengai.models.collection_binaries_update_request import CollectionBinariesUpdateRequest
29
+ from revengai.models.collection_create_request import CollectionCreateRequest
30
+ from revengai.models.collection_tags_update_request import CollectionTagsUpdateRequest
31
+ from revengai.models.collection_update_request import CollectionUpdateRequest
32
+ from revengai.models.filters import Filters
33
+ from revengai.models.order import Order
34
+
35
+ from revengai.api_client import ApiClient, RequestSerialized
36
+ from revengai.api_response import ApiResponse
37
+ from revengai.rest import RESTResponseType
38
+
39
+
40
+ class CollectionsApi:
41
+ """NOTE: This class is auto generated by OpenAPI Generator
42
+ Ref: https://openapi-generator.tech
43
+
44
+ Do not edit the class manually.
45
+ """
46
+
47
+ def __init__(self, api_client=None) -> None:
48
+ if api_client is None:
49
+ api_client = ApiClient.get_default()
50
+ self.api_client = api_client
51
+
52
+
53
+ @validate_call
54
+ def create_collection(
55
+ self,
56
+ collection_create_request: CollectionCreateRequest,
57
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
58
+ _request_timeout: Union[
59
+ None,
60
+ Annotated[StrictFloat, Field(gt=0)],
61
+ Tuple[
62
+ Annotated[StrictFloat, Field(gt=0)],
63
+ Annotated[StrictFloat, Field(gt=0)]
64
+ ]
65
+ ] = None,
66
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
+ _content_type: Optional[StrictStr] = None,
68
+ _headers: Optional[Dict[StrictStr, Any]] = None,
69
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
+ ) -> BaseResponseCollectionResponse:
71
+ """Creates new collection information
72
+
73
+ A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response.
74
+
75
+ :param collection_create_request: (required)
76
+ :type collection_create_request: CollectionCreateRequest
77
+ :param authorization: API Key bearer token
78
+ :type authorization: str
79
+ :param _request_timeout: timeout setting for this request. If one
80
+ number provided, it will be total request
81
+ timeout. It can also be a pair (tuple) of
82
+ (connection, read) timeouts.
83
+ :type _request_timeout: int, tuple(int, int), optional
84
+ :param _request_auth: set to override the auth_settings for an a single
85
+ request; this effectively ignores the
86
+ authentication in the spec for a single request.
87
+ :type _request_auth: dict, optional
88
+ :param _content_type: force content-type for the request.
89
+ :type _content_type: str, Optional
90
+ :param _headers: set to override the headers for a single
91
+ request; this effectively ignores the headers
92
+ in the spec for a single request.
93
+ :type _headers: dict, optional
94
+ :param _host_index: set to override the host_index for a single
95
+ request; this effectively ignores the host_index
96
+ in the spec for a single request.
97
+ :type _host_index: int, optional
98
+ :return: Returns the result object.
99
+ """ # noqa: E501
100
+
101
+ _param = self._create_collection_serialize(
102
+ collection_create_request=collection_create_request,
103
+ authorization=authorization,
104
+ _request_auth=_request_auth,
105
+ _content_type=_content_type,
106
+ _headers=_headers,
107
+ _host_index=_host_index
108
+ )
109
+
110
+ _response_types_map: Dict[str, Optional[str]] = {
111
+ '200': "BaseResponseCollectionResponse",
112
+ '422': "BaseResponse",
113
+ }
114
+ response_data = self.api_client.call_api(
115
+ *_param,
116
+ _request_timeout=_request_timeout
117
+ )
118
+ response_data.read()
119
+ return self.api_client.response_deserialize(
120
+ response_data=response_data,
121
+ response_types_map=_response_types_map,
122
+ ).data
123
+
124
+
125
+ @validate_call
126
+ def create_collection_with_http_info(
127
+ self,
128
+ collection_create_request: CollectionCreateRequest,
129
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
130
+ _request_timeout: Union[
131
+ None,
132
+ Annotated[StrictFloat, Field(gt=0)],
133
+ Tuple[
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Annotated[StrictFloat, Field(gt=0)]
136
+ ]
137
+ ] = None,
138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
139
+ _content_type: Optional[StrictStr] = None,
140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
142
+ ) -> ApiResponse[BaseResponseCollectionResponse]:
143
+ """Creates new collection information
144
+
145
+ A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response.
146
+
147
+ :param collection_create_request: (required)
148
+ :type collection_create_request: CollectionCreateRequest
149
+ :param authorization: API Key bearer token
150
+ :type authorization: str
151
+ :param _request_timeout: timeout setting for this request. If one
152
+ number provided, it will be total request
153
+ timeout. It can also be a pair (tuple) of
154
+ (connection, read) timeouts.
155
+ :type _request_timeout: int, tuple(int, int), optional
156
+ :param _request_auth: set to override the auth_settings for an a single
157
+ request; this effectively ignores the
158
+ authentication in the spec for a single request.
159
+ :type _request_auth: dict, optional
160
+ :param _content_type: force content-type for the request.
161
+ :type _content_type: str, Optional
162
+ :param _headers: set to override the headers for a single
163
+ request; this effectively ignores the headers
164
+ in the spec for a single request.
165
+ :type _headers: dict, optional
166
+ :param _host_index: set to override the host_index for a single
167
+ request; this effectively ignores the host_index
168
+ in the spec for a single request.
169
+ :type _host_index: int, optional
170
+ :return: Returns the result object.
171
+ """ # noqa: E501
172
+
173
+ _param = self._create_collection_serialize(
174
+ collection_create_request=collection_create_request,
175
+ authorization=authorization,
176
+ _request_auth=_request_auth,
177
+ _content_type=_content_type,
178
+ _headers=_headers,
179
+ _host_index=_host_index
180
+ )
181
+
182
+ _response_types_map: Dict[str, Optional[str]] = {
183
+ '200': "BaseResponseCollectionResponse",
184
+ '422': "BaseResponse",
185
+ }
186
+ response_data = self.api_client.call_api(
187
+ *_param,
188
+ _request_timeout=_request_timeout
189
+ )
190
+ response_data.read()
191
+ return self.api_client.response_deserialize(
192
+ response_data=response_data,
193
+ response_types_map=_response_types_map,
194
+ )
195
+
196
+
197
+ @validate_call
198
+ def create_collection_without_preload_content(
199
+ self,
200
+ collection_create_request: CollectionCreateRequest,
201
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
202
+ _request_timeout: Union[
203
+ None,
204
+ Annotated[StrictFloat, Field(gt=0)],
205
+ Tuple[
206
+ Annotated[StrictFloat, Field(gt=0)],
207
+ Annotated[StrictFloat, Field(gt=0)]
208
+ ]
209
+ ] = None,
210
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
211
+ _content_type: Optional[StrictStr] = None,
212
+ _headers: Optional[Dict[StrictStr, Any]] = None,
213
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
214
+ ) -> RESTResponseType:
215
+ """Creates new collection information
216
+
217
+ A collection is a group of binaries that are related in some way. This endpoint creates a new collection and allows you to add tags and binaries to it. If you add tags or binaries to the collection, they will be returned in the response.
218
+
219
+ :param collection_create_request: (required)
220
+ :type collection_create_request: CollectionCreateRequest
221
+ :param authorization: API Key bearer token
222
+ :type authorization: str
223
+ :param _request_timeout: timeout setting for this request. If one
224
+ number provided, it will be total request
225
+ timeout. It can also be a pair (tuple) of
226
+ (connection, read) timeouts.
227
+ :type _request_timeout: int, tuple(int, int), optional
228
+ :param _request_auth: set to override the auth_settings for an a single
229
+ request; this effectively ignores the
230
+ authentication in the spec for a single request.
231
+ :type _request_auth: dict, optional
232
+ :param _content_type: force content-type for the request.
233
+ :type _content_type: str, Optional
234
+ :param _headers: set to override the headers for a single
235
+ request; this effectively ignores the headers
236
+ in the spec for a single request.
237
+ :type _headers: dict, optional
238
+ :param _host_index: set to override the host_index for a single
239
+ request; this effectively ignores the host_index
240
+ in the spec for a single request.
241
+ :type _host_index: int, optional
242
+ :return: Returns the result object.
243
+ """ # noqa: E501
244
+
245
+ _param = self._create_collection_serialize(
246
+ collection_create_request=collection_create_request,
247
+ authorization=authorization,
248
+ _request_auth=_request_auth,
249
+ _content_type=_content_type,
250
+ _headers=_headers,
251
+ _host_index=_host_index
252
+ )
253
+
254
+ _response_types_map: Dict[str, Optional[str]] = {
255
+ '200': "BaseResponseCollectionResponse",
256
+ '422': "BaseResponse",
257
+ }
258
+ response_data = self.api_client.call_api(
259
+ *_param,
260
+ _request_timeout=_request_timeout
261
+ )
262
+ return response_data.response
263
+
264
+
265
+ def _create_collection_serialize(
266
+ self,
267
+ collection_create_request,
268
+ authorization,
269
+ _request_auth,
270
+ _content_type,
271
+ _headers,
272
+ _host_index,
273
+ ) -> RequestSerialized:
274
+
275
+ _host = None
276
+
277
+ _collection_formats: Dict[str, str] = {
278
+ }
279
+
280
+ _path_params: Dict[str, str] = {}
281
+ _query_params: List[Tuple[str, str]] = []
282
+ _header_params: Dict[str, Optional[str]] = _headers or {}
283
+ _form_params: List[Tuple[str, str]] = []
284
+ _files: Dict[
285
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
286
+ ] = {}
287
+ _body_params: Optional[bytes] = None
288
+
289
+ # process the path parameters
290
+ # process the query parameters
291
+ # process the header parameters
292
+ if authorization is not None:
293
+ _header_params['authorization'] = authorization
294
+ # process the form parameters
295
+ # process the body parameter
296
+ if collection_create_request is not None:
297
+ _body_params = collection_create_request
298
+
299
+
300
+ # set the HTTP header `Accept`
301
+ if 'Accept' not in _header_params:
302
+ _header_params['Accept'] = self.api_client.select_header_accept(
303
+ [
304
+ 'application/json'
305
+ ]
306
+ )
307
+
308
+ # set the HTTP header `Content-Type`
309
+ if _content_type:
310
+ _header_params['Content-Type'] = _content_type
311
+ else:
312
+ _default_content_type = (
313
+ self.api_client.select_header_content_type(
314
+ [
315
+ 'application/json'
316
+ ]
317
+ )
318
+ )
319
+ if _default_content_type is not None:
320
+ _header_params['Content-Type'] = _default_content_type
321
+
322
+ # authentication setting
323
+ _auth_settings: List[str] = [
324
+ 'APIKey'
325
+ ]
326
+
327
+ return self.api_client.param_serialize(
328
+ method='POST',
329
+ resource_path='/v2/collections',
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 delete_collection(
347
+ self,
348
+ collection_id: StrictInt,
349
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
350
+ _request_timeout: Union[
351
+ None,
352
+ Annotated[StrictFloat, Field(gt=0)],
353
+ Tuple[
354
+ Annotated[StrictFloat, Field(gt=0)],
355
+ Annotated[StrictFloat, Field(gt=0)]
356
+ ]
357
+ ] = None,
358
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
359
+ _content_type: Optional[StrictStr] = None,
360
+ _headers: Optional[Dict[StrictStr, Any]] = None,
361
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
362
+ ) -> BaseResponseBool:
363
+ """Deletes a collection
364
+
365
+ Deletes a collection
366
+
367
+ :param collection_id: (required)
368
+ :type collection_id: int
369
+ :param authorization: API Key bearer token
370
+ :type authorization: str
371
+ :param _request_timeout: timeout setting for this request. If one
372
+ number provided, it will be total request
373
+ timeout. It can also be a pair (tuple) of
374
+ (connection, read) timeouts.
375
+ :type _request_timeout: int, tuple(int, int), optional
376
+ :param _request_auth: set to override the auth_settings for an a single
377
+ request; this effectively ignores the
378
+ authentication in the spec for a single request.
379
+ :type _request_auth: dict, optional
380
+ :param _content_type: force content-type for the request.
381
+ :type _content_type: str, Optional
382
+ :param _headers: set to override the headers for a single
383
+ request; this effectively ignores the headers
384
+ in the spec for a single request.
385
+ :type _headers: dict, optional
386
+ :param _host_index: set to override the host_index for a single
387
+ request; this effectively ignores the host_index
388
+ in the spec for a single request.
389
+ :type _host_index: int, optional
390
+ :return: Returns the result object.
391
+ """ # noqa: E501
392
+
393
+ _param = self._delete_collection_serialize(
394
+ collection_id=collection_id,
395
+ authorization=authorization,
396
+ _request_auth=_request_auth,
397
+ _content_type=_content_type,
398
+ _headers=_headers,
399
+ _host_index=_host_index
400
+ )
401
+
402
+ _response_types_map: Dict[str, Optional[str]] = {
403
+ '200': "BaseResponseBool",
404
+ '422': "BaseResponse",
405
+ }
406
+ response_data = self.api_client.call_api(
407
+ *_param,
408
+ _request_timeout=_request_timeout
409
+ )
410
+ response_data.read()
411
+ return self.api_client.response_deserialize(
412
+ response_data=response_data,
413
+ response_types_map=_response_types_map,
414
+ ).data
415
+
416
+
417
+ @validate_call
418
+ def delete_collection_with_http_info(
419
+ self,
420
+ collection_id: StrictInt,
421
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
422
+ _request_timeout: Union[
423
+ None,
424
+ Annotated[StrictFloat, Field(gt=0)],
425
+ Tuple[
426
+ Annotated[StrictFloat, Field(gt=0)],
427
+ Annotated[StrictFloat, Field(gt=0)]
428
+ ]
429
+ ] = None,
430
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
431
+ _content_type: Optional[StrictStr] = None,
432
+ _headers: Optional[Dict[StrictStr, Any]] = None,
433
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
434
+ ) -> ApiResponse[BaseResponseBool]:
435
+ """Deletes a collection
436
+
437
+ Deletes a collection
438
+
439
+ :param collection_id: (required)
440
+ :type collection_id: int
441
+ :param authorization: API Key bearer token
442
+ :type authorization: str
443
+ :param _request_timeout: timeout setting for this request. If one
444
+ number provided, it will be total request
445
+ timeout. It can also be a pair (tuple) of
446
+ (connection, read) timeouts.
447
+ :type _request_timeout: int, tuple(int, int), optional
448
+ :param _request_auth: set to override the auth_settings for an a single
449
+ request; this effectively ignores the
450
+ authentication in the spec for a single request.
451
+ :type _request_auth: dict, optional
452
+ :param _content_type: force content-type for the request.
453
+ :type _content_type: str, Optional
454
+ :param _headers: set to override the headers for a single
455
+ request; this effectively ignores the headers
456
+ in the spec for a single request.
457
+ :type _headers: dict, optional
458
+ :param _host_index: set to override the host_index for a single
459
+ request; this effectively ignores the host_index
460
+ in the spec for a single request.
461
+ :type _host_index: int, optional
462
+ :return: Returns the result object.
463
+ """ # noqa: E501
464
+
465
+ _param = self._delete_collection_serialize(
466
+ collection_id=collection_id,
467
+ authorization=authorization,
468
+ _request_auth=_request_auth,
469
+ _content_type=_content_type,
470
+ _headers=_headers,
471
+ _host_index=_host_index
472
+ )
473
+
474
+ _response_types_map: Dict[str, Optional[str]] = {
475
+ '200': "BaseResponseBool",
476
+ '422': "BaseResponse",
477
+ }
478
+ response_data = self.api_client.call_api(
479
+ *_param,
480
+ _request_timeout=_request_timeout
481
+ )
482
+ response_data.read()
483
+ return self.api_client.response_deserialize(
484
+ response_data=response_data,
485
+ response_types_map=_response_types_map,
486
+ )
487
+
488
+
489
+ @validate_call
490
+ def delete_collection_without_preload_content(
491
+ self,
492
+ collection_id: StrictInt,
493
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
494
+ _request_timeout: Union[
495
+ None,
496
+ Annotated[StrictFloat, Field(gt=0)],
497
+ Tuple[
498
+ Annotated[StrictFloat, Field(gt=0)],
499
+ Annotated[StrictFloat, Field(gt=0)]
500
+ ]
501
+ ] = None,
502
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
503
+ _content_type: Optional[StrictStr] = None,
504
+ _headers: Optional[Dict[StrictStr, Any]] = None,
505
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
506
+ ) -> RESTResponseType:
507
+ """Deletes a collection
508
+
509
+ Deletes a collection
510
+
511
+ :param collection_id: (required)
512
+ :type collection_id: int
513
+ :param authorization: API Key bearer token
514
+ :type authorization: str
515
+ :param _request_timeout: timeout setting for this request. If one
516
+ number provided, it will be total request
517
+ timeout. It can also be a pair (tuple) of
518
+ (connection, read) timeouts.
519
+ :type _request_timeout: int, tuple(int, int), optional
520
+ :param _request_auth: set to override the auth_settings for an a single
521
+ request; this effectively ignores the
522
+ authentication in the spec for a single request.
523
+ :type _request_auth: dict, optional
524
+ :param _content_type: force content-type for the request.
525
+ :type _content_type: str, Optional
526
+ :param _headers: set to override the headers for a single
527
+ request; this effectively ignores the headers
528
+ in the spec for a single request.
529
+ :type _headers: dict, optional
530
+ :param _host_index: set to override the host_index for a single
531
+ request; this effectively ignores the host_index
532
+ in the spec for a single request.
533
+ :type _host_index: int, optional
534
+ :return: Returns the result object.
535
+ """ # noqa: E501
536
+
537
+ _param = self._delete_collection_serialize(
538
+ collection_id=collection_id,
539
+ authorization=authorization,
540
+ _request_auth=_request_auth,
541
+ _content_type=_content_type,
542
+ _headers=_headers,
543
+ _host_index=_host_index
544
+ )
545
+
546
+ _response_types_map: Dict[str, Optional[str]] = {
547
+ '200': "BaseResponseBool",
548
+ '422': "BaseResponse",
549
+ }
550
+ response_data = self.api_client.call_api(
551
+ *_param,
552
+ _request_timeout=_request_timeout
553
+ )
554
+ return response_data.response
555
+
556
+
557
+ def _delete_collection_serialize(
558
+ self,
559
+ collection_id,
560
+ authorization,
561
+ _request_auth,
562
+ _content_type,
563
+ _headers,
564
+ _host_index,
565
+ ) -> RequestSerialized:
566
+
567
+ _host = None
568
+
569
+ _collection_formats: Dict[str, str] = {
570
+ }
571
+
572
+ _path_params: Dict[str, str] = {}
573
+ _query_params: List[Tuple[str, str]] = []
574
+ _header_params: Dict[str, Optional[str]] = _headers or {}
575
+ _form_params: List[Tuple[str, str]] = []
576
+ _files: Dict[
577
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
578
+ ] = {}
579
+ _body_params: Optional[bytes] = None
580
+
581
+ # process the path parameters
582
+ if collection_id is not None:
583
+ _path_params['collection_id'] = collection_id
584
+ # process the query parameters
585
+ # process the header parameters
586
+ if authorization is not None:
587
+ _header_params['authorization'] = authorization
588
+ # process the form parameters
589
+ # process the body parameter
590
+
591
+
592
+ # set the HTTP header `Accept`
593
+ if 'Accept' not in _header_params:
594
+ _header_params['Accept'] = self.api_client.select_header_accept(
595
+ [
596
+ 'application/json'
597
+ ]
598
+ )
599
+
600
+
601
+ # authentication setting
602
+ _auth_settings: List[str] = [
603
+ 'APIKey'
604
+ ]
605
+
606
+ return self.api_client.param_serialize(
607
+ method='DELETE',
608
+ resource_path='/v2/collections/{collection_id}',
609
+ path_params=_path_params,
610
+ query_params=_query_params,
611
+ header_params=_header_params,
612
+ body=_body_params,
613
+ post_params=_form_params,
614
+ files=_files,
615
+ auth_settings=_auth_settings,
616
+ collection_formats=_collection_formats,
617
+ _host=_host,
618
+ _request_auth=_request_auth
619
+ )
620
+
621
+
622
+
623
+
624
+ @validate_call
625
+ def get_collection(
626
+ self,
627
+ collection_id: StrictInt,
628
+ include_tags: Optional[StrictBool] = None,
629
+ include_binaries: Optional[StrictBool] = None,
630
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
631
+ _request_timeout: Union[
632
+ None,
633
+ Annotated[StrictFloat, Field(gt=0)],
634
+ Tuple[
635
+ Annotated[StrictFloat, Field(gt=0)],
636
+ Annotated[StrictFloat, Field(gt=0)]
637
+ ]
638
+ ] = None,
639
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
640
+ _content_type: Optional[StrictStr] = None,
641
+ _headers: Optional[Dict[StrictStr, Any]] = None,
642
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
643
+ ) -> BaseResponseCollectionResponse:
644
+ """Returns a collection
645
+
646
+ Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined.
647
+
648
+ :param collection_id: (required)
649
+ :type collection_id: int
650
+ :param include_tags:
651
+ :type include_tags: bool
652
+ :param include_binaries:
653
+ :type include_binaries: bool
654
+ :param authorization: API Key bearer token
655
+ :type authorization: str
656
+ :param _request_timeout: timeout setting for this request. If one
657
+ number provided, it will be total request
658
+ timeout. It can also be a pair (tuple) of
659
+ (connection, read) timeouts.
660
+ :type _request_timeout: int, tuple(int, int), optional
661
+ :param _request_auth: set to override the auth_settings for an a single
662
+ request; this effectively ignores the
663
+ authentication in the spec for a single request.
664
+ :type _request_auth: dict, optional
665
+ :param _content_type: force content-type for the request.
666
+ :type _content_type: str, Optional
667
+ :param _headers: set to override the headers for a single
668
+ request; this effectively ignores the headers
669
+ in the spec for a single request.
670
+ :type _headers: dict, optional
671
+ :param _host_index: set to override the host_index for a single
672
+ request; this effectively ignores the host_index
673
+ in the spec for a single request.
674
+ :type _host_index: int, optional
675
+ :return: Returns the result object.
676
+ """ # noqa: E501
677
+
678
+ _param = self._get_collection_serialize(
679
+ collection_id=collection_id,
680
+ include_tags=include_tags,
681
+ include_binaries=include_binaries,
682
+ authorization=authorization,
683
+ _request_auth=_request_auth,
684
+ _content_type=_content_type,
685
+ _headers=_headers,
686
+ _host_index=_host_index
687
+ )
688
+
689
+ _response_types_map: Dict[str, Optional[str]] = {
690
+ '200': "BaseResponseCollectionResponse",
691
+ '422': "BaseResponse",
692
+ }
693
+ response_data = self.api_client.call_api(
694
+ *_param,
695
+ _request_timeout=_request_timeout
696
+ )
697
+ response_data.read()
698
+ return self.api_client.response_deserialize(
699
+ response_data=response_data,
700
+ response_types_map=_response_types_map,
701
+ ).data
702
+
703
+
704
+ @validate_call
705
+ def get_collection_with_http_info(
706
+ self,
707
+ collection_id: StrictInt,
708
+ include_tags: Optional[StrictBool] = None,
709
+ include_binaries: Optional[StrictBool] = None,
710
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
711
+ _request_timeout: Union[
712
+ None,
713
+ Annotated[StrictFloat, Field(gt=0)],
714
+ Tuple[
715
+ Annotated[StrictFloat, Field(gt=0)],
716
+ Annotated[StrictFloat, Field(gt=0)]
717
+ ]
718
+ ] = None,
719
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
720
+ _content_type: Optional[StrictStr] = None,
721
+ _headers: Optional[Dict[StrictStr, Any]] = None,
722
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
+ ) -> ApiResponse[BaseResponseCollectionResponse]:
724
+ """Returns a collection
725
+
726
+ Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined.
727
+
728
+ :param collection_id: (required)
729
+ :type collection_id: int
730
+ :param include_tags:
731
+ :type include_tags: bool
732
+ :param include_binaries:
733
+ :type include_binaries: bool
734
+ :param authorization: API Key bearer token
735
+ :type authorization: str
736
+ :param _request_timeout: timeout setting for this request. If one
737
+ number provided, it will be total request
738
+ timeout. It can also be a pair (tuple) of
739
+ (connection, read) timeouts.
740
+ :type _request_timeout: int, tuple(int, int), optional
741
+ :param _request_auth: set to override the auth_settings for an a single
742
+ request; this effectively ignores the
743
+ authentication in the spec for a single request.
744
+ :type _request_auth: dict, optional
745
+ :param _content_type: force content-type for the request.
746
+ :type _content_type: str, Optional
747
+ :param _headers: set to override the headers for a single
748
+ request; this effectively ignores the headers
749
+ in the spec for a single request.
750
+ :type _headers: dict, optional
751
+ :param _host_index: set to override the host_index for a single
752
+ request; this effectively ignores the host_index
753
+ in the spec for a single request.
754
+ :type _host_index: int, optional
755
+ :return: Returns the result object.
756
+ """ # noqa: E501
757
+
758
+ _param = self._get_collection_serialize(
759
+ collection_id=collection_id,
760
+ include_tags=include_tags,
761
+ include_binaries=include_binaries,
762
+ authorization=authorization,
763
+ _request_auth=_request_auth,
764
+ _content_type=_content_type,
765
+ _headers=_headers,
766
+ _host_index=_host_index
767
+ )
768
+
769
+ _response_types_map: Dict[str, Optional[str]] = {
770
+ '200': "BaseResponseCollectionResponse",
771
+ '422': "BaseResponse",
772
+ }
773
+ response_data = self.api_client.call_api(
774
+ *_param,
775
+ _request_timeout=_request_timeout
776
+ )
777
+ response_data.read()
778
+ return self.api_client.response_deserialize(
779
+ response_data=response_data,
780
+ response_types_map=_response_types_map,
781
+ )
782
+
783
+
784
+ @validate_call
785
+ def get_collection_without_preload_content(
786
+ self,
787
+ collection_id: StrictInt,
788
+ include_tags: Optional[StrictBool] = None,
789
+ include_binaries: Optional[StrictBool] = None,
790
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
791
+ _request_timeout: Union[
792
+ None,
793
+ Annotated[StrictFloat, Field(gt=0)],
794
+ Tuple[
795
+ Annotated[StrictFloat, Field(gt=0)],
796
+ Annotated[StrictFloat, Field(gt=0)]
797
+ ]
798
+ ] = None,
799
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
800
+ _content_type: Optional[StrictStr] = None,
801
+ _headers: Optional[Dict[StrictStr, Any]] = None,
802
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
803
+ ) -> RESTResponseType:
804
+ """Returns a collection
805
+
806
+ Gets a single collection. The collection can include binaries and tags if requested. You can specify whether to include tags and binaries in the response by using the query string parameters defined.
807
+
808
+ :param collection_id: (required)
809
+ :type collection_id: int
810
+ :param include_tags:
811
+ :type include_tags: bool
812
+ :param include_binaries:
813
+ :type include_binaries: bool
814
+ :param authorization: API Key bearer token
815
+ :type authorization: str
816
+ :param _request_timeout: timeout setting for this request. If one
817
+ number provided, it will be total request
818
+ timeout. It can also be a pair (tuple) of
819
+ (connection, read) timeouts.
820
+ :type _request_timeout: int, tuple(int, int), optional
821
+ :param _request_auth: set to override the auth_settings for an a single
822
+ request; this effectively ignores the
823
+ authentication in the spec for a single request.
824
+ :type _request_auth: dict, optional
825
+ :param _content_type: force content-type for the request.
826
+ :type _content_type: str, Optional
827
+ :param _headers: set to override the headers for a single
828
+ request; this effectively ignores the headers
829
+ in the spec for a single request.
830
+ :type _headers: dict, optional
831
+ :param _host_index: set to override the host_index for a single
832
+ request; this effectively ignores the host_index
833
+ in the spec for a single request.
834
+ :type _host_index: int, optional
835
+ :return: Returns the result object.
836
+ """ # noqa: E501
837
+
838
+ _param = self._get_collection_serialize(
839
+ collection_id=collection_id,
840
+ include_tags=include_tags,
841
+ include_binaries=include_binaries,
842
+ authorization=authorization,
843
+ _request_auth=_request_auth,
844
+ _content_type=_content_type,
845
+ _headers=_headers,
846
+ _host_index=_host_index
847
+ )
848
+
849
+ _response_types_map: Dict[str, Optional[str]] = {
850
+ '200': "BaseResponseCollectionResponse",
851
+ '422': "BaseResponse",
852
+ }
853
+ response_data = self.api_client.call_api(
854
+ *_param,
855
+ _request_timeout=_request_timeout
856
+ )
857
+ return response_data.response
858
+
859
+
860
+ def _get_collection_serialize(
861
+ self,
862
+ collection_id,
863
+ include_tags,
864
+ include_binaries,
865
+ authorization,
866
+ _request_auth,
867
+ _content_type,
868
+ _headers,
869
+ _host_index,
870
+ ) -> RequestSerialized:
871
+
872
+ _host = None
873
+
874
+ _collection_formats: Dict[str, str] = {
875
+ }
876
+
877
+ _path_params: Dict[str, str] = {}
878
+ _query_params: List[Tuple[str, str]] = []
879
+ _header_params: Dict[str, Optional[str]] = _headers or {}
880
+ _form_params: List[Tuple[str, str]] = []
881
+ _files: Dict[
882
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
883
+ ] = {}
884
+ _body_params: Optional[bytes] = None
885
+
886
+ # process the path parameters
887
+ if collection_id is not None:
888
+ _path_params['collection_id'] = collection_id
889
+ # process the query parameters
890
+ if include_tags is not None:
891
+
892
+ _query_params.append(('include_tags', include_tags))
893
+
894
+ if include_binaries is not None:
895
+
896
+ _query_params.append(('include_binaries', include_binaries))
897
+
898
+ # process the header parameters
899
+ if authorization is not None:
900
+ _header_params['authorization'] = authorization
901
+ # process the form parameters
902
+ # process the body parameter
903
+
904
+
905
+ # set the HTTP header `Accept`
906
+ if 'Accept' not in _header_params:
907
+ _header_params['Accept'] = self.api_client.select_header_accept(
908
+ [
909
+ 'application/json'
910
+ ]
911
+ )
912
+
913
+
914
+ # authentication setting
915
+ _auth_settings: List[str] = [
916
+ 'APIKey'
917
+ ]
918
+
919
+ return self.api_client.param_serialize(
920
+ method='GET',
921
+ resource_path='/v2/collections/{collection_id}',
922
+ path_params=_path_params,
923
+ query_params=_query_params,
924
+ header_params=_header_params,
925
+ body=_body_params,
926
+ post_params=_form_params,
927
+ files=_files,
928
+ auth_settings=_auth_settings,
929
+ collection_formats=_collection_formats,
930
+ _host=_host,
931
+ _request_auth=_request_auth
932
+ )
933
+
934
+
935
+
936
+
937
+ @validate_call
938
+ def list_collections(
939
+ self,
940
+ search_term: Optional[StrictStr] = None,
941
+ filters: Optional[List[Filters]] = None,
942
+ limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
943
+ offset: Optional[StrictInt] = None,
944
+ order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None,
945
+ order: Optional[Order] = None,
946
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
947
+ _request_timeout: Union[
948
+ None,
949
+ Annotated[StrictFloat, Field(gt=0)],
950
+ Tuple[
951
+ Annotated[StrictFloat, Field(gt=0)],
952
+ Annotated[StrictFloat, Field(gt=0)]
953
+ ]
954
+ ] = None,
955
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
956
+ _content_type: Optional[StrictStr] = None,
957
+ _headers: Optional[Dict[StrictStr, Any]] = None,
958
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
959
+ ) -> BaseResponseListCollectionResults:
960
+ """Gets basic collections information
961
+
962
+ Returns a list of collections
963
+
964
+ :param search_term:
965
+ :type search_term: str
966
+ :param filters:
967
+ :type filters: List[Filters]
968
+ :param limit:
969
+ :type limit: int
970
+ :param offset:
971
+ :type offset: int
972
+ :param order_by:
973
+ :type order_by: AppApiRestV2CollectionsEnumsOrderBy
974
+ :param order:
975
+ :type order: Order
976
+ :param authorization: API Key bearer token
977
+ :type authorization: str
978
+ :param _request_timeout: timeout setting for this request. If one
979
+ number provided, it will be total request
980
+ timeout. It can also be a pair (tuple) of
981
+ (connection, read) timeouts.
982
+ :type _request_timeout: int, tuple(int, int), optional
983
+ :param _request_auth: set to override the auth_settings for an a single
984
+ request; this effectively ignores the
985
+ authentication in the spec for a single request.
986
+ :type _request_auth: dict, optional
987
+ :param _content_type: force content-type for the request.
988
+ :type _content_type: str, Optional
989
+ :param _headers: set to override the headers for a single
990
+ request; this effectively ignores the headers
991
+ in the spec for a single request.
992
+ :type _headers: dict, optional
993
+ :param _host_index: set to override the host_index for a single
994
+ request; this effectively ignores the host_index
995
+ in the spec for a single request.
996
+ :type _host_index: int, optional
997
+ :return: Returns the result object.
998
+ """ # noqa: E501
999
+
1000
+ _param = self._list_collections_serialize(
1001
+ search_term=search_term,
1002
+ filters=filters,
1003
+ limit=limit,
1004
+ offset=offset,
1005
+ order_by=order_by,
1006
+ order=order,
1007
+ authorization=authorization,
1008
+ _request_auth=_request_auth,
1009
+ _content_type=_content_type,
1010
+ _headers=_headers,
1011
+ _host_index=_host_index
1012
+ )
1013
+
1014
+ _response_types_map: Dict[str, Optional[str]] = {
1015
+ '200': "BaseResponseListCollectionResults",
1016
+ '422': "BaseResponse",
1017
+ }
1018
+ response_data = self.api_client.call_api(
1019
+ *_param,
1020
+ _request_timeout=_request_timeout
1021
+ )
1022
+ response_data.read()
1023
+ return self.api_client.response_deserialize(
1024
+ response_data=response_data,
1025
+ response_types_map=_response_types_map,
1026
+ ).data
1027
+
1028
+
1029
+ @validate_call
1030
+ def list_collections_with_http_info(
1031
+ self,
1032
+ search_term: Optional[StrictStr] = None,
1033
+ filters: Optional[List[Filters]] = None,
1034
+ limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
1035
+ offset: Optional[StrictInt] = None,
1036
+ order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None,
1037
+ order: Optional[Order] = None,
1038
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1039
+ _request_timeout: Union[
1040
+ None,
1041
+ Annotated[StrictFloat, Field(gt=0)],
1042
+ Tuple[
1043
+ Annotated[StrictFloat, Field(gt=0)],
1044
+ Annotated[StrictFloat, Field(gt=0)]
1045
+ ]
1046
+ ] = None,
1047
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1048
+ _content_type: Optional[StrictStr] = None,
1049
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1050
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1051
+ ) -> ApiResponse[BaseResponseListCollectionResults]:
1052
+ """Gets basic collections information
1053
+
1054
+ Returns a list of collections
1055
+
1056
+ :param search_term:
1057
+ :type search_term: str
1058
+ :param filters:
1059
+ :type filters: List[Filters]
1060
+ :param limit:
1061
+ :type limit: int
1062
+ :param offset:
1063
+ :type offset: int
1064
+ :param order_by:
1065
+ :type order_by: AppApiRestV2CollectionsEnumsOrderBy
1066
+ :param order:
1067
+ :type order: Order
1068
+ :param authorization: API Key bearer token
1069
+ :type authorization: str
1070
+ :param _request_timeout: timeout setting for this request. If one
1071
+ number provided, it will be total request
1072
+ timeout. It can also be a pair (tuple) of
1073
+ (connection, read) timeouts.
1074
+ :type _request_timeout: int, tuple(int, int), optional
1075
+ :param _request_auth: set to override the auth_settings for an a single
1076
+ request; this effectively ignores the
1077
+ authentication in the spec for a single request.
1078
+ :type _request_auth: dict, optional
1079
+ :param _content_type: force content-type for the request.
1080
+ :type _content_type: str, Optional
1081
+ :param _headers: set to override the headers for a single
1082
+ request; this effectively ignores the headers
1083
+ in the spec for a single request.
1084
+ :type _headers: dict, optional
1085
+ :param _host_index: set to override the host_index for a single
1086
+ request; this effectively ignores the host_index
1087
+ in the spec for a single request.
1088
+ :type _host_index: int, optional
1089
+ :return: Returns the result object.
1090
+ """ # noqa: E501
1091
+
1092
+ _param = self._list_collections_serialize(
1093
+ search_term=search_term,
1094
+ filters=filters,
1095
+ limit=limit,
1096
+ offset=offset,
1097
+ order_by=order_by,
1098
+ order=order,
1099
+ authorization=authorization,
1100
+ _request_auth=_request_auth,
1101
+ _content_type=_content_type,
1102
+ _headers=_headers,
1103
+ _host_index=_host_index
1104
+ )
1105
+
1106
+ _response_types_map: Dict[str, Optional[str]] = {
1107
+ '200': "BaseResponseListCollectionResults",
1108
+ '422': "BaseResponse",
1109
+ }
1110
+ response_data = self.api_client.call_api(
1111
+ *_param,
1112
+ _request_timeout=_request_timeout
1113
+ )
1114
+ response_data.read()
1115
+ return self.api_client.response_deserialize(
1116
+ response_data=response_data,
1117
+ response_types_map=_response_types_map,
1118
+ )
1119
+
1120
+
1121
+ @validate_call
1122
+ def list_collections_without_preload_content(
1123
+ self,
1124
+ search_term: Optional[StrictStr] = None,
1125
+ filters: Optional[List[Filters]] = None,
1126
+ limit: Optional[Annotated[int, Field(le=50, strict=True, ge=5)]] = None,
1127
+ offset: Optional[StrictInt] = None,
1128
+ order_by: Optional[AppApiRestV2CollectionsEnumsOrderBy] = None,
1129
+ order: Optional[Order] = None,
1130
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1131
+ _request_timeout: Union[
1132
+ None,
1133
+ Annotated[StrictFloat, Field(gt=0)],
1134
+ Tuple[
1135
+ Annotated[StrictFloat, Field(gt=0)],
1136
+ Annotated[StrictFloat, Field(gt=0)]
1137
+ ]
1138
+ ] = None,
1139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1140
+ _content_type: Optional[StrictStr] = None,
1141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1143
+ ) -> RESTResponseType:
1144
+ """Gets basic collections information
1145
+
1146
+ Returns a list of collections
1147
+
1148
+ :param search_term:
1149
+ :type search_term: str
1150
+ :param filters:
1151
+ :type filters: List[Filters]
1152
+ :param limit:
1153
+ :type limit: int
1154
+ :param offset:
1155
+ :type offset: int
1156
+ :param order_by:
1157
+ :type order_by: AppApiRestV2CollectionsEnumsOrderBy
1158
+ :param order:
1159
+ :type order: Order
1160
+ :param authorization: API Key bearer token
1161
+ :type authorization: str
1162
+ :param _request_timeout: timeout setting for this request. If one
1163
+ number provided, it will be total request
1164
+ timeout. It can also be a pair (tuple) of
1165
+ (connection, read) timeouts.
1166
+ :type _request_timeout: int, tuple(int, int), optional
1167
+ :param _request_auth: set to override the auth_settings for an a single
1168
+ request; this effectively ignores the
1169
+ authentication in the spec for a single request.
1170
+ :type _request_auth: dict, optional
1171
+ :param _content_type: force content-type for the request.
1172
+ :type _content_type: str, Optional
1173
+ :param _headers: set to override the headers for a single
1174
+ request; this effectively ignores the headers
1175
+ in the spec for a single request.
1176
+ :type _headers: dict, optional
1177
+ :param _host_index: set to override the host_index for a single
1178
+ request; this effectively ignores the host_index
1179
+ in the spec for a single request.
1180
+ :type _host_index: int, optional
1181
+ :return: Returns the result object.
1182
+ """ # noqa: E501
1183
+
1184
+ _param = self._list_collections_serialize(
1185
+ search_term=search_term,
1186
+ filters=filters,
1187
+ limit=limit,
1188
+ offset=offset,
1189
+ order_by=order_by,
1190
+ order=order,
1191
+ authorization=authorization,
1192
+ _request_auth=_request_auth,
1193
+ _content_type=_content_type,
1194
+ _headers=_headers,
1195
+ _host_index=_host_index
1196
+ )
1197
+
1198
+ _response_types_map: Dict[str, Optional[str]] = {
1199
+ '200': "BaseResponseListCollectionResults",
1200
+ '422': "BaseResponse",
1201
+ }
1202
+ response_data = self.api_client.call_api(
1203
+ *_param,
1204
+ _request_timeout=_request_timeout
1205
+ )
1206
+ return response_data.response
1207
+
1208
+
1209
+ def _list_collections_serialize(
1210
+ self,
1211
+ search_term,
1212
+ filters,
1213
+ limit,
1214
+ offset,
1215
+ order_by,
1216
+ order,
1217
+ authorization,
1218
+ _request_auth,
1219
+ _content_type,
1220
+ _headers,
1221
+ _host_index,
1222
+ ) -> RequestSerialized:
1223
+
1224
+ _host = None
1225
+
1226
+ _collection_formats: Dict[str, str] = {
1227
+ 'filters': 'multi',
1228
+ }
1229
+
1230
+ _path_params: Dict[str, str] = {}
1231
+ _query_params: List[Tuple[str, str]] = []
1232
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1233
+ _form_params: List[Tuple[str, str]] = []
1234
+ _files: Dict[
1235
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1236
+ ] = {}
1237
+ _body_params: Optional[bytes] = None
1238
+
1239
+ # process the path parameters
1240
+ # process the query parameters
1241
+ if search_term is not None:
1242
+
1243
+ _query_params.append(('search_term', search_term))
1244
+
1245
+ if filters is not None:
1246
+
1247
+ _query_params.append(('filters', filters))
1248
+
1249
+ if limit is not None:
1250
+
1251
+ _query_params.append(('limit', limit))
1252
+
1253
+ if offset is not None:
1254
+
1255
+ _query_params.append(('offset', offset))
1256
+
1257
+ if order_by is not None:
1258
+
1259
+ _query_params.append(('order_by', order_by.value))
1260
+
1261
+ if order is not None:
1262
+
1263
+ _query_params.append(('order', order.value))
1264
+
1265
+ # process the header parameters
1266
+ if authorization is not None:
1267
+ _header_params['authorization'] = authorization
1268
+ # process the form parameters
1269
+ # process the body parameter
1270
+
1271
+
1272
+ # set the HTTP header `Accept`
1273
+ if 'Accept' not in _header_params:
1274
+ _header_params['Accept'] = self.api_client.select_header_accept(
1275
+ [
1276
+ 'application/json'
1277
+ ]
1278
+ )
1279
+
1280
+
1281
+ # authentication setting
1282
+ _auth_settings: List[str] = [
1283
+ 'APIKey'
1284
+ ]
1285
+
1286
+ return self.api_client.param_serialize(
1287
+ method='GET',
1288
+ resource_path='/v2/collections',
1289
+ path_params=_path_params,
1290
+ query_params=_query_params,
1291
+ header_params=_header_params,
1292
+ body=_body_params,
1293
+ post_params=_form_params,
1294
+ files=_files,
1295
+ auth_settings=_auth_settings,
1296
+ collection_formats=_collection_formats,
1297
+ _host=_host,
1298
+ _request_auth=_request_auth
1299
+ )
1300
+
1301
+
1302
+
1303
+
1304
+ @validate_call
1305
+ def update_collection(
1306
+ self,
1307
+ collection_id: StrictInt,
1308
+ collection_update_request: CollectionUpdateRequest,
1309
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1310
+ _request_timeout: Union[
1311
+ None,
1312
+ Annotated[StrictFloat, Field(gt=0)],
1313
+ Tuple[
1314
+ Annotated[StrictFloat, Field(gt=0)],
1315
+ Annotated[StrictFloat, Field(gt=0)]
1316
+ ]
1317
+ ] = None,
1318
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1319
+ _content_type: Optional[StrictStr] = None,
1320
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1321
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1322
+ ) -> BaseResponseCollectionResponse:
1323
+ """Updates a collection
1324
+
1325
+ Updates a collection, you can update the collection name, description, and scope
1326
+
1327
+ :param collection_id: (required)
1328
+ :type collection_id: int
1329
+ :param collection_update_request: (required)
1330
+ :type collection_update_request: CollectionUpdateRequest
1331
+ :param authorization: API Key bearer token
1332
+ :type authorization: str
1333
+ :param _request_timeout: timeout setting for this request. If one
1334
+ number provided, it will be total request
1335
+ timeout. It can also be a pair (tuple) of
1336
+ (connection, read) timeouts.
1337
+ :type _request_timeout: int, tuple(int, int), optional
1338
+ :param _request_auth: set to override the auth_settings for an a single
1339
+ request; this effectively ignores the
1340
+ authentication in the spec for a single request.
1341
+ :type _request_auth: dict, optional
1342
+ :param _content_type: force content-type for the request.
1343
+ :type _content_type: str, Optional
1344
+ :param _headers: set to override the headers for a single
1345
+ request; this effectively ignores the headers
1346
+ in the spec for a single request.
1347
+ :type _headers: dict, optional
1348
+ :param _host_index: set to override the host_index for a single
1349
+ request; this effectively ignores the host_index
1350
+ in the spec for a single request.
1351
+ :type _host_index: int, optional
1352
+ :return: Returns the result object.
1353
+ """ # noqa: E501
1354
+
1355
+ _param = self._update_collection_serialize(
1356
+ collection_id=collection_id,
1357
+ collection_update_request=collection_update_request,
1358
+ authorization=authorization,
1359
+ _request_auth=_request_auth,
1360
+ _content_type=_content_type,
1361
+ _headers=_headers,
1362
+ _host_index=_host_index
1363
+ )
1364
+
1365
+ _response_types_map: Dict[str, Optional[str]] = {
1366
+ '200': "BaseResponseCollectionResponse",
1367
+ '422': "BaseResponse",
1368
+ }
1369
+ response_data = self.api_client.call_api(
1370
+ *_param,
1371
+ _request_timeout=_request_timeout
1372
+ )
1373
+ response_data.read()
1374
+ return self.api_client.response_deserialize(
1375
+ response_data=response_data,
1376
+ response_types_map=_response_types_map,
1377
+ ).data
1378
+
1379
+
1380
+ @validate_call
1381
+ def update_collection_with_http_info(
1382
+ self,
1383
+ collection_id: StrictInt,
1384
+ collection_update_request: CollectionUpdateRequest,
1385
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1386
+ _request_timeout: Union[
1387
+ None,
1388
+ Annotated[StrictFloat, Field(gt=0)],
1389
+ Tuple[
1390
+ Annotated[StrictFloat, Field(gt=0)],
1391
+ Annotated[StrictFloat, Field(gt=0)]
1392
+ ]
1393
+ ] = None,
1394
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1395
+ _content_type: Optional[StrictStr] = None,
1396
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1397
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1398
+ ) -> ApiResponse[BaseResponseCollectionResponse]:
1399
+ """Updates a collection
1400
+
1401
+ Updates a collection, you can update the collection name, description, and scope
1402
+
1403
+ :param collection_id: (required)
1404
+ :type collection_id: int
1405
+ :param collection_update_request: (required)
1406
+ :type collection_update_request: CollectionUpdateRequest
1407
+ :param authorization: API Key bearer token
1408
+ :type authorization: str
1409
+ :param _request_timeout: timeout setting for this request. If one
1410
+ number provided, it will be total request
1411
+ timeout. It can also be a pair (tuple) of
1412
+ (connection, read) timeouts.
1413
+ :type _request_timeout: int, tuple(int, int), optional
1414
+ :param _request_auth: set to override the auth_settings for an a single
1415
+ request; this effectively ignores the
1416
+ authentication in the spec for a single request.
1417
+ :type _request_auth: dict, optional
1418
+ :param _content_type: force content-type for the request.
1419
+ :type _content_type: str, Optional
1420
+ :param _headers: set to override the headers for a single
1421
+ request; this effectively ignores the headers
1422
+ in the spec for a single request.
1423
+ :type _headers: dict, optional
1424
+ :param _host_index: set to override the host_index for a single
1425
+ request; this effectively ignores the host_index
1426
+ in the spec for a single request.
1427
+ :type _host_index: int, optional
1428
+ :return: Returns the result object.
1429
+ """ # noqa: E501
1430
+
1431
+ _param = self._update_collection_serialize(
1432
+ collection_id=collection_id,
1433
+ collection_update_request=collection_update_request,
1434
+ authorization=authorization,
1435
+ _request_auth=_request_auth,
1436
+ _content_type=_content_type,
1437
+ _headers=_headers,
1438
+ _host_index=_host_index
1439
+ )
1440
+
1441
+ _response_types_map: Dict[str, Optional[str]] = {
1442
+ '200': "BaseResponseCollectionResponse",
1443
+ '422': "BaseResponse",
1444
+ }
1445
+ response_data = self.api_client.call_api(
1446
+ *_param,
1447
+ _request_timeout=_request_timeout
1448
+ )
1449
+ response_data.read()
1450
+ return self.api_client.response_deserialize(
1451
+ response_data=response_data,
1452
+ response_types_map=_response_types_map,
1453
+ )
1454
+
1455
+
1456
+ @validate_call
1457
+ def update_collection_without_preload_content(
1458
+ self,
1459
+ collection_id: StrictInt,
1460
+ collection_update_request: CollectionUpdateRequest,
1461
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1462
+ _request_timeout: Union[
1463
+ None,
1464
+ Annotated[StrictFloat, Field(gt=0)],
1465
+ Tuple[
1466
+ Annotated[StrictFloat, Field(gt=0)],
1467
+ Annotated[StrictFloat, Field(gt=0)]
1468
+ ]
1469
+ ] = None,
1470
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1471
+ _content_type: Optional[StrictStr] = None,
1472
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1473
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1474
+ ) -> RESTResponseType:
1475
+ """Updates a collection
1476
+
1477
+ Updates a collection, you can update the collection name, description, and scope
1478
+
1479
+ :param collection_id: (required)
1480
+ :type collection_id: int
1481
+ :param collection_update_request: (required)
1482
+ :type collection_update_request: CollectionUpdateRequest
1483
+ :param authorization: API Key bearer token
1484
+ :type authorization: str
1485
+ :param _request_timeout: timeout setting for this request. If one
1486
+ number provided, it will be total request
1487
+ timeout. It can also be a pair (tuple) of
1488
+ (connection, read) timeouts.
1489
+ :type _request_timeout: int, tuple(int, int), optional
1490
+ :param _request_auth: set to override the auth_settings for an a single
1491
+ request; this effectively ignores the
1492
+ authentication in the spec for a single request.
1493
+ :type _request_auth: dict, optional
1494
+ :param _content_type: force content-type for the request.
1495
+ :type _content_type: str, Optional
1496
+ :param _headers: set to override the headers for a single
1497
+ request; this effectively ignores the headers
1498
+ in the spec for a single request.
1499
+ :type _headers: dict, optional
1500
+ :param _host_index: set to override the host_index for a single
1501
+ request; this effectively ignores the host_index
1502
+ in the spec for a single request.
1503
+ :type _host_index: int, optional
1504
+ :return: Returns the result object.
1505
+ """ # noqa: E501
1506
+
1507
+ _param = self._update_collection_serialize(
1508
+ collection_id=collection_id,
1509
+ collection_update_request=collection_update_request,
1510
+ authorization=authorization,
1511
+ _request_auth=_request_auth,
1512
+ _content_type=_content_type,
1513
+ _headers=_headers,
1514
+ _host_index=_host_index
1515
+ )
1516
+
1517
+ _response_types_map: Dict[str, Optional[str]] = {
1518
+ '200': "BaseResponseCollectionResponse",
1519
+ '422': "BaseResponse",
1520
+ }
1521
+ response_data = self.api_client.call_api(
1522
+ *_param,
1523
+ _request_timeout=_request_timeout
1524
+ )
1525
+ return response_data.response
1526
+
1527
+
1528
+ def _update_collection_serialize(
1529
+ self,
1530
+ collection_id,
1531
+ collection_update_request,
1532
+ authorization,
1533
+ _request_auth,
1534
+ _content_type,
1535
+ _headers,
1536
+ _host_index,
1537
+ ) -> RequestSerialized:
1538
+
1539
+ _host = None
1540
+
1541
+ _collection_formats: Dict[str, str] = {
1542
+ }
1543
+
1544
+ _path_params: Dict[str, str] = {}
1545
+ _query_params: List[Tuple[str, str]] = []
1546
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1547
+ _form_params: List[Tuple[str, str]] = []
1548
+ _files: Dict[
1549
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1550
+ ] = {}
1551
+ _body_params: Optional[bytes] = None
1552
+
1553
+ # process the path parameters
1554
+ if collection_id is not None:
1555
+ _path_params['collection_id'] = collection_id
1556
+ # process the query parameters
1557
+ # process the header parameters
1558
+ if authorization is not None:
1559
+ _header_params['authorization'] = authorization
1560
+ # process the form parameters
1561
+ # process the body parameter
1562
+ if collection_update_request is not None:
1563
+ _body_params = collection_update_request
1564
+
1565
+
1566
+ # set the HTTP header `Accept`
1567
+ if 'Accept' not in _header_params:
1568
+ _header_params['Accept'] = self.api_client.select_header_accept(
1569
+ [
1570
+ 'application/json'
1571
+ ]
1572
+ )
1573
+
1574
+ # set the HTTP header `Content-Type`
1575
+ if _content_type:
1576
+ _header_params['Content-Type'] = _content_type
1577
+ else:
1578
+ _default_content_type = (
1579
+ self.api_client.select_header_content_type(
1580
+ [
1581
+ 'application/json'
1582
+ ]
1583
+ )
1584
+ )
1585
+ if _default_content_type is not None:
1586
+ _header_params['Content-Type'] = _default_content_type
1587
+
1588
+ # authentication setting
1589
+ _auth_settings: List[str] = [
1590
+ 'APIKey'
1591
+ ]
1592
+
1593
+ return self.api_client.param_serialize(
1594
+ method='PATCH',
1595
+ resource_path='/v2/collections/{collection_id}',
1596
+ path_params=_path_params,
1597
+ query_params=_query_params,
1598
+ header_params=_header_params,
1599
+ body=_body_params,
1600
+ post_params=_form_params,
1601
+ files=_files,
1602
+ auth_settings=_auth_settings,
1603
+ collection_formats=_collection_formats,
1604
+ _host=_host,
1605
+ _request_auth=_request_auth
1606
+ )
1607
+
1608
+
1609
+
1610
+
1611
+ @validate_call
1612
+ def update_collection_binaries(
1613
+ self,
1614
+ collection_id: StrictInt,
1615
+ collection_binaries_update_request: CollectionBinariesUpdateRequest,
1616
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1617
+ _request_timeout: Union[
1618
+ None,
1619
+ Annotated[StrictFloat, Field(gt=0)],
1620
+ Tuple[
1621
+ Annotated[StrictFloat, Field(gt=0)],
1622
+ Annotated[StrictFloat, Field(gt=0)]
1623
+ ]
1624
+ ] = None,
1625
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1626
+ _content_type: Optional[StrictStr] = None,
1627
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1628
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1629
+ ) -> BaseResponseCollectionBinariesUpdateResponse:
1630
+ """Updates a collection binaries
1631
+
1632
+ Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request.
1633
+
1634
+ :param collection_id: (required)
1635
+ :type collection_id: int
1636
+ :param collection_binaries_update_request: (required)
1637
+ :type collection_binaries_update_request: CollectionBinariesUpdateRequest
1638
+ :param authorization: API Key bearer token
1639
+ :type authorization: str
1640
+ :param _request_timeout: timeout setting for this request. If one
1641
+ number provided, it will be total request
1642
+ timeout. It can also be a pair (tuple) of
1643
+ (connection, read) timeouts.
1644
+ :type _request_timeout: int, tuple(int, int), optional
1645
+ :param _request_auth: set to override the auth_settings for an a single
1646
+ request; this effectively ignores the
1647
+ authentication in the spec for a single request.
1648
+ :type _request_auth: dict, optional
1649
+ :param _content_type: force content-type for the request.
1650
+ :type _content_type: str, Optional
1651
+ :param _headers: set to override the headers for a single
1652
+ request; this effectively ignores the headers
1653
+ in the spec for a single request.
1654
+ :type _headers: dict, optional
1655
+ :param _host_index: set to override the host_index for a single
1656
+ request; this effectively ignores the host_index
1657
+ in the spec for a single request.
1658
+ :type _host_index: int, optional
1659
+ :return: Returns the result object.
1660
+ """ # noqa: E501
1661
+
1662
+ _param = self._update_collection_binaries_serialize(
1663
+ collection_id=collection_id,
1664
+ collection_binaries_update_request=collection_binaries_update_request,
1665
+ authorization=authorization,
1666
+ _request_auth=_request_auth,
1667
+ _content_type=_content_type,
1668
+ _headers=_headers,
1669
+ _host_index=_host_index
1670
+ )
1671
+
1672
+ _response_types_map: Dict[str, Optional[str]] = {
1673
+ '200': "BaseResponseCollectionBinariesUpdateResponse",
1674
+ '422': "BaseResponse",
1675
+ }
1676
+ response_data = self.api_client.call_api(
1677
+ *_param,
1678
+ _request_timeout=_request_timeout
1679
+ )
1680
+ response_data.read()
1681
+ return self.api_client.response_deserialize(
1682
+ response_data=response_data,
1683
+ response_types_map=_response_types_map,
1684
+ ).data
1685
+
1686
+
1687
+ @validate_call
1688
+ def update_collection_binaries_with_http_info(
1689
+ self,
1690
+ collection_id: StrictInt,
1691
+ collection_binaries_update_request: CollectionBinariesUpdateRequest,
1692
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1693
+ _request_timeout: Union[
1694
+ None,
1695
+ Annotated[StrictFloat, Field(gt=0)],
1696
+ Tuple[
1697
+ Annotated[StrictFloat, Field(gt=0)],
1698
+ Annotated[StrictFloat, Field(gt=0)]
1699
+ ]
1700
+ ] = None,
1701
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1702
+ _content_type: Optional[StrictStr] = None,
1703
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1704
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1705
+ ) -> ApiResponse[BaseResponseCollectionBinariesUpdateResponse]:
1706
+ """Updates a collection binaries
1707
+
1708
+ Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request.
1709
+
1710
+ :param collection_id: (required)
1711
+ :type collection_id: int
1712
+ :param collection_binaries_update_request: (required)
1713
+ :type collection_binaries_update_request: CollectionBinariesUpdateRequest
1714
+ :param authorization: API Key bearer token
1715
+ :type authorization: str
1716
+ :param _request_timeout: timeout setting for this request. If one
1717
+ number provided, it will be total request
1718
+ timeout. It can also be a pair (tuple) of
1719
+ (connection, read) timeouts.
1720
+ :type _request_timeout: int, tuple(int, int), optional
1721
+ :param _request_auth: set to override the auth_settings for an a single
1722
+ request; this effectively ignores the
1723
+ authentication in the spec for a single request.
1724
+ :type _request_auth: dict, optional
1725
+ :param _content_type: force content-type for the request.
1726
+ :type _content_type: str, Optional
1727
+ :param _headers: set to override the headers for a single
1728
+ request; this effectively ignores the headers
1729
+ in the spec for a single request.
1730
+ :type _headers: dict, optional
1731
+ :param _host_index: set to override the host_index for a single
1732
+ request; this effectively ignores the host_index
1733
+ in the spec for a single request.
1734
+ :type _host_index: int, optional
1735
+ :return: Returns the result object.
1736
+ """ # noqa: E501
1737
+
1738
+ _param = self._update_collection_binaries_serialize(
1739
+ collection_id=collection_id,
1740
+ collection_binaries_update_request=collection_binaries_update_request,
1741
+ authorization=authorization,
1742
+ _request_auth=_request_auth,
1743
+ _content_type=_content_type,
1744
+ _headers=_headers,
1745
+ _host_index=_host_index
1746
+ )
1747
+
1748
+ _response_types_map: Dict[str, Optional[str]] = {
1749
+ '200': "BaseResponseCollectionBinariesUpdateResponse",
1750
+ '422': "BaseResponse",
1751
+ }
1752
+ response_data = self.api_client.call_api(
1753
+ *_param,
1754
+ _request_timeout=_request_timeout
1755
+ )
1756
+ response_data.read()
1757
+ return self.api_client.response_deserialize(
1758
+ response_data=response_data,
1759
+ response_types_map=_response_types_map,
1760
+ )
1761
+
1762
+
1763
+ @validate_call
1764
+ def update_collection_binaries_without_preload_content(
1765
+ self,
1766
+ collection_id: StrictInt,
1767
+ collection_binaries_update_request: CollectionBinariesUpdateRequest,
1768
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1769
+ _request_timeout: Union[
1770
+ None,
1771
+ Annotated[StrictFloat, Field(gt=0)],
1772
+ Tuple[
1773
+ Annotated[StrictFloat, Field(gt=0)],
1774
+ Annotated[StrictFloat, Field(gt=0)]
1775
+ ]
1776
+ ] = None,
1777
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1778
+ _content_type: Optional[StrictStr] = None,
1779
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1780
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1781
+ ) -> RESTResponseType:
1782
+ """Updates a collection binaries
1783
+
1784
+ Updates/changes a collection binaries to whatever is provided in the request. After this update the collection will only contain the binaries provided in the request.
1785
+
1786
+ :param collection_id: (required)
1787
+ :type collection_id: int
1788
+ :param collection_binaries_update_request: (required)
1789
+ :type collection_binaries_update_request: CollectionBinariesUpdateRequest
1790
+ :param authorization: API Key bearer token
1791
+ :type authorization: str
1792
+ :param _request_timeout: timeout setting for this request. If one
1793
+ number provided, it will be total request
1794
+ timeout. It can also be a pair (tuple) of
1795
+ (connection, read) timeouts.
1796
+ :type _request_timeout: int, tuple(int, int), optional
1797
+ :param _request_auth: set to override the auth_settings for an a single
1798
+ request; this effectively ignores the
1799
+ authentication in the spec for a single request.
1800
+ :type _request_auth: dict, optional
1801
+ :param _content_type: force content-type for the request.
1802
+ :type _content_type: str, Optional
1803
+ :param _headers: set to override the headers for a single
1804
+ request; this effectively ignores the headers
1805
+ in the spec for a single request.
1806
+ :type _headers: dict, optional
1807
+ :param _host_index: set to override the host_index for a single
1808
+ request; this effectively ignores the host_index
1809
+ in the spec for a single request.
1810
+ :type _host_index: int, optional
1811
+ :return: Returns the result object.
1812
+ """ # noqa: E501
1813
+
1814
+ _param = self._update_collection_binaries_serialize(
1815
+ collection_id=collection_id,
1816
+ collection_binaries_update_request=collection_binaries_update_request,
1817
+ authorization=authorization,
1818
+ _request_auth=_request_auth,
1819
+ _content_type=_content_type,
1820
+ _headers=_headers,
1821
+ _host_index=_host_index
1822
+ )
1823
+
1824
+ _response_types_map: Dict[str, Optional[str]] = {
1825
+ '200': "BaseResponseCollectionBinariesUpdateResponse",
1826
+ '422': "BaseResponse",
1827
+ }
1828
+ response_data = self.api_client.call_api(
1829
+ *_param,
1830
+ _request_timeout=_request_timeout
1831
+ )
1832
+ return response_data.response
1833
+
1834
+
1835
+ def _update_collection_binaries_serialize(
1836
+ self,
1837
+ collection_id,
1838
+ collection_binaries_update_request,
1839
+ authorization,
1840
+ _request_auth,
1841
+ _content_type,
1842
+ _headers,
1843
+ _host_index,
1844
+ ) -> RequestSerialized:
1845
+
1846
+ _host = None
1847
+
1848
+ _collection_formats: Dict[str, str] = {
1849
+ }
1850
+
1851
+ _path_params: Dict[str, str] = {}
1852
+ _query_params: List[Tuple[str, str]] = []
1853
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1854
+ _form_params: List[Tuple[str, str]] = []
1855
+ _files: Dict[
1856
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1857
+ ] = {}
1858
+ _body_params: Optional[bytes] = None
1859
+
1860
+ # process the path parameters
1861
+ if collection_id is not None:
1862
+ _path_params['collection_id'] = collection_id
1863
+ # process the query parameters
1864
+ # process the header parameters
1865
+ if authorization is not None:
1866
+ _header_params['authorization'] = authorization
1867
+ # process the form parameters
1868
+ # process the body parameter
1869
+ if collection_binaries_update_request is not None:
1870
+ _body_params = collection_binaries_update_request
1871
+
1872
+
1873
+ # set the HTTP header `Accept`
1874
+ if 'Accept' not in _header_params:
1875
+ _header_params['Accept'] = self.api_client.select_header_accept(
1876
+ [
1877
+ 'application/json'
1878
+ ]
1879
+ )
1880
+
1881
+ # set the HTTP header `Content-Type`
1882
+ if _content_type:
1883
+ _header_params['Content-Type'] = _content_type
1884
+ else:
1885
+ _default_content_type = (
1886
+ self.api_client.select_header_content_type(
1887
+ [
1888
+ 'application/json'
1889
+ ]
1890
+ )
1891
+ )
1892
+ if _default_content_type is not None:
1893
+ _header_params['Content-Type'] = _default_content_type
1894
+
1895
+ # authentication setting
1896
+ _auth_settings: List[str] = [
1897
+ 'APIKey'
1898
+ ]
1899
+
1900
+ return self.api_client.param_serialize(
1901
+ method='PATCH',
1902
+ resource_path='/v2/collections/{collection_id}/binaries',
1903
+ path_params=_path_params,
1904
+ query_params=_query_params,
1905
+ header_params=_header_params,
1906
+ body=_body_params,
1907
+ post_params=_form_params,
1908
+ files=_files,
1909
+ auth_settings=_auth_settings,
1910
+ collection_formats=_collection_formats,
1911
+ _host=_host,
1912
+ _request_auth=_request_auth
1913
+ )
1914
+
1915
+
1916
+
1917
+
1918
+ @validate_call
1919
+ def update_collection_tags(
1920
+ self,
1921
+ collection_id: StrictInt,
1922
+ collection_tags_update_request: CollectionTagsUpdateRequest,
1923
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
1924
+ _request_timeout: Union[
1925
+ None,
1926
+ Annotated[StrictFloat, Field(gt=0)],
1927
+ Tuple[
1928
+ Annotated[StrictFloat, Field(gt=0)],
1929
+ Annotated[StrictFloat, Field(gt=0)]
1930
+ ]
1931
+ ] = None,
1932
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1933
+ _content_type: Optional[StrictStr] = None,
1934
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1935
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1936
+ ) -> BaseResponseCollectionTagsUpdateResponse:
1937
+ """Updates a collection tags
1938
+
1939
+ Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request.
1940
+
1941
+ :param collection_id: (required)
1942
+ :type collection_id: int
1943
+ :param collection_tags_update_request: (required)
1944
+ :type collection_tags_update_request: CollectionTagsUpdateRequest
1945
+ :param authorization: API Key bearer token
1946
+ :type authorization: str
1947
+ :param _request_timeout: timeout setting for this request. If one
1948
+ number provided, it will be total request
1949
+ timeout. It can also be a pair (tuple) of
1950
+ (connection, read) timeouts.
1951
+ :type _request_timeout: int, tuple(int, int), optional
1952
+ :param _request_auth: set to override the auth_settings for an a single
1953
+ request; this effectively ignores the
1954
+ authentication in the spec for a single request.
1955
+ :type _request_auth: dict, optional
1956
+ :param _content_type: force content-type for the request.
1957
+ :type _content_type: str, Optional
1958
+ :param _headers: set to override the headers for a single
1959
+ request; this effectively ignores the headers
1960
+ in the spec for a single request.
1961
+ :type _headers: dict, optional
1962
+ :param _host_index: set to override the host_index for a single
1963
+ request; this effectively ignores the host_index
1964
+ in the spec for a single request.
1965
+ :type _host_index: int, optional
1966
+ :return: Returns the result object.
1967
+ """ # noqa: E501
1968
+
1969
+ _param = self._update_collection_tags_serialize(
1970
+ collection_id=collection_id,
1971
+ collection_tags_update_request=collection_tags_update_request,
1972
+ authorization=authorization,
1973
+ _request_auth=_request_auth,
1974
+ _content_type=_content_type,
1975
+ _headers=_headers,
1976
+ _host_index=_host_index
1977
+ )
1978
+
1979
+ _response_types_map: Dict[str, Optional[str]] = {
1980
+ '200': "BaseResponseCollectionTagsUpdateResponse",
1981
+ '422': "BaseResponse",
1982
+ }
1983
+ response_data = self.api_client.call_api(
1984
+ *_param,
1985
+ _request_timeout=_request_timeout
1986
+ )
1987
+ response_data.read()
1988
+ return self.api_client.response_deserialize(
1989
+ response_data=response_data,
1990
+ response_types_map=_response_types_map,
1991
+ ).data
1992
+
1993
+
1994
+ @validate_call
1995
+ def update_collection_tags_with_http_info(
1996
+ self,
1997
+ collection_id: StrictInt,
1998
+ collection_tags_update_request: CollectionTagsUpdateRequest,
1999
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
2000
+ _request_timeout: Union[
2001
+ None,
2002
+ Annotated[StrictFloat, Field(gt=0)],
2003
+ Tuple[
2004
+ Annotated[StrictFloat, Field(gt=0)],
2005
+ Annotated[StrictFloat, Field(gt=0)]
2006
+ ]
2007
+ ] = None,
2008
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2009
+ _content_type: Optional[StrictStr] = None,
2010
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2011
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2012
+ ) -> ApiResponse[BaseResponseCollectionTagsUpdateResponse]:
2013
+ """Updates a collection tags
2014
+
2015
+ Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request.
2016
+
2017
+ :param collection_id: (required)
2018
+ :type collection_id: int
2019
+ :param collection_tags_update_request: (required)
2020
+ :type collection_tags_update_request: CollectionTagsUpdateRequest
2021
+ :param authorization: API Key bearer token
2022
+ :type authorization: str
2023
+ :param _request_timeout: timeout setting for this request. If one
2024
+ number provided, it will be total request
2025
+ timeout. It can also be a pair (tuple) of
2026
+ (connection, read) timeouts.
2027
+ :type _request_timeout: int, tuple(int, int), optional
2028
+ :param _request_auth: set to override the auth_settings for an a single
2029
+ request; this effectively ignores the
2030
+ authentication in the spec for a single request.
2031
+ :type _request_auth: dict, optional
2032
+ :param _content_type: force content-type for the request.
2033
+ :type _content_type: str, Optional
2034
+ :param _headers: set to override the headers for a single
2035
+ request; this effectively ignores the headers
2036
+ in the spec for a single request.
2037
+ :type _headers: dict, optional
2038
+ :param _host_index: set to override the host_index for a single
2039
+ request; this effectively ignores the host_index
2040
+ in the spec for a single request.
2041
+ :type _host_index: int, optional
2042
+ :return: Returns the result object.
2043
+ """ # noqa: E501
2044
+
2045
+ _param = self._update_collection_tags_serialize(
2046
+ collection_id=collection_id,
2047
+ collection_tags_update_request=collection_tags_update_request,
2048
+ authorization=authorization,
2049
+ _request_auth=_request_auth,
2050
+ _content_type=_content_type,
2051
+ _headers=_headers,
2052
+ _host_index=_host_index
2053
+ )
2054
+
2055
+ _response_types_map: Dict[str, Optional[str]] = {
2056
+ '200': "BaseResponseCollectionTagsUpdateResponse",
2057
+ '422': "BaseResponse",
2058
+ }
2059
+ response_data = self.api_client.call_api(
2060
+ *_param,
2061
+ _request_timeout=_request_timeout
2062
+ )
2063
+ response_data.read()
2064
+ return self.api_client.response_deserialize(
2065
+ response_data=response_data,
2066
+ response_types_map=_response_types_map,
2067
+ )
2068
+
2069
+
2070
+ @validate_call
2071
+ def update_collection_tags_without_preload_content(
2072
+ self,
2073
+ collection_id: StrictInt,
2074
+ collection_tags_update_request: CollectionTagsUpdateRequest,
2075
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
2076
+ _request_timeout: Union[
2077
+ None,
2078
+ Annotated[StrictFloat, Field(gt=0)],
2079
+ Tuple[
2080
+ Annotated[StrictFloat, Field(gt=0)],
2081
+ Annotated[StrictFloat, Field(gt=0)]
2082
+ ]
2083
+ ] = None,
2084
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2085
+ _content_type: Optional[StrictStr] = None,
2086
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2087
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2088
+ ) -> RESTResponseType:
2089
+ """Updates a collection tags
2090
+
2091
+ Updates/changes a collection tags to whatever is provided in the request. After this update the collection will only contain the tags provided in the request.
2092
+
2093
+ :param collection_id: (required)
2094
+ :type collection_id: int
2095
+ :param collection_tags_update_request: (required)
2096
+ :type collection_tags_update_request: CollectionTagsUpdateRequest
2097
+ :param authorization: API Key bearer token
2098
+ :type authorization: str
2099
+ :param _request_timeout: timeout setting for this request. If one
2100
+ number provided, it will be total request
2101
+ timeout. It can also be a pair (tuple) of
2102
+ (connection, read) timeouts.
2103
+ :type _request_timeout: int, tuple(int, int), optional
2104
+ :param _request_auth: set to override the auth_settings for an a single
2105
+ request; this effectively ignores the
2106
+ authentication in the spec for a single request.
2107
+ :type _request_auth: dict, optional
2108
+ :param _content_type: force content-type for the request.
2109
+ :type _content_type: str, Optional
2110
+ :param _headers: set to override the headers for a single
2111
+ request; this effectively ignores the headers
2112
+ in the spec for a single request.
2113
+ :type _headers: dict, optional
2114
+ :param _host_index: set to override the host_index for a single
2115
+ request; this effectively ignores the host_index
2116
+ in the spec for a single request.
2117
+ :type _host_index: int, optional
2118
+ :return: Returns the result object.
2119
+ """ # noqa: E501
2120
+
2121
+ _param = self._update_collection_tags_serialize(
2122
+ collection_id=collection_id,
2123
+ collection_tags_update_request=collection_tags_update_request,
2124
+ authorization=authorization,
2125
+ _request_auth=_request_auth,
2126
+ _content_type=_content_type,
2127
+ _headers=_headers,
2128
+ _host_index=_host_index
2129
+ )
2130
+
2131
+ _response_types_map: Dict[str, Optional[str]] = {
2132
+ '200': "BaseResponseCollectionTagsUpdateResponse",
2133
+ '422': "BaseResponse",
2134
+ }
2135
+ response_data = self.api_client.call_api(
2136
+ *_param,
2137
+ _request_timeout=_request_timeout
2138
+ )
2139
+ return response_data.response
2140
+
2141
+
2142
+ def _update_collection_tags_serialize(
2143
+ self,
2144
+ collection_id,
2145
+ collection_tags_update_request,
2146
+ authorization,
2147
+ _request_auth,
2148
+ _content_type,
2149
+ _headers,
2150
+ _host_index,
2151
+ ) -> RequestSerialized:
2152
+
2153
+ _host = None
2154
+
2155
+ _collection_formats: Dict[str, str] = {
2156
+ }
2157
+
2158
+ _path_params: Dict[str, str] = {}
2159
+ _query_params: List[Tuple[str, str]] = []
2160
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2161
+ _form_params: List[Tuple[str, str]] = []
2162
+ _files: Dict[
2163
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2164
+ ] = {}
2165
+ _body_params: Optional[bytes] = None
2166
+
2167
+ # process the path parameters
2168
+ if collection_id is not None:
2169
+ _path_params['collection_id'] = collection_id
2170
+ # process the query parameters
2171
+ # process the header parameters
2172
+ if authorization is not None:
2173
+ _header_params['authorization'] = authorization
2174
+ # process the form parameters
2175
+ # process the body parameter
2176
+ if collection_tags_update_request is not None:
2177
+ _body_params = collection_tags_update_request
2178
+
2179
+
2180
+ # set the HTTP header `Accept`
2181
+ if 'Accept' not in _header_params:
2182
+ _header_params['Accept'] = self.api_client.select_header_accept(
2183
+ [
2184
+ 'application/json'
2185
+ ]
2186
+ )
2187
+
2188
+ # set the HTTP header `Content-Type`
2189
+ if _content_type:
2190
+ _header_params['Content-Type'] = _content_type
2191
+ else:
2192
+ _default_content_type = (
2193
+ self.api_client.select_header_content_type(
2194
+ [
2195
+ 'application/json'
2196
+ ]
2197
+ )
2198
+ )
2199
+ if _default_content_type is not None:
2200
+ _header_params['Content-Type'] = _default_content_type
2201
+
2202
+ # authentication setting
2203
+ _auth_settings: List[str] = [
2204
+ 'APIKey'
2205
+ ]
2206
+
2207
+ return self.api_client.param_serialize(
2208
+ method='PATCH',
2209
+ resource_path='/v2/collections/{collection_id}/tags',
2210
+ path_params=_path_params,
2211
+ query_params=_query_params,
2212
+ header_params=_header_params,
2213
+ body=_body_params,
2214
+ post_params=_form_params,
2215
+ files=_files,
2216
+ auth_settings=_auth_settings,
2217
+ collection_formats=_collection_formats,
2218
+ _host=_host,
2219
+ _request_auth=_request_auth
2220
+ )
2221
+
2222
+