revengai 2.74.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (314) hide show
  1. revengai/__init__.py +647 -0
  2. revengai/api/__init__.py +22 -0
  3. revengai/api/analyses_comments_api.py +1198 -0
  4. revengai/api/analyses_core_api.py +3870 -0
  5. revengai/api/analyses_dynamic_execution_api.py +1884 -0
  6. revengai/api/analyses_results_metadata_api.py +2240 -0
  7. revengai/api/analyses_security_checks_api.py +862 -0
  8. revengai/api/authentication_users_api.py +1323 -0
  9. revengai/api/binaries_api.py +1610 -0
  10. revengai/api/collections_api.py +2167 -0
  11. revengai/api/external_sources_api.py +827 -0
  12. revengai/api/firmware_api.py +592 -0
  13. revengai/api/functions_ai_decompilation_api.py +2592 -0
  14. revengai/api/functions_block_comments_api.py +849 -0
  15. revengai/api/functions_core_api.py +3430 -0
  16. revengai/api/functions_data_types_api.py +1746 -0
  17. revengai/api/functions_decompilation_api.py +1198 -0
  18. revengai/api/functions_renaming_history_api.py +1151 -0
  19. revengai/api/models_api.py +284 -0
  20. revengai/api/search_api.py +1454 -0
  21. revengai/api_client.py +803 -0
  22. revengai/api_response.py +21 -0
  23. revengai/configuration.py +605 -0
  24. revengai/exceptions.py +215 -0
  25. revengai/models/__init__.py +298 -0
  26. revengai/models/addr.py +143 -0
  27. revengai/models/ai_decompilation_rating.py +37 -0
  28. revengai/models/ai_unstrip_request.py +86 -0
  29. revengai/models/analysis_access_info.py +88 -0
  30. revengai/models/analysis_config.py +106 -0
  31. revengai/models/analysis_create_request.py +131 -0
  32. revengai/models/analysis_create_response.py +88 -0
  33. revengai/models/analysis_detail_response.py +121 -0
  34. revengai/models/analysis_function_mapping.py +90 -0
  35. revengai/models/analysis_function_matching_request.py +110 -0
  36. revengai/models/analysis_functions.py +94 -0
  37. revengai/models/analysis_functions_list.py +94 -0
  38. revengai/models/analysis_record.py +128 -0
  39. revengai/models/analysis_scope.py +36 -0
  40. revengai/models/analysis_strings_response.py +96 -0
  41. revengai/models/analysis_tags.py +94 -0
  42. revengai/models/analysis_update_request.py +108 -0
  43. revengai/models/analysis_update_tags_request.py +86 -0
  44. revengai/models/analysis_update_tags_response.py +94 -0
  45. revengai/models/app_api_rest_v2_analyses_enums_dynamic_execution_status.py +38 -0
  46. revengai/models/app_api_rest_v2_analyses_enums_order_by.py +37 -0
  47. revengai/models/app_api_rest_v2_collections_enums_order_by.py +40 -0
  48. revengai/models/app_api_rest_v2_functions_responses_function.py +93 -0
  49. revengai/models/app_api_rest_v2_functions_types_function.py +110 -0
  50. revengai/models/app_services_dynamic_execution_schemas_dynamic_execution_status.py +86 -0
  51. revengai/models/argument.py +99 -0
  52. revengai/models/auto_unstrip_request.py +99 -0
  53. revengai/models/auto_unstrip_response.py +129 -0
  54. revengai/models/base_response.py +124 -0
  55. revengai/models/base_response_analysis_create_response.py +125 -0
  56. revengai/models/base_response_analysis_detail_response.py +125 -0
  57. revengai/models/base_response_analysis_function_mapping.py +125 -0
  58. revengai/models/base_response_analysis_functions.py +125 -0
  59. revengai/models/base_response_analysis_functions_list.py +125 -0
  60. revengai/models/base_response_analysis_strings_response.py +125 -0
  61. revengai/models/base_response_analysis_tags.py +125 -0
  62. revengai/models/base_response_analysis_update_tags_response.py +125 -0
  63. revengai/models/base_response_basic.py +125 -0
  64. revengai/models/base_response_binary_additional_response.py +125 -0
  65. revengai/models/base_response_binary_details_response.py +125 -0
  66. revengai/models/base_response_binary_externals_response.py +125 -0
  67. revengai/models/base_response_binary_search_response.py +125 -0
  68. revengai/models/base_response_block_comments_generation_for_function_response.py +125 -0
  69. revengai/models/base_response_block_comments_overview_generation_response.py +116 -0
  70. revengai/models/base_response_bool.py +121 -0
  71. revengai/models/base_response_callees_caller_functions_response.py +125 -0
  72. revengai/models/base_response_capabilities.py +125 -0
  73. revengai/models/base_response_check_security_checks_task_response.py +125 -0
  74. revengai/models/base_response_child_binaries_response.py +125 -0
  75. revengai/models/base_response_collection_binaries_update_response.py +125 -0
  76. revengai/models/base_response_collection_response.py +125 -0
  77. revengai/models/base_response_collection_search_response.py +125 -0
  78. revengai/models/base_response_collection_tags_update_response.py +125 -0
  79. revengai/models/base_response_comment_response.py +125 -0
  80. revengai/models/base_response_communities.py +125 -0
  81. revengai/models/base_response_created.py +125 -0
  82. revengai/models/base_response_dict.py +121 -0
  83. revengai/models/base_response_dynamic_execution_status.py +125 -0
  84. revengai/models/base_response_external_response.py +125 -0
  85. revengai/models/base_response_function_blocks_response.py +125 -0
  86. revengai/models/base_response_function_capability_response.py +125 -0
  87. revengai/models/base_response_function_data_types.py +125 -0
  88. revengai/models/base_response_function_data_types_list.py +125 -0
  89. revengai/models/base_response_function_search_response.py +125 -0
  90. revengai/models/base_response_function_strings_response.py +125 -0
  91. revengai/models/base_response_function_task_response.py +125 -0
  92. revengai/models/base_response_functions_detail_response.py +125 -0
  93. revengai/models/base_response_generate_function_data_types.py +125 -0
  94. revengai/models/base_response_generation_status_list.py +125 -0
  95. revengai/models/base_response_get_ai_decompilation_rating_response.py +125 -0
  96. revengai/models/base_response_get_ai_decompilation_task.py +125 -0
  97. revengai/models/base_response_get_me_response.py +125 -0
  98. revengai/models/base_response_get_public_user_response.py +125 -0
  99. revengai/models/base_response_list_collection_results.py +125 -0
  100. revengai/models/base_response_list_comment_response.py +129 -0
  101. revengai/models/base_response_list_die_match.py +129 -0
  102. revengai/models/base_response_list_function_name_history.py +129 -0
  103. revengai/models/base_response_list_sbom.py +129 -0
  104. revengai/models/base_response_list_user_activity_response.py +129 -0
  105. revengai/models/base_response_login_response.py +125 -0
  106. revengai/models/base_response_logs.py +125 -0
  107. revengai/models/base_response_models_response.py +125 -0
  108. revengai/models/base_response_network_overview_response.py +125 -0
  109. revengai/models/base_response_params.py +125 -0
  110. revengai/models/base_response_process_dumps.py +125 -0
  111. revengai/models/base_response_process_registry.py +125 -0
  112. revengai/models/base_response_process_tree.py +125 -0
  113. revengai/models/base_response_queued_security_checks_task_response.py +125 -0
  114. revengai/models/base_response_recent.py +125 -0
  115. revengai/models/base_response_security_checks_response.py +125 -0
  116. revengai/models/base_response_status.py +125 -0
  117. revengai/models/base_response_str.py +121 -0
  118. revengai/models/base_response_tag_search_response.py +125 -0
  119. revengai/models/base_response_task_response.py +125 -0
  120. revengai/models/base_response_ttps.py +125 -0
  121. revengai/models/base_response_upload_response.py +125 -0
  122. revengai/models/base_response_vulnerabilities.py +125 -0
  123. revengai/models/basic.py +116 -0
  124. revengai/models/binary_additional_details_data_response.py +112 -0
  125. revengai/models/binary_additional_response.py +105 -0
  126. revengai/models/binary_config.py +108 -0
  127. revengai/models/binary_details_response.py +125 -0
  128. revengai/models/binary_externals_response.py +95 -0
  129. revengai/models/binary_search_response.py +94 -0
  130. revengai/models/binary_search_result.py +108 -0
  131. revengai/models/binary_task_status.py +39 -0
  132. revengai/models/block.py +86 -0
  133. revengai/models/block_comments_generation_for_function_response.py +86 -0
  134. revengai/models/callee_function_info.py +106 -0
  135. revengai/models/callees_caller_functions_response.py +106 -0
  136. revengai/models/caller_function_info.py +106 -0
  137. revengai/models/capabilities.py +94 -0
  138. revengai/models/capability.py +90 -0
  139. revengai/models/check_security_checks_task_response.py +87 -0
  140. revengai/models/child_binaries_response.py +104 -0
  141. revengai/models/code_signature_model.py +98 -0
  142. revengai/models/collection_binaries_update_request.py +86 -0
  143. revengai/models/collection_binaries_update_response.py +94 -0
  144. revengai/models/collection_binary_response.py +97 -0
  145. revengai/models/collection_create_request.py +107 -0
  146. revengai/models/collection_list_item.py +112 -0
  147. revengai/models/collection_response.py +131 -0
  148. revengai/models/collection_response_binaries_inner.py +135 -0
  149. revengai/models/collection_scope.py +38 -0
  150. revengai/models/collection_search_response.py +94 -0
  151. revengai/models/collection_search_result.py +124 -0
  152. revengai/models/collection_tags_update_request.py +86 -0
  153. revengai/models/collection_tags_update_response.py +86 -0
  154. revengai/models/collection_update_request.py +106 -0
  155. revengai/models/comment_base.py +86 -0
  156. revengai/models/comment_response.py +110 -0
  157. revengai/models/comment_update_request.py +86 -0
  158. revengai/models/communities.py +100 -0
  159. revengai/models/community_match_percentages.py +92 -0
  160. revengai/models/confidence_type.py +39 -0
  161. revengai/models/context.py +141 -0
  162. revengai/models/created.py +90 -0
  163. revengai/models/decompilation_comment_context.py +98 -0
  164. revengai/models/die_match.py +92 -0
  165. revengai/models/dynamic_execution_status_input.py +38 -0
  166. revengai/models/elf_dynamic_entry.py +88 -0
  167. revengai/models/elf_import_model.py +88 -0
  168. revengai/models/elf_model.py +179 -0
  169. revengai/models/elf_relocation.py +98 -0
  170. revengai/models/elf_section.py +104 -0
  171. revengai/models/elf_security.py +94 -0
  172. revengai/models/elf_segment.py +102 -0
  173. revengai/models/elf_symbol.py +98 -0
  174. revengai/models/entrypoint_model.py +88 -0
  175. revengai/models/enumeration.py +97 -0
  176. revengai/models/error_model.py +88 -0
  177. revengai/models/export_model.py +88 -0
  178. revengai/models/external_response.py +91 -0
  179. revengai/models/file_format.py +37 -0
  180. revengai/models/file_hashes.py +140 -0
  181. revengai/models/file_metadata.py +96 -0
  182. revengai/models/filters.py +39 -0
  183. revengai/models/function_block_destination_response.py +95 -0
  184. revengai/models/function_block_response.py +109 -0
  185. revengai/models/function_blocks_response.py +121 -0
  186. revengai/models/function_boundary.py +90 -0
  187. revengai/models/function_capability_response.py +86 -0
  188. revengai/models/function_comment_create_request.py +92 -0
  189. revengai/models/function_data_types.py +106 -0
  190. revengai/models/function_data_types_list.py +98 -0
  191. revengai/models/function_data_types_list_item.py +108 -0
  192. revengai/models/function_data_types_params.py +86 -0
  193. revengai/models/function_data_types_status.py +90 -0
  194. revengai/models/function_header.py +112 -0
  195. revengai/models/function_info_input.py +105 -0
  196. revengai/models/function_info_input_func_deps_inner.py +163 -0
  197. revengai/models/function_info_output.py +105 -0
  198. revengai/models/function_list_item.py +96 -0
  199. revengai/models/function_local_variable_response.py +94 -0
  200. revengai/models/function_mapping.py +90 -0
  201. revengai/models/function_mapping_full.py +275 -0
  202. revengai/models/function_match.py +111 -0
  203. revengai/models/function_matching_filters.py +103 -0
  204. revengai/models/function_matching_request.py +114 -0
  205. revengai/models/function_matching_response.py +157 -0
  206. revengai/models/function_name_history.py +99 -0
  207. revengai/models/function_param_response.py +94 -0
  208. revengai/models/function_rename.py +88 -0
  209. revengai/models/function_rename_map.py +90 -0
  210. revengai/models/function_search_response.py +94 -0
  211. revengai/models/function_search_result.py +99 -0
  212. revengai/models/function_source_type.py +39 -0
  213. revengai/models/function_string.py +88 -0
  214. revengai/models/function_strings_response.py +96 -0
  215. revengai/models/function_task_response.py +94 -0
  216. revengai/models/function_task_status.py +39 -0
  217. revengai/models/function_type_input.py +127 -0
  218. revengai/models/function_type_output.py +127 -0
  219. revengai/models/functions_detail_response.py +125 -0
  220. revengai/models/functions_list_rename.py +94 -0
  221. revengai/models/generate_function_data_types.py +94 -0
  222. revengai/models/generation_status_list.py +98 -0
  223. revengai/models/get_ai_decompilation_rating_response.py +94 -0
  224. revengai/models/get_ai_decompilation_task.py +159 -0
  225. revengai/models/get_me_response.py +108 -0
  226. revengai/models/get_public_user_response.py +88 -0
  227. revengai/models/global_variable.py +101 -0
  228. revengai/models/icon_model.py +91 -0
  229. revengai/models/import_model.py +88 -0
  230. revengai/models/inverse_function_map_item.py +99 -0
  231. revengai/models/inverse_string_map_item.py +93 -0
  232. revengai/models/inverse_value.py +86 -0
  233. revengai/models/isa.py +37 -0
  234. revengai/models/list_collection_results.py +94 -0
  235. revengai/models/login_request.py +89 -0
  236. revengai/models/login_response.py +86 -0
  237. revengai/models/logs.py +86 -0
  238. revengai/models/matched_function.py +116 -0
  239. revengai/models/matched_function_suggestion.py +97 -0
  240. revengai/models/meta_model.py +95 -0
  241. revengai/models/model_name.py +40 -0
  242. revengai/models/models_response.py +86 -0
  243. revengai/models/name_confidence.py +89 -0
  244. revengai/models/network_overview_dns.py +98 -0
  245. revengai/models/network_overview_dns_answer.py +88 -0
  246. revengai/models/network_overview_metadata.py +99 -0
  247. revengai/models/network_overview_response.py +104 -0
  248. revengai/models/order.py +36 -0
  249. revengai/models/pagination_model.py +90 -0
  250. revengai/models/params.py +103 -0
  251. revengai/models/pdb_debug_model.py +94 -0
  252. revengai/models/pe_model.py +215 -0
  253. revengai/models/platform.py +36 -0
  254. revengai/models/process.py +103 -0
  255. revengai/models/process_dump.py +96 -0
  256. revengai/models/process_dump_metadata.py +90 -0
  257. revengai/models/process_dumps.py +92 -0
  258. revengai/models/process_dumps_data.py +96 -0
  259. revengai/models/process_registry.py +105 -0
  260. revengai/models/process_tree.py +96 -0
  261. revengai/models/queued_security_checks_task_response.py +86 -0
  262. revengai/models/re_analysis_form.py +101 -0
  263. revengai/models/recent.py +94 -0
  264. revengai/models/registry.py +102 -0
  265. revengai/models/relative_binary_response.py +90 -0
  266. revengai/models/sandbox_options.py +88 -0
  267. revengai/models/sbom.py +96 -0
  268. revengai/models/sbom_package.py +88 -0
  269. revengai/models/scrape_third_party_config.py +86 -0
  270. revengai/models/section_model.py +96 -0
  271. revengai/models/security_checks_response.py +98 -0
  272. revengai/models/security_checks_result.py +103 -0
  273. revengai/models/security_model.py +106 -0
  274. revengai/models/severity_type.py +40 -0
  275. revengai/models/single_code_certificate_model.py +96 -0
  276. revengai/models/single_code_signature_model.py +96 -0
  277. revengai/models/single_pdb_entry_model.py +90 -0
  278. revengai/models/single_section_model.py +98 -0
  279. revengai/models/stack_variable.py +101 -0
  280. revengai/models/status_input.py +40 -0
  281. revengai/models/status_output.py +88 -0
  282. revengai/models/string_functions.py +96 -0
  283. revengai/models/structure.py +117 -0
  284. revengai/models/structure_member.py +99 -0
  285. revengai/models/symbols.py +96 -0
  286. revengai/models/tag.py +86 -0
  287. revengai/models/tag_item.py +95 -0
  288. revengai/models/tag_response.py +88 -0
  289. revengai/models/tag_search_response.py +94 -0
  290. revengai/models/tag_search_result.py +88 -0
  291. revengai/models/task_response.py +94 -0
  292. revengai/models/task_status.py +39 -0
  293. revengai/models/timestamp_model.py +90 -0
  294. revengai/models/ttps.py +92 -0
  295. revengai/models/ttps_attack.py +88 -0
  296. revengai/models/ttps_data.py +96 -0
  297. revengai/models/ttps_element.py +108 -0
  298. revengai/models/ttps_occurance.py +88 -0
  299. revengai/models/type_definition.py +97 -0
  300. revengai/models/update_function_data_types.py +92 -0
  301. revengai/models/upload_file_type.py +38 -0
  302. revengai/models/upload_response.py +91 -0
  303. revengai/models/upsert_ai_decomplation_rating_request.py +94 -0
  304. revengai/models/user_activity_response.py +97 -0
  305. revengai/models/vulnerabilities.py +94 -0
  306. revengai/models/vulnerability.py +113 -0
  307. revengai/models/vulnerability_type.py +40 -0
  308. revengai/models/workspace.py +37 -0
  309. revengai/py.typed +0 -0
  310. revengai/rest.py +257 -0
  311. revengai-2.74.0.dist-info/METADATA +447 -0
  312. revengai-2.74.0.dist-info/RECORD +314 -0
  313. revengai-2.74.0.dist-info/WHEEL +4 -0
  314. revengai-2.74.0.dist-info/licenses/LICENSE.md +19 -0
@@ -0,0 +1,1151 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ RevEng.AI API
5
+
6
+ RevEng.AI is Similarity Search Engine for executable binaries
7
+
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
13
+ import warnings
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import StrictInt
19
+ from revengai.models.base_response import BaseResponse
20
+ from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory
21
+ from revengai.models.function_rename import FunctionRename
22
+ from revengai.models.functions_list_rename import FunctionsListRename
23
+
24
+ from revengai.api_client import ApiClient, RequestSerialized
25
+ from revengai.api_response import ApiResponse
26
+ from revengai.rest import RESTResponseType
27
+
28
+
29
+ class FunctionsRenamingHistoryApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+
42
+ @validate_call
43
+ def batch_rename_function(
44
+ self,
45
+ functions_list_rename: FunctionsListRename,
46
+ _request_timeout: Union[
47
+ None,
48
+ Annotated[StrictFloat, Field(gt=0)],
49
+ Tuple[
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Annotated[StrictFloat, Field(gt=0)]
52
+ ]
53
+ ] = None,
54
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
55
+ _content_type: Optional[StrictStr] = None,
56
+ _headers: Optional[Dict[StrictStr, Any]] = None,
57
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
58
+ ) -> BaseResponse:
59
+ """Batch Rename Functions
60
+
61
+ Renames a list of functions using the function IDs Will record name changes in history
62
+
63
+ :param functions_list_rename: (required)
64
+ :type functions_list_rename: FunctionsListRename
65
+ :param _request_timeout: timeout setting for this request. If one
66
+ number provided, it will be total request
67
+ timeout. It can also be a pair (tuple) of
68
+ (connection, read) timeouts.
69
+ :type _request_timeout: int, tuple(int, int), optional
70
+ :param _request_auth: set to override the auth_settings for an a single
71
+ request; this effectively ignores the
72
+ authentication in the spec for a single request.
73
+ :type _request_auth: dict, optional
74
+ :param _content_type: force content-type for the request.
75
+ :type _content_type: str, Optional
76
+ :param _headers: set to override the headers for a single
77
+ request; this effectively ignores the headers
78
+ in the spec for a single request.
79
+ :type _headers: dict, optional
80
+ :param _host_index: set to override the host_index for a single
81
+ request; this effectively ignores the host_index
82
+ in the spec for a single request.
83
+ :type _host_index: int, optional
84
+ :return: Returns the result object.
85
+ """ # noqa: E501
86
+
87
+ _param = self._batch_rename_function_serialize(
88
+ functions_list_rename=functions_list_rename,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index
93
+ )
94
+
95
+ _response_types_map: Dict[str, Optional[str]] = {
96
+ '200': "BaseResponse",
97
+ '422': "BaseResponse",
98
+ }
99
+ response_data = self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ def batch_rename_function_with_http_info(
112
+ self,
113
+ functions_list_rename: FunctionsListRename,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[BaseResponse]:
127
+ """Batch Rename Functions
128
+
129
+ Renames a list of functions using the function IDs Will record name changes in history
130
+
131
+ :param functions_list_rename: (required)
132
+ :type functions_list_rename: FunctionsListRename
133
+ :param _request_timeout: timeout setting for this request. If one
134
+ number provided, it will be total request
135
+ timeout. It can also be a pair (tuple) of
136
+ (connection, read) timeouts.
137
+ :type _request_timeout: int, tuple(int, int), optional
138
+ :param _request_auth: set to override the auth_settings for an a single
139
+ request; this effectively ignores the
140
+ authentication in the spec for a single request.
141
+ :type _request_auth: dict, optional
142
+ :param _content_type: force content-type for the request.
143
+ :type _content_type: str, Optional
144
+ :param _headers: set to override the headers for a single
145
+ request; this effectively ignores the headers
146
+ in the spec for a single request.
147
+ :type _headers: dict, optional
148
+ :param _host_index: set to override the host_index for a single
149
+ request; this effectively ignores the host_index
150
+ in the spec for a single request.
151
+ :type _host_index: int, optional
152
+ :return: Returns the result object.
153
+ """ # noqa: E501
154
+
155
+ _param = self._batch_rename_function_serialize(
156
+ functions_list_rename=functions_list_rename,
157
+ _request_auth=_request_auth,
158
+ _content_type=_content_type,
159
+ _headers=_headers,
160
+ _host_index=_host_index
161
+ )
162
+
163
+ _response_types_map: Dict[str, Optional[str]] = {
164
+ '200': "BaseResponse",
165
+ '422': "BaseResponse",
166
+ }
167
+ response_data = self.api_client.call_api(
168
+ *_param,
169
+ _request_timeout=_request_timeout
170
+ )
171
+ response_data.read()
172
+ return self.api_client.response_deserialize(
173
+ response_data=response_data,
174
+ response_types_map=_response_types_map,
175
+ )
176
+
177
+
178
+ @validate_call
179
+ def batch_rename_function_without_preload_content(
180
+ self,
181
+ functions_list_rename: FunctionsListRename,
182
+ _request_timeout: Union[
183
+ None,
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Tuple[
186
+ Annotated[StrictFloat, Field(gt=0)],
187
+ Annotated[StrictFloat, Field(gt=0)]
188
+ ]
189
+ ] = None,
190
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
191
+ _content_type: Optional[StrictStr] = None,
192
+ _headers: Optional[Dict[StrictStr, Any]] = None,
193
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
194
+ ) -> RESTResponseType:
195
+ """Batch Rename Functions
196
+
197
+ Renames a list of functions using the function IDs Will record name changes in history
198
+
199
+ :param functions_list_rename: (required)
200
+ :type functions_list_rename: FunctionsListRename
201
+ :param _request_timeout: timeout setting for this request. If one
202
+ number provided, it will be total request
203
+ timeout. It can also be a pair (tuple) of
204
+ (connection, read) timeouts.
205
+ :type _request_timeout: int, tuple(int, int), optional
206
+ :param _request_auth: set to override the auth_settings for an a single
207
+ request; this effectively ignores the
208
+ authentication in the spec for a single request.
209
+ :type _request_auth: dict, optional
210
+ :param _content_type: force content-type for the request.
211
+ :type _content_type: str, Optional
212
+ :param _headers: set to override the headers for a single
213
+ request; this effectively ignores the headers
214
+ in the spec for a single request.
215
+ :type _headers: dict, optional
216
+ :param _host_index: set to override the host_index for a single
217
+ request; this effectively ignores the host_index
218
+ in the spec for a single request.
219
+ :type _host_index: int, optional
220
+ :return: Returns the result object.
221
+ """ # noqa: E501
222
+
223
+ _param = self._batch_rename_function_serialize(
224
+ functions_list_rename=functions_list_rename,
225
+ _request_auth=_request_auth,
226
+ _content_type=_content_type,
227
+ _headers=_headers,
228
+ _host_index=_host_index
229
+ )
230
+
231
+ _response_types_map: Dict[str, Optional[str]] = {
232
+ '200': "BaseResponse",
233
+ '422': "BaseResponse",
234
+ }
235
+ response_data = self.api_client.call_api(
236
+ *_param,
237
+ _request_timeout=_request_timeout
238
+ )
239
+ return response_data.response
240
+
241
+
242
+ def _batch_rename_function_serialize(
243
+ self,
244
+ functions_list_rename,
245
+ _request_auth,
246
+ _content_type,
247
+ _headers,
248
+ _host_index,
249
+ ) -> RequestSerialized:
250
+
251
+ _host = None
252
+
253
+ _collection_formats: Dict[str, str] = {
254
+ }
255
+
256
+ _path_params: Dict[str, str] = {}
257
+ _query_params: List[Tuple[str, str]] = []
258
+ _header_params: Dict[str, Optional[str]] = _headers or {}
259
+ _form_params: List[Tuple[str, str]] = []
260
+ _files: Dict[
261
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
262
+ ] = {}
263
+ _body_params: Optional[bytes] = None
264
+
265
+ # process the path parameters
266
+ # process the query parameters
267
+ # process the header parameters
268
+ # process the form parameters
269
+ # process the body parameter
270
+ if functions_list_rename is not None:
271
+ _body_params = functions_list_rename
272
+
273
+
274
+ # set the HTTP header `Accept`
275
+ if 'Accept' not in _header_params:
276
+ _header_params['Accept'] = self.api_client.select_header_accept(
277
+ [
278
+ 'application/json'
279
+ ]
280
+ )
281
+
282
+ # set the HTTP header `Content-Type`
283
+ if _content_type:
284
+ _header_params['Content-Type'] = _content_type
285
+ else:
286
+ _default_content_type = (
287
+ self.api_client.select_header_content_type(
288
+ [
289
+ 'application/json'
290
+ ]
291
+ )
292
+ )
293
+ if _default_content_type is not None:
294
+ _header_params['Content-Type'] = _default_content_type
295
+
296
+ # authentication setting
297
+ _auth_settings: List[str] = [
298
+ 'APIKey'
299
+ ]
300
+
301
+ return self.api_client.param_serialize(
302
+ method='POST',
303
+ resource_path='/v2/functions/rename/batch',
304
+ path_params=_path_params,
305
+ query_params=_query_params,
306
+ header_params=_header_params,
307
+ body=_body_params,
308
+ post_params=_form_params,
309
+ files=_files,
310
+ auth_settings=_auth_settings,
311
+ collection_formats=_collection_formats,
312
+ _host=_host,
313
+ _request_auth=_request_auth
314
+ )
315
+
316
+
317
+
318
+
319
+ @validate_call
320
+ def get_function_name_history(
321
+ self,
322
+ function_id: StrictInt,
323
+ _request_timeout: Union[
324
+ None,
325
+ Annotated[StrictFloat, Field(gt=0)],
326
+ Tuple[
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Annotated[StrictFloat, Field(gt=0)]
329
+ ]
330
+ ] = None,
331
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
332
+ _content_type: Optional[StrictStr] = None,
333
+ _headers: Optional[Dict[StrictStr, Any]] = None,
334
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
335
+ ) -> BaseResponseListFunctionNameHistory:
336
+ """Get Function Name History
337
+
338
+ Gets the name history of a function using the function ID
339
+
340
+ :param function_id: (required)
341
+ :type function_id: int
342
+ :param _request_timeout: timeout setting for this request. If one
343
+ number provided, it will be total request
344
+ timeout. It can also be a pair (tuple) of
345
+ (connection, read) timeouts.
346
+ :type _request_timeout: int, tuple(int, int), optional
347
+ :param _request_auth: set to override the auth_settings for an a single
348
+ request; this effectively ignores the
349
+ authentication in the spec for a single request.
350
+ :type _request_auth: dict, optional
351
+ :param _content_type: force content-type for the request.
352
+ :type _content_type: str, Optional
353
+ :param _headers: set to override the headers for a single
354
+ request; this effectively ignores the headers
355
+ in the spec for a single request.
356
+ :type _headers: dict, optional
357
+ :param _host_index: set to override the host_index for a single
358
+ request; this effectively ignores the host_index
359
+ in the spec for a single request.
360
+ :type _host_index: int, optional
361
+ :return: Returns the result object.
362
+ """ # noqa: E501
363
+
364
+ _param = self._get_function_name_history_serialize(
365
+ function_id=function_id,
366
+ _request_auth=_request_auth,
367
+ _content_type=_content_type,
368
+ _headers=_headers,
369
+ _host_index=_host_index
370
+ )
371
+
372
+ _response_types_map: Dict[str, Optional[str]] = {
373
+ '200': "BaseResponseListFunctionNameHistory",
374
+ '422': "BaseResponse",
375
+ }
376
+ response_data = self.api_client.call_api(
377
+ *_param,
378
+ _request_timeout=_request_timeout
379
+ )
380
+ response_data.read()
381
+ return self.api_client.response_deserialize(
382
+ response_data=response_data,
383
+ response_types_map=_response_types_map,
384
+ ).data
385
+
386
+
387
+ @validate_call
388
+ def get_function_name_history_with_http_info(
389
+ self,
390
+ function_id: StrictInt,
391
+ _request_timeout: Union[
392
+ None,
393
+ Annotated[StrictFloat, Field(gt=0)],
394
+ Tuple[
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Annotated[StrictFloat, Field(gt=0)]
397
+ ]
398
+ ] = None,
399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
400
+ _content_type: Optional[StrictStr] = None,
401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
403
+ ) -> ApiResponse[BaseResponseListFunctionNameHistory]:
404
+ """Get Function Name History
405
+
406
+ Gets the name history of a function using the function ID
407
+
408
+ :param function_id: (required)
409
+ :type function_id: int
410
+ :param _request_timeout: timeout setting for this request. If one
411
+ number provided, it will be total request
412
+ timeout. It can also be a pair (tuple) of
413
+ (connection, read) timeouts.
414
+ :type _request_timeout: int, tuple(int, int), optional
415
+ :param _request_auth: set to override the auth_settings for an a single
416
+ request; this effectively ignores the
417
+ authentication in the spec for a single request.
418
+ :type _request_auth: dict, optional
419
+ :param _content_type: force content-type for the request.
420
+ :type _content_type: str, Optional
421
+ :param _headers: set to override the headers for a single
422
+ request; this effectively ignores the headers
423
+ in the spec for a single request.
424
+ :type _headers: dict, optional
425
+ :param _host_index: set to override the host_index for a single
426
+ request; this effectively ignores the host_index
427
+ in the spec for a single request.
428
+ :type _host_index: int, optional
429
+ :return: Returns the result object.
430
+ """ # noqa: E501
431
+
432
+ _param = self._get_function_name_history_serialize(
433
+ function_id=function_id,
434
+ _request_auth=_request_auth,
435
+ _content_type=_content_type,
436
+ _headers=_headers,
437
+ _host_index=_host_index
438
+ )
439
+
440
+ _response_types_map: Dict[str, Optional[str]] = {
441
+ '200': "BaseResponseListFunctionNameHistory",
442
+ '422': "BaseResponse",
443
+ }
444
+ response_data = self.api_client.call_api(
445
+ *_param,
446
+ _request_timeout=_request_timeout
447
+ )
448
+ response_data.read()
449
+ return self.api_client.response_deserialize(
450
+ response_data=response_data,
451
+ response_types_map=_response_types_map,
452
+ )
453
+
454
+
455
+ @validate_call
456
+ def get_function_name_history_without_preload_content(
457
+ self,
458
+ function_id: StrictInt,
459
+ _request_timeout: Union[
460
+ None,
461
+ Annotated[StrictFloat, Field(gt=0)],
462
+ Tuple[
463
+ Annotated[StrictFloat, Field(gt=0)],
464
+ Annotated[StrictFloat, Field(gt=0)]
465
+ ]
466
+ ] = None,
467
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
468
+ _content_type: Optional[StrictStr] = None,
469
+ _headers: Optional[Dict[StrictStr, Any]] = None,
470
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
471
+ ) -> RESTResponseType:
472
+ """Get Function Name History
473
+
474
+ Gets the name history of a function using the function ID
475
+
476
+ :param function_id: (required)
477
+ :type function_id: int
478
+ :param _request_timeout: timeout setting for this request. If one
479
+ number provided, it will be total request
480
+ timeout. It can also be a pair (tuple) of
481
+ (connection, read) timeouts.
482
+ :type _request_timeout: int, tuple(int, int), optional
483
+ :param _request_auth: set to override the auth_settings for an a single
484
+ request; this effectively ignores the
485
+ authentication in the spec for a single request.
486
+ :type _request_auth: dict, optional
487
+ :param _content_type: force content-type for the request.
488
+ :type _content_type: str, Optional
489
+ :param _headers: set to override the headers for a single
490
+ request; this effectively ignores the headers
491
+ in the spec for a single request.
492
+ :type _headers: dict, optional
493
+ :param _host_index: set to override the host_index for a single
494
+ request; this effectively ignores the host_index
495
+ in the spec for a single request.
496
+ :type _host_index: int, optional
497
+ :return: Returns the result object.
498
+ """ # noqa: E501
499
+
500
+ _param = self._get_function_name_history_serialize(
501
+ function_id=function_id,
502
+ _request_auth=_request_auth,
503
+ _content_type=_content_type,
504
+ _headers=_headers,
505
+ _host_index=_host_index
506
+ )
507
+
508
+ _response_types_map: Dict[str, Optional[str]] = {
509
+ '200': "BaseResponseListFunctionNameHistory",
510
+ '422': "BaseResponse",
511
+ }
512
+ response_data = self.api_client.call_api(
513
+ *_param,
514
+ _request_timeout=_request_timeout
515
+ )
516
+ return response_data.response
517
+
518
+
519
+ def _get_function_name_history_serialize(
520
+ self,
521
+ function_id,
522
+ _request_auth,
523
+ _content_type,
524
+ _headers,
525
+ _host_index,
526
+ ) -> RequestSerialized:
527
+
528
+ _host = None
529
+
530
+ _collection_formats: Dict[str, str] = {
531
+ }
532
+
533
+ _path_params: Dict[str, str] = {}
534
+ _query_params: List[Tuple[str, str]] = []
535
+ _header_params: Dict[str, Optional[str]] = _headers or {}
536
+ _form_params: List[Tuple[str, str]] = []
537
+ _files: Dict[
538
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
539
+ ] = {}
540
+ _body_params: Optional[bytes] = None
541
+
542
+ # process the path parameters
543
+ if function_id is not None:
544
+ _path_params['function_id'] = function_id
545
+ # process the query parameters
546
+ # process the header parameters
547
+ # process the form parameters
548
+ # process the body parameter
549
+
550
+
551
+ # set the HTTP header `Accept`
552
+ if 'Accept' not in _header_params:
553
+ _header_params['Accept'] = self.api_client.select_header_accept(
554
+ [
555
+ 'application/json'
556
+ ]
557
+ )
558
+
559
+
560
+ # authentication setting
561
+ _auth_settings: List[str] = [
562
+ 'APIKey'
563
+ ]
564
+
565
+ return self.api_client.param_serialize(
566
+ method='GET',
567
+ resource_path='/v2/functions/history/{function_id}',
568
+ path_params=_path_params,
569
+ query_params=_query_params,
570
+ header_params=_header_params,
571
+ body=_body_params,
572
+ post_params=_form_params,
573
+ files=_files,
574
+ auth_settings=_auth_settings,
575
+ collection_formats=_collection_formats,
576
+ _host=_host,
577
+ _request_auth=_request_auth
578
+ )
579
+
580
+
581
+
582
+
583
+ @validate_call
584
+ def rename_function_id(
585
+ self,
586
+ function_id: StrictInt,
587
+ function_rename: FunctionRename,
588
+ _request_timeout: Union[
589
+ None,
590
+ Annotated[StrictFloat, Field(gt=0)],
591
+ Tuple[
592
+ Annotated[StrictFloat, Field(gt=0)],
593
+ Annotated[StrictFloat, Field(gt=0)]
594
+ ]
595
+ ] = None,
596
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
597
+ _content_type: Optional[StrictStr] = None,
598
+ _headers: Optional[Dict[StrictStr, Any]] = None,
599
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
600
+ ) -> BaseResponse:
601
+ """Rename Function
602
+
603
+ Renames a function using the function ID Will record name change history
604
+
605
+ :param function_id: (required)
606
+ :type function_id: int
607
+ :param function_rename: (required)
608
+ :type function_rename: FunctionRename
609
+ :param _request_timeout: timeout setting for this request. If one
610
+ number provided, it will be total request
611
+ timeout. It can also be a pair (tuple) of
612
+ (connection, read) timeouts.
613
+ :type _request_timeout: int, tuple(int, int), optional
614
+ :param _request_auth: set to override the auth_settings for an a single
615
+ request; this effectively ignores the
616
+ authentication in the spec for a single request.
617
+ :type _request_auth: dict, optional
618
+ :param _content_type: force content-type for the request.
619
+ :type _content_type: str, Optional
620
+ :param _headers: set to override the headers for a single
621
+ request; this effectively ignores the headers
622
+ in the spec for a single request.
623
+ :type _headers: dict, optional
624
+ :param _host_index: set to override the host_index for a single
625
+ request; this effectively ignores the host_index
626
+ in the spec for a single request.
627
+ :type _host_index: int, optional
628
+ :return: Returns the result object.
629
+ """ # noqa: E501
630
+
631
+ _param = self._rename_function_id_serialize(
632
+ function_id=function_id,
633
+ function_rename=function_rename,
634
+ _request_auth=_request_auth,
635
+ _content_type=_content_type,
636
+ _headers=_headers,
637
+ _host_index=_host_index
638
+ )
639
+
640
+ _response_types_map: Dict[str, Optional[str]] = {
641
+ '200': "BaseResponse",
642
+ '422': "BaseResponse",
643
+ }
644
+ response_data = self.api_client.call_api(
645
+ *_param,
646
+ _request_timeout=_request_timeout
647
+ )
648
+ response_data.read()
649
+ return self.api_client.response_deserialize(
650
+ response_data=response_data,
651
+ response_types_map=_response_types_map,
652
+ ).data
653
+
654
+
655
+ @validate_call
656
+ def rename_function_id_with_http_info(
657
+ self,
658
+ function_id: StrictInt,
659
+ function_rename: FunctionRename,
660
+ _request_timeout: Union[
661
+ None,
662
+ Annotated[StrictFloat, Field(gt=0)],
663
+ Tuple[
664
+ Annotated[StrictFloat, Field(gt=0)],
665
+ Annotated[StrictFloat, Field(gt=0)]
666
+ ]
667
+ ] = None,
668
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
669
+ _content_type: Optional[StrictStr] = None,
670
+ _headers: Optional[Dict[StrictStr, Any]] = None,
671
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
672
+ ) -> ApiResponse[BaseResponse]:
673
+ """Rename Function
674
+
675
+ Renames a function using the function ID Will record name change history
676
+
677
+ :param function_id: (required)
678
+ :type function_id: int
679
+ :param function_rename: (required)
680
+ :type function_rename: FunctionRename
681
+ :param _request_timeout: timeout setting for this request. If one
682
+ number provided, it will be total request
683
+ timeout. It can also be a pair (tuple) of
684
+ (connection, read) timeouts.
685
+ :type _request_timeout: int, tuple(int, int), optional
686
+ :param _request_auth: set to override the auth_settings for an a single
687
+ request; this effectively ignores the
688
+ authentication in the spec for a single request.
689
+ :type _request_auth: dict, optional
690
+ :param _content_type: force content-type for the request.
691
+ :type _content_type: str, Optional
692
+ :param _headers: set to override the headers for a single
693
+ request; this effectively ignores the headers
694
+ in the spec for a single request.
695
+ :type _headers: dict, optional
696
+ :param _host_index: set to override the host_index for a single
697
+ request; this effectively ignores the host_index
698
+ in the spec for a single request.
699
+ :type _host_index: int, optional
700
+ :return: Returns the result object.
701
+ """ # noqa: E501
702
+
703
+ _param = self._rename_function_id_serialize(
704
+ function_id=function_id,
705
+ function_rename=function_rename,
706
+ _request_auth=_request_auth,
707
+ _content_type=_content_type,
708
+ _headers=_headers,
709
+ _host_index=_host_index
710
+ )
711
+
712
+ _response_types_map: Dict[str, Optional[str]] = {
713
+ '200': "BaseResponse",
714
+ '422': "BaseResponse",
715
+ }
716
+ response_data = self.api_client.call_api(
717
+ *_param,
718
+ _request_timeout=_request_timeout
719
+ )
720
+ response_data.read()
721
+ return self.api_client.response_deserialize(
722
+ response_data=response_data,
723
+ response_types_map=_response_types_map,
724
+ )
725
+
726
+
727
+ @validate_call
728
+ def rename_function_id_without_preload_content(
729
+ self,
730
+ function_id: StrictInt,
731
+ function_rename: FunctionRename,
732
+ _request_timeout: Union[
733
+ None,
734
+ Annotated[StrictFloat, Field(gt=0)],
735
+ Tuple[
736
+ Annotated[StrictFloat, Field(gt=0)],
737
+ Annotated[StrictFloat, Field(gt=0)]
738
+ ]
739
+ ] = None,
740
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
741
+ _content_type: Optional[StrictStr] = None,
742
+ _headers: Optional[Dict[StrictStr, Any]] = None,
743
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
744
+ ) -> RESTResponseType:
745
+ """Rename Function
746
+
747
+ Renames a function using the function ID Will record name change history
748
+
749
+ :param function_id: (required)
750
+ :type function_id: int
751
+ :param function_rename: (required)
752
+ :type function_rename: FunctionRename
753
+ :param _request_timeout: timeout setting for this request. If one
754
+ number provided, it will be total request
755
+ timeout. It can also be a pair (tuple) of
756
+ (connection, read) timeouts.
757
+ :type _request_timeout: int, tuple(int, int), optional
758
+ :param _request_auth: set to override the auth_settings for an a single
759
+ request; this effectively ignores the
760
+ authentication in the spec for a single request.
761
+ :type _request_auth: dict, optional
762
+ :param _content_type: force content-type for the request.
763
+ :type _content_type: str, Optional
764
+ :param _headers: set to override the headers for a single
765
+ request; this effectively ignores the headers
766
+ in the spec for a single request.
767
+ :type _headers: dict, optional
768
+ :param _host_index: set to override the host_index for a single
769
+ request; this effectively ignores the host_index
770
+ in the spec for a single request.
771
+ :type _host_index: int, optional
772
+ :return: Returns the result object.
773
+ """ # noqa: E501
774
+
775
+ _param = self._rename_function_id_serialize(
776
+ function_id=function_id,
777
+ function_rename=function_rename,
778
+ _request_auth=_request_auth,
779
+ _content_type=_content_type,
780
+ _headers=_headers,
781
+ _host_index=_host_index
782
+ )
783
+
784
+ _response_types_map: Dict[str, Optional[str]] = {
785
+ '200': "BaseResponse",
786
+ '422': "BaseResponse",
787
+ }
788
+ response_data = self.api_client.call_api(
789
+ *_param,
790
+ _request_timeout=_request_timeout
791
+ )
792
+ return response_data.response
793
+
794
+
795
+ def _rename_function_id_serialize(
796
+ self,
797
+ function_id,
798
+ function_rename,
799
+ _request_auth,
800
+ _content_type,
801
+ _headers,
802
+ _host_index,
803
+ ) -> RequestSerialized:
804
+
805
+ _host = None
806
+
807
+ _collection_formats: Dict[str, str] = {
808
+ }
809
+
810
+ _path_params: Dict[str, str] = {}
811
+ _query_params: List[Tuple[str, str]] = []
812
+ _header_params: Dict[str, Optional[str]] = _headers or {}
813
+ _form_params: List[Tuple[str, str]] = []
814
+ _files: Dict[
815
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
816
+ ] = {}
817
+ _body_params: Optional[bytes] = None
818
+
819
+ # process the path parameters
820
+ if function_id is not None:
821
+ _path_params['function_id'] = function_id
822
+ # process the query parameters
823
+ # process the header parameters
824
+ # process the form parameters
825
+ # process the body parameter
826
+ if function_rename is not None:
827
+ _body_params = function_rename
828
+
829
+
830
+ # set the HTTP header `Accept`
831
+ if 'Accept' not in _header_params:
832
+ _header_params['Accept'] = self.api_client.select_header_accept(
833
+ [
834
+ 'application/json'
835
+ ]
836
+ )
837
+
838
+ # set the HTTP header `Content-Type`
839
+ if _content_type:
840
+ _header_params['Content-Type'] = _content_type
841
+ else:
842
+ _default_content_type = (
843
+ self.api_client.select_header_content_type(
844
+ [
845
+ 'application/json'
846
+ ]
847
+ )
848
+ )
849
+ if _default_content_type is not None:
850
+ _header_params['Content-Type'] = _default_content_type
851
+
852
+ # authentication setting
853
+ _auth_settings: List[str] = [
854
+ 'APIKey'
855
+ ]
856
+
857
+ return self.api_client.param_serialize(
858
+ method='POST',
859
+ resource_path='/v2/functions/rename/{function_id}',
860
+ path_params=_path_params,
861
+ query_params=_query_params,
862
+ header_params=_header_params,
863
+ body=_body_params,
864
+ post_params=_form_params,
865
+ files=_files,
866
+ auth_settings=_auth_settings,
867
+ collection_formats=_collection_formats,
868
+ _host=_host,
869
+ _request_auth=_request_auth
870
+ )
871
+
872
+
873
+
874
+
875
+ @validate_call
876
+ def revert_function_name(
877
+ self,
878
+ function_id: StrictInt,
879
+ history_id: StrictInt,
880
+ _request_timeout: Union[
881
+ None,
882
+ Annotated[StrictFloat, Field(gt=0)],
883
+ Tuple[
884
+ Annotated[StrictFloat, Field(gt=0)],
885
+ Annotated[StrictFloat, Field(gt=0)]
886
+ ]
887
+ ] = None,
888
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
889
+ _content_type: Optional[StrictStr] = None,
890
+ _headers: Optional[Dict[StrictStr, Any]] = None,
891
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
892
+ ) -> BaseResponse:
893
+ """Revert the function name
894
+
895
+ Reverts the function name to a previous name using the function ID and history ID
896
+
897
+ :param function_id: (required)
898
+ :type function_id: int
899
+ :param history_id: (required)
900
+ :type history_id: int
901
+ :param _request_timeout: timeout setting for this request. If one
902
+ number provided, it will be total request
903
+ timeout. It can also be a pair (tuple) of
904
+ (connection, read) timeouts.
905
+ :type _request_timeout: int, tuple(int, int), optional
906
+ :param _request_auth: set to override the auth_settings for an a single
907
+ request; this effectively ignores the
908
+ authentication in the spec for a single request.
909
+ :type _request_auth: dict, optional
910
+ :param _content_type: force content-type for the request.
911
+ :type _content_type: str, Optional
912
+ :param _headers: set to override the headers for a single
913
+ request; this effectively ignores the headers
914
+ in the spec for a single request.
915
+ :type _headers: dict, optional
916
+ :param _host_index: set to override the host_index for a single
917
+ request; this effectively ignores the host_index
918
+ in the spec for a single request.
919
+ :type _host_index: int, optional
920
+ :return: Returns the result object.
921
+ """ # noqa: E501
922
+
923
+ _param = self._revert_function_name_serialize(
924
+ function_id=function_id,
925
+ history_id=history_id,
926
+ _request_auth=_request_auth,
927
+ _content_type=_content_type,
928
+ _headers=_headers,
929
+ _host_index=_host_index
930
+ )
931
+
932
+ _response_types_map: Dict[str, Optional[str]] = {
933
+ '200': "BaseResponse",
934
+ '422': "BaseResponse",
935
+ }
936
+ response_data = self.api_client.call_api(
937
+ *_param,
938
+ _request_timeout=_request_timeout
939
+ )
940
+ response_data.read()
941
+ return self.api_client.response_deserialize(
942
+ response_data=response_data,
943
+ response_types_map=_response_types_map,
944
+ ).data
945
+
946
+
947
+ @validate_call
948
+ def revert_function_name_with_http_info(
949
+ self,
950
+ function_id: StrictInt,
951
+ history_id: StrictInt,
952
+ _request_timeout: Union[
953
+ None,
954
+ Annotated[StrictFloat, Field(gt=0)],
955
+ Tuple[
956
+ Annotated[StrictFloat, Field(gt=0)],
957
+ Annotated[StrictFloat, Field(gt=0)]
958
+ ]
959
+ ] = None,
960
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
961
+ _content_type: Optional[StrictStr] = None,
962
+ _headers: Optional[Dict[StrictStr, Any]] = None,
963
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
964
+ ) -> ApiResponse[BaseResponse]:
965
+ """Revert the function name
966
+
967
+ Reverts the function name to a previous name using the function ID and history ID
968
+
969
+ :param function_id: (required)
970
+ :type function_id: int
971
+ :param history_id: (required)
972
+ :type history_id: int
973
+ :param _request_timeout: timeout setting for this request. If one
974
+ number provided, it will be total request
975
+ timeout. It can also be a pair (tuple) of
976
+ (connection, read) timeouts.
977
+ :type _request_timeout: int, tuple(int, int), optional
978
+ :param _request_auth: set to override the auth_settings for an a single
979
+ request; this effectively ignores the
980
+ authentication in the spec for a single request.
981
+ :type _request_auth: dict, optional
982
+ :param _content_type: force content-type for the request.
983
+ :type _content_type: str, Optional
984
+ :param _headers: set to override the headers for a single
985
+ request; this effectively ignores the headers
986
+ in the spec for a single request.
987
+ :type _headers: dict, optional
988
+ :param _host_index: set to override the host_index for a single
989
+ request; this effectively ignores the host_index
990
+ in the spec for a single request.
991
+ :type _host_index: int, optional
992
+ :return: Returns the result object.
993
+ """ # noqa: E501
994
+
995
+ _param = self._revert_function_name_serialize(
996
+ function_id=function_id,
997
+ history_id=history_id,
998
+ _request_auth=_request_auth,
999
+ _content_type=_content_type,
1000
+ _headers=_headers,
1001
+ _host_index=_host_index
1002
+ )
1003
+
1004
+ _response_types_map: Dict[str, Optional[str]] = {
1005
+ '200': "BaseResponse",
1006
+ '422': "BaseResponse",
1007
+ }
1008
+ response_data = self.api_client.call_api(
1009
+ *_param,
1010
+ _request_timeout=_request_timeout
1011
+ )
1012
+ response_data.read()
1013
+ return self.api_client.response_deserialize(
1014
+ response_data=response_data,
1015
+ response_types_map=_response_types_map,
1016
+ )
1017
+
1018
+
1019
+ @validate_call
1020
+ def revert_function_name_without_preload_content(
1021
+ self,
1022
+ function_id: StrictInt,
1023
+ history_id: StrictInt,
1024
+ _request_timeout: Union[
1025
+ None,
1026
+ Annotated[StrictFloat, Field(gt=0)],
1027
+ Tuple[
1028
+ Annotated[StrictFloat, Field(gt=0)],
1029
+ Annotated[StrictFloat, Field(gt=0)]
1030
+ ]
1031
+ ] = None,
1032
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1033
+ _content_type: Optional[StrictStr] = None,
1034
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1035
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1036
+ ) -> RESTResponseType:
1037
+ """Revert the function name
1038
+
1039
+ Reverts the function name to a previous name using the function ID and history ID
1040
+
1041
+ :param function_id: (required)
1042
+ :type function_id: int
1043
+ :param history_id: (required)
1044
+ :type history_id: int
1045
+ :param _request_timeout: timeout setting for this request. If one
1046
+ number provided, it will be total request
1047
+ timeout. It can also be a pair (tuple) of
1048
+ (connection, read) timeouts.
1049
+ :type _request_timeout: int, tuple(int, int), optional
1050
+ :param _request_auth: set to override the auth_settings for an a single
1051
+ request; this effectively ignores the
1052
+ authentication in the spec for a single request.
1053
+ :type _request_auth: dict, optional
1054
+ :param _content_type: force content-type for the request.
1055
+ :type _content_type: str, Optional
1056
+ :param _headers: set to override the headers for a single
1057
+ request; this effectively ignores the headers
1058
+ in the spec for a single request.
1059
+ :type _headers: dict, optional
1060
+ :param _host_index: set to override the host_index for a single
1061
+ request; this effectively ignores the host_index
1062
+ in the spec for a single request.
1063
+ :type _host_index: int, optional
1064
+ :return: Returns the result object.
1065
+ """ # noqa: E501
1066
+
1067
+ _param = self._revert_function_name_serialize(
1068
+ function_id=function_id,
1069
+ history_id=history_id,
1070
+ _request_auth=_request_auth,
1071
+ _content_type=_content_type,
1072
+ _headers=_headers,
1073
+ _host_index=_host_index
1074
+ )
1075
+
1076
+ _response_types_map: Dict[str, Optional[str]] = {
1077
+ '200': "BaseResponse",
1078
+ '422': "BaseResponse",
1079
+ }
1080
+ response_data = self.api_client.call_api(
1081
+ *_param,
1082
+ _request_timeout=_request_timeout
1083
+ )
1084
+ return response_data.response
1085
+
1086
+
1087
+ def _revert_function_name_serialize(
1088
+ self,
1089
+ function_id,
1090
+ history_id,
1091
+ _request_auth,
1092
+ _content_type,
1093
+ _headers,
1094
+ _host_index,
1095
+ ) -> RequestSerialized:
1096
+
1097
+ _host = None
1098
+
1099
+ _collection_formats: Dict[str, str] = {
1100
+ }
1101
+
1102
+ _path_params: Dict[str, str] = {}
1103
+ _query_params: List[Tuple[str, str]] = []
1104
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1105
+ _form_params: List[Tuple[str, str]] = []
1106
+ _files: Dict[
1107
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1108
+ ] = {}
1109
+ _body_params: Optional[bytes] = None
1110
+
1111
+ # process the path parameters
1112
+ if function_id is not None:
1113
+ _path_params['function_id'] = function_id
1114
+ if history_id is not None:
1115
+ _path_params['history_id'] = history_id
1116
+ # process the query parameters
1117
+ # process the header parameters
1118
+ # process the form parameters
1119
+ # process the body parameter
1120
+
1121
+
1122
+ # set the HTTP header `Accept`
1123
+ if 'Accept' not in _header_params:
1124
+ _header_params['Accept'] = self.api_client.select_header_accept(
1125
+ [
1126
+ 'application/json'
1127
+ ]
1128
+ )
1129
+
1130
+
1131
+ # authentication setting
1132
+ _auth_settings: List[str] = [
1133
+ 'APIKey'
1134
+ ]
1135
+
1136
+ return self.api_client.param_serialize(
1137
+ method='POST',
1138
+ resource_path='/v2/functions/history/{function_id}/{history_id}',
1139
+ path_params=_path_params,
1140
+ query_params=_query_params,
1141
+ header_params=_header_params,
1142
+ body=_body_params,
1143
+ post_params=_form_params,
1144
+ files=_files,
1145
+ auth_settings=_auth_settings,
1146
+ collection_formats=_collection_formats,
1147
+ _host=_host,
1148
+ _request_auth=_request_auth
1149
+ )
1150
+
1151
+