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,1746 @@
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 typing import List, Optional
20
+ from revengai.models.base_response_function_data_types import BaseResponseFunctionDataTypes
21
+ from revengai.models.base_response_function_data_types_list import BaseResponseFunctionDataTypesList
22
+ from revengai.models.base_response_generate_function_data_types import BaseResponseGenerateFunctionDataTypes
23
+ from revengai.models.base_response_generation_status_list import BaseResponseGenerationStatusList
24
+ from revengai.models.function_data_types_params import FunctionDataTypesParams
25
+ from revengai.models.update_function_data_types import UpdateFunctionDataTypes
26
+
27
+ from revengai.api_client import ApiClient, RequestSerialized
28
+ from revengai.api_response import ApiResponse
29
+ from revengai.rest import RESTResponseType
30
+
31
+
32
+ class FunctionsDataTypesApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+
45
+ @validate_call
46
+ def generate_function_data_types_for_analysis(
47
+ self,
48
+ analysis_id: StrictInt,
49
+ function_data_types_params: FunctionDataTypesParams,
50
+ _request_timeout: Union[
51
+ None,
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Tuple[
54
+ Annotated[StrictFloat, Field(gt=0)],
55
+ Annotated[StrictFloat, Field(gt=0)]
56
+ ]
57
+ ] = None,
58
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
59
+ _content_type: Optional[StrictStr] = None,
60
+ _headers: Optional[Dict[StrictStr, Any]] = None,
61
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
+ ) -> BaseResponseGenerateFunctionDataTypes:
63
+ """Generate Function Data Types
64
+
65
+ Submits a request to generate the function data types
66
+
67
+ :param analysis_id: (required)
68
+ :type analysis_id: int
69
+ :param function_data_types_params: (required)
70
+ :type function_data_types_params: FunctionDataTypesParams
71
+ :param _request_timeout: timeout setting for this request. If one
72
+ number provided, it will be total request
73
+ timeout. It can also be a pair (tuple) of
74
+ (connection, read) timeouts.
75
+ :type _request_timeout: int, tuple(int, int), optional
76
+ :param _request_auth: set to override the auth_settings for an a single
77
+ request; this effectively ignores the
78
+ authentication in the spec for a single request.
79
+ :type _request_auth: dict, optional
80
+ :param _content_type: force content-type for the request.
81
+ :type _content_type: str, Optional
82
+ :param _headers: set to override the headers for a single
83
+ request; this effectively ignores the headers
84
+ in the spec for a single request.
85
+ :type _headers: dict, optional
86
+ :param _host_index: set to override the host_index for a single
87
+ request; this effectively ignores the host_index
88
+ in the spec for a single request.
89
+ :type _host_index: int, optional
90
+ :return: Returns the result object.
91
+ """ # noqa: E501
92
+
93
+ _param = self._generate_function_data_types_for_analysis_serialize(
94
+ analysis_id=analysis_id,
95
+ function_data_types_params=function_data_types_params,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ '201': "BaseResponseGenerateFunctionDataTypes",
104
+ '422': "BaseResponse",
105
+ }
106
+ response_data = self.api_client.call_api(
107
+ *_param,
108
+ _request_timeout=_request_timeout
109
+ )
110
+ response_data.read()
111
+ return self.api_client.response_deserialize(
112
+ response_data=response_data,
113
+ response_types_map=_response_types_map,
114
+ ).data
115
+
116
+
117
+ @validate_call
118
+ def generate_function_data_types_for_analysis_with_http_info(
119
+ self,
120
+ analysis_id: StrictInt,
121
+ function_data_types_params: FunctionDataTypesParams,
122
+ _request_timeout: Union[
123
+ None,
124
+ Annotated[StrictFloat, Field(gt=0)],
125
+ Tuple[
126
+ Annotated[StrictFloat, Field(gt=0)],
127
+ Annotated[StrictFloat, Field(gt=0)]
128
+ ]
129
+ ] = None,
130
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
131
+ _content_type: Optional[StrictStr] = None,
132
+ _headers: Optional[Dict[StrictStr, Any]] = None,
133
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
134
+ ) -> ApiResponse[BaseResponseGenerateFunctionDataTypes]:
135
+ """Generate Function Data Types
136
+
137
+ Submits a request to generate the function data types
138
+
139
+ :param analysis_id: (required)
140
+ :type analysis_id: int
141
+ :param function_data_types_params: (required)
142
+ :type function_data_types_params: FunctionDataTypesParams
143
+ :param _request_timeout: timeout setting for this request. If one
144
+ number provided, it will be total request
145
+ timeout. It can also be a pair (tuple) of
146
+ (connection, read) timeouts.
147
+ :type _request_timeout: int, tuple(int, int), optional
148
+ :param _request_auth: set to override the auth_settings for an a single
149
+ request; this effectively ignores the
150
+ authentication in the spec for a single request.
151
+ :type _request_auth: dict, optional
152
+ :param _content_type: force content-type for the request.
153
+ :type _content_type: str, Optional
154
+ :param _headers: set to override the headers for a single
155
+ request; this effectively ignores the headers
156
+ in the spec for a single request.
157
+ :type _headers: dict, optional
158
+ :param _host_index: set to override the host_index for a single
159
+ request; this effectively ignores the host_index
160
+ in the spec for a single request.
161
+ :type _host_index: int, optional
162
+ :return: Returns the result object.
163
+ """ # noqa: E501
164
+
165
+ _param = self._generate_function_data_types_for_analysis_serialize(
166
+ analysis_id=analysis_id,
167
+ function_data_types_params=function_data_types_params,
168
+ _request_auth=_request_auth,
169
+ _content_type=_content_type,
170
+ _headers=_headers,
171
+ _host_index=_host_index
172
+ )
173
+
174
+ _response_types_map: Dict[str, Optional[str]] = {
175
+ '201': "BaseResponseGenerateFunctionDataTypes",
176
+ '422': "BaseResponse",
177
+ }
178
+ response_data = self.api_client.call_api(
179
+ *_param,
180
+ _request_timeout=_request_timeout
181
+ )
182
+ response_data.read()
183
+ return self.api_client.response_deserialize(
184
+ response_data=response_data,
185
+ response_types_map=_response_types_map,
186
+ )
187
+
188
+
189
+ @validate_call
190
+ def generate_function_data_types_for_analysis_without_preload_content(
191
+ self,
192
+ analysis_id: StrictInt,
193
+ function_data_types_params: FunctionDataTypesParams,
194
+ _request_timeout: Union[
195
+ None,
196
+ Annotated[StrictFloat, Field(gt=0)],
197
+ Tuple[
198
+ Annotated[StrictFloat, Field(gt=0)],
199
+ Annotated[StrictFloat, Field(gt=0)]
200
+ ]
201
+ ] = None,
202
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
203
+ _content_type: Optional[StrictStr] = None,
204
+ _headers: Optional[Dict[StrictStr, Any]] = None,
205
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
206
+ ) -> RESTResponseType:
207
+ """Generate Function Data Types
208
+
209
+ Submits a request to generate the function data types
210
+
211
+ :param analysis_id: (required)
212
+ :type analysis_id: int
213
+ :param function_data_types_params: (required)
214
+ :type function_data_types_params: FunctionDataTypesParams
215
+ :param _request_timeout: timeout setting for this request. If one
216
+ number provided, it will be total request
217
+ timeout. It can also be a pair (tuple) of
218
+ (connection, read) timeouts.
219
+ :type _request_timeout: int, tuple(int, int), optional
220
+ :param _request_auth: set to override the auth_settings for an a single
221
+ request; this effectively ignores the
222
+ authentication in the spec for a single request.
223
+ :type _request_auth: dict, optional
224
+ :param _content_type: force content-type for the request.
225
+ :type _content_type: str, Optional
226
+ :param _headers: set to override the headers for a single
227
+ request; this effectively ignores the headers
228
+ in the spec for a single request.
229
+ :type _headers: dict, optional
230
+ :param _host_index: set to override the host_index for a single
231
+ request; this effectively ignores the host_index
232
+ in the spec for a single request.
233
+ :type _host_index: int, optional
234
+ :return: Returns the result object.
235
+ """ # noqa: E501
236
+
237
+ _param = self._generate_function_data_types_for_analysis_serialize(
238
+ analysis_id=analysis_id,
239
+ function_data_types_params=function_data_types_params,
240
+ _request_auth=_request_auth,
241
+ _content_type=_content_type,
242
+ _headers=_headers,
243
+ _host_index=_host_index
244
+ )
245
+
246
+ _response_types_map: Dict[str, Optional[str]] = {
247
+ '201': "BaseResponseGenerateFunctionDataTypes",
248
+ '422': "BaseResponse",
249
+ }
250
+ response_data = self.api_client.call_api(
251
+ *_param,
252
+ _request_timeout=_request_timeout
253
+ )
254
+ return response_data.response
255
+
256
+
257
+ def _generate_function_data_types_for_analysis_serialize(
258
+ self,
259
+ analysis_id,
260
+ function_data_types_params,
261
+ _request_auth,
262
+ _content_type,
263
+ _headers,
264
+ _host_index,
265
+ ) -> RequestSerialized:
266
+
267
+ _host = None
268
+
269
+ _collection_formats: Dict[str, str] = {
270
+ }
271
+
272
+ _path_params: Dict[str, str] = {}
273
+ _query_params: List[Tuple[str, str]] = []
274
+ _header_params: Dict[str, Optional[str]] = _headers or {}
275
+ _form_params: List[Tuple[str, str]] = []
276
+ _files: Dict[
277
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
+ ] = {}
279
+ _body_params: Optional[bytes] = None
280
+
281
+ # process the path parameters
282
+ if analysis_id is not None:
283
+ _path_params['analysis_id'] = analysis_id
284
+ # process the query parameters
285
+ # process the header parameters
286
+ # process the form parameters
287
+ # process the body parameter
288
+ if function_data_types_params is not None:
289
+ _body_params = function_data_types_params
290
+
291
+
292
+ # set the HTTP header `Accept`
293
+ if 'Accept' not in _header_params:
294
+ _header_params['Accept'] = self.api_client.select_header_accept(
295
+ [
296
+ 'application/json'
297
+ ]
298
+ )
299
+
300
+ # set the HTTP header `Content-Type`
301
+ if _content_type:
302
+ _header_params['Content-Type'] = _content_type
303
+ else:
304
+ _default_content_type = (
305
+ self.api_client.select_header_content_type(
306
+ [
307
+ 'application/json'
308
+ ]
309
+ )
310
+ )
311
+ if _default_content_type is not None:
312
+ _header_params['Content-Type'] = _default_content_type
313
+
314
+ # authentication setting
315
+ _auth_settings: List[str] = [
316
+ 'APIKey'
317
+ ]
318
+
319
+ return self.api_client.param_serialize(
320
+ method='POST',
321
+ resource_path='/v2/analyses/{analysis_id}/functions/data_types',
322
+ path_params=_path_params,
323
+ query_params=_query_params,
324
+ header_params=_header_params,
325
+ body=_body_params,
326
+ post_params=_form_params,
327
+ files=_files,
328
+ auth_settings=_auth_settings,
329
+ collection_formats=_collection_formats,
330
+ _host=_host,
331
+ _request_auth=_request_auth
332
+ )
333
+
334
+
335
+
336
+
337
+ @validate_call
338
+ def generate_function_data_types_for_functions(
339
+ self,
340
+ function_data_types_params: FunctionDataTypesParams,
341
+ _request_timeout: Union[
342
+ None,
343
+ Annotated[StrictFloat, Field(gt=0)],
344
+ Tuple[
345
+ Annotated[StrictFloat, Field(gt=0)],
346
+ Annotated[StrictFloat, Field(gt=0)]
347
+ ]
348
+ ] = None,
349
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
350
+ _content_type: Optional[StrictStr] = None,
351
+ _headers: Optional[Dict[StrictStr, Any]] = None,
352
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
353
+ ) -> BaseResponseGenerationStatusList:
354
+ """Generate Function Data Types for an arbitrary list of functions
355
+
356
+ Submits a request to generate the function data types
357
+
358
+ :param function_data_types_params: (required)
359
+ :type function_data_types_params: FunctionDataTypesParams
360
+ :param _request_timeout: timeout setting for this request. If one
361
+ number provided, it will be total request
362
+ timeout. It can also be a pair (tuple) of
363
+ (connection, read) timeouts.
364
+ :type _request_timeout: int, tuple(int, int), optional
365
+ :param _request_auth: set to override the auth_settings for an a single
366
+ request; this effectively ignores the
367
+ authentication in the spec for a single request.
368
+ :type _request_auth: dict, optional
369
+ :param _content_type: force content-type for the request.
370
+ :type _content_type: str, Optional
371
+ :param _headers: set to override the headers for a single
372
+ request; this effectively ignores the headers
373
+ in the spec for a single request.
374
+ :type _headers: dict, optional
375
+ :param _host_index: set to override the host_index for a single
376
+ request; this effectively ignores the host_index
377
+ in the spec for a single request.
378
+ :type _host_index: int, optional
379
+ :return: Returns the result object.
380
+ """ # noqa: E501
381
+
382
+ _param = self._generate_function_data_types_for_functions_serialize(
383
+ function_data_types_params=function_data_types_params,
384
+ _request_auth=_request_auth,
385
+ _content_type=_content_type,
386
+ _headers=_headers,
387
+ _host_index=_host_index
388
+ )
389
+
390
+ _response_types_map: Dict[str, Optional[str]] = {
391
+ '201': "BaseResponseGenerationStatusList",
392
+ '422': "BaseResponse",
393
+ }
394
+ response_data = self.api_client.call_api(
395
+ *_param,
396
+ _request_timeout=_request_timeout
397
+ )
398
+ response_data.read()
399
+ return self.api_client.response_deserialize(
400
+ response_data=response_data,
401
+ response_types_map=_response_types_map,
402
+ ).data
403
+
404
+
405
+ @validate_call
406
+ def generate_function_data_types_for_functions_with_http_info(
407
+ self,
408
+ function_data_types_params: FunctionDataTypesParams,
409
+ _request_timeout: Union[
410
+ None,
411
+ Annotated[StrictFloat, Field(gt=0)],
412
+ Tuple[
413
+ Annotated[StrictFloat, Field(gt=0)],
414
+ Annotated[StrictFloat, Field(gt=0)]
415
+ ]
416
+ ] = None,
417
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
418
+ _content_type: Optional[StrictStr] = None,
419
+ _headers: Optional[Dict[StrictStr, Any]] = None,
420
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
421
+ ) -> ApiResponse[BaseResponseGenerationStatusList]:
422
+ """Generate Function Data Types for an arbitrary list of functions
423
+
424
+ Submits a request to generate the function data types
425
+
426
+ :param function_data_types_params: (required)
427
+ :type function_data_types_params: FunctionDataTypesParams
428
+ :param _request_timeout: timeout setting for this request. If one
429
+ number provided, it will be total request
430
+ timeout. It can also be a pair (tuple) of
431
+ (connection, read) timeouts.
432
+ :type _request_timeout: int, tuple(int, int), optional
433
+ :param _request_auth: set to override the auth_settings for an a single
434
+ request; this effectively ignores the
435
+ authentication in the spec for a single request.
436
+ :type _request_auth: dict, optional
437
+ :param _content_type: force content-type for the request.
438
+ :type _content_type: str, Optional
439
+ :param _headers: set to override the headers for a single
440
+ request; this effectively ignores the headers
441
+ in the spec for a single request.
442
+ :type _headers: dict, optional
443
+ :param _host_index: set to override the host_index for a single
444
+ request; this effectively ignores the host_index
445
+ in the spec for a single request.
446
+ :type _host_index: int, optional
447
+ :return: Returns the result object.
448
+ """ # noqa: E501
449
+
450
+ _param = self._generate_function_data_types_for_functions_serialize(
451
+ function_data_types_params=function_data_types_params,
452
+ _request_auth=_request_auth,
453
+ _content_type=_content_type,
454
+ _headers=_headers,
455
+ _host_index=_host_index
456
+ )
457
+
458
+ _response_types_map: Dict[str, Optional[str]] = {
459
+ '201': "BaseResponseGenerationStatusList",
460
+ '422': "BaseResponse",
461
+ }
462
+ response_data = self.api_client.call_api(
463
+ *_param,
464
+ _request_timeout=_request_timeout
465
+ )
466
+ response_data.read()
467
+ return self.api_client.response_deserialize(
468
+ response_data=response_data,
469
+ response_types_map=_response_types_map,
470
+ )
471
+
472
+
473
+ @validate_call
474
+ def generate_function_data_types_for_functions_without_preload_content(
475
+ self,
476
+ function_data_types_params: FunctionDataTypesParams,
477
+ _request_timeout: Union[
478
+ None,
479
+ Annotated[StrictFloat, Field(gt=0)],
480
+ Tuple[
481
+ Annotated[StrictFloat, Field(gt=0)],
482
+ Annotated[StrictFloat, Field(gt=0)]
483
+ ]
484
+ ] = None,
485
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
486
+ _content_type: Optional[StrictStr] = None,
487
+ _headers: Optional[Dict[StrictStr, Any]] = None,
488
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
489
+ ) -> RESTResponseType:
490
+ """Generate Function Data Types for an arbitrary list of functions
491
+
492
+ Submits a request to generate the function data types
493
+
494
+ :param function_data_types_params: (required)
495
+ :type function_data_types_params: FunctionDataTypesParams
496
+ :param _request_timeout: timeout setting for this request. If one
497
+ number provided, it will be total request
498
+ timeout. It can also be a pair (tuple) of
499
+ (connection, read) timeouts.
500
+ :type _request_timeout: int, tuple(int, int), optional
501
+ :param _request_auth: set to override the auth_settings for an a single
502
+ request; this effectively ignores the
503
+ authentication in the spec for a single request.
504
+ :type _request_auth: dict, optional
505
+ :param _content_type: force content-type for the request.
506
+ :type _content_type: str, Optional
507
+ :param _headers: set to override the headers for a single
508
+ request; this effectively ignores the headers
509
+ in the spec for a single request.
510
+ :type _headers: dict, optional
511
+ :param _host_index: set to override the host_index for a single
512
+ request; this effectively ignores the host_index
513
+ in the spec for a single request.
514
+ :type _host_index: int, optional
515
+ :return: Returns the result object.
516
+ """ # noqa: E501
517
+
518
+ _param = self._generate_function_data_types_for_functions_serialize(
519
+ function_data_types_params=function_data_types_params,
520
+ _request_auth=_request_auth,
521
+ _content_type=_content_type,
522
+ _headers=_headers,
523
+ _host_index=_host_index
524
+ )
525
+
526
+ _response_types_map: Dict[str, Optional[str]] = {
527
+ '201': "BaseResponseGenerationStatusList",
528
+ '422': "BaseResponse",
529
+ }
530
+ response_data = self.api_client.call_api(
531
+ *_param,
532
+ _request_timeout=_request_timeout
533
+ )
534
+ return response_data.response
535
+
536
+
537
+ def _generate_function_data_types_for_functions_serialize(
538
+ self,
539
+ function_data_types_params,
540
+ _request_auth,
541
+ _content_type,
542
+ _headers,
543
+ _host_index,
544
+ ) -> RequestSerialized:
545
+
546
+ _host = None
547
+
548
+ _collection_formats: Dict[str, str] = {
549
+ }
550
+
551
+ _path_params: Dict[str, str] = {}
552
+ _query_params: List[Tuple[str, str]] = []
553
+ _header_params: Dict[str, Optional[str]] = _headers or {}
554
+ _form_params: List[Tuple[str, str]] = []
555
+ _files: Dict[
556
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
557
+ ] = {}
558
+ _body_params: Optional[bytes] = None
559
+
560
+ # process the path parameters
561
+ # process the query parameters
562
+ # process the header parameters
563
+ # process the form parameters
564
+ # process the body parameter
565
+ if function_data_types_params is not None:
566
+ _body_params = function_data_types_params
567
+
568
+
569
+ # set the HTTP header `Accept`
570
+ if 'Accept' not in _header_params:
571
+ _header_params['Accept'] = self.api_client.select_header_accept(
572
+ [
573
+ 'application/json'
574
+ ]
575
+ )
576
+
577
+ # set the HTTP header `Content-Type`
578
+ if _content_type:
579
+ _header_params['Content-Type'] = _content_type
580
+ else:
581
+ _default_content_type = (
582
+ self.api_client.select_header_content_type(
583
+ [
584
+ 'application/json'
585
+ ]
586
+ )
587
+ )
588
+ if _default_content_type is not None:
589
+ _header_params['Content-Type'] = _default_content_type
590
+
591
+ # authentication setting
592
+ _auth_settings: List[str] = [
593
+ 'APIKey'
594
+ ]
595
+
596
+ return self.api_client.param_serialize(
597
+ method='POST',
598
+ resource_path='/v2/functions/data_types',
599
+ path_params=_path_params,
600
+ query_params=_query_params,
601
+ header_params=_header_params,
602
+ body=_body_params,
603
+ post_params=_form_params,
604
+ files=_files,
605
+ auth_settings=_auth_settings,
606
+ collection_formats=_collection_formats,
607
+ _host=_host,
608
+ _request_auth=_request_auth
609
+ )
610
+
611
+
612
+
613
+
614
+ @validate_call
615
+ def get_function_data_types(
616
+ self,
617
+ analysis_id: StrictInt,
618
+ function_id: StrictInt,
619
+ _request_timeout: Union[
620
+ None,
621
+ Annotated[StrictFloat, Field(gt=0)],
622
+ Tuple[
623
+ Annotated[StrictFloat, Field(gt=0)],
624
+ Annotated[StrictFloat, Field(gt=0)]
625
+ ]
626
+ ] = None,
627
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
628
+ _content_type: Optional[StrictStr] = None,
629
+ _headers: Optional[Dict[StrictStr, Any]] = None,
630
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
631
+ ) -> BaseResponseFunctionDataTypes:
632
+ """Get Function Data Types
633
+
634
+ Polling endpoint which returns the current status of function generation and once completed the data type information
635
+
636
+ :param analysis_id: (required)
637
+ :type analysis_id: int
638
+ :param function_id: (required)
639
+ :type function_id: int
640
+ :param _request_timeout: timeout setting for this request. If one
641
+ number provided, it will be total request
642
+ timeout. It can also be a pair (tuple) of
643
+ (connection, read) timeouts.
644
+ :type _request_timeout: int, tuple(int, int), optional
645
+ :param _request_auth: set to override the auth_settings for an a single
646
+ request; this effectively ignores the
647
+ authentication in the spec for a single request.
648
+ :type _request_auth: dict, optional
649
+ :param _content_type: force content-type for the request.
650
+ :type _content_type: str, Optional
651
+ :param _headers: set to override the headers for a single
652
+ request; this effectively ignores the headers
653
+ in the spec for a single request.
654
+ :type _headers: dict, optional
655
+ :param _host_index: set to override the host_index for a single
656
+ request; this effectively ignores the host_index
657
+ in the spec for a single request.
658
+ :type _host_index: int, optional
659
+ :return: Returns the result object.
660
+ """ # noqa: E501
661
+
662
+ _param = self._get_function_data_types_serialize(
663
+ analysis_id=analysis_id,
664
+ function_id=function_id,
665
+ _request_auth=_request_auth,
666
+ _content_type=_content_type,
667
+ _headers=_headers,
668
+ _host_index=_host_index
669
+ )
670
+
671
+ _response_types_map: Dict[str, Optional[str]] = {
672
+ '200': "BaseResponseFunctionDataTypes",
673
+ '422': "BaseResponse",
674
+ }
675
+ response_data = self.api_client.call_api(
676
+ *_param,
677
+ _request_timeout=_request_timeout
678
+ )
679
+ response_data.read()
680
+ return self.api_client.response_deserialize(
681
+ response_data=response_data,
682
+ response_types_map=_response_types_map,
683
+ ).data
684
+
685
+
686
+ @validate_call
687
+ def get_function_data_types_with_http_info(
688
+ self,
689
+ analysis_id: StrictInt,
690
+ function_id: StrictInt,
691
+ _request_timeout: Union[
692
+ None,
693
+ Annotated[StrictFloat, Field(gt=0)],
694
+ Tuple[
695
+ Annotated[StrictFloat, Field(gt=0)],
696
+ Annotated[StrictFloat, Field(gt=0)]
697
+ ]
698
+ ] = None,
699
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
700
+ _content_type: Optional[StrictStr] = None,
701
+ _headers: Optional[Dict[StrictStr, Any]] = None,
702
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
703
+ ) -> ApiResponse[BaseResponseFunctionDataTypes]:
704
+ """Get Function Data Types
705
+
706
+ Polling endpoint which returns the current status of function generation and once completed the data type information
707
+
708
+ :param analysis_id: (required)
709
+ :type analysis_id: int
710
+ :param function_id: (required)
711
+ :type function_id: int
712
+ :param _request_timeout: timeout setting for this request. If one
713
+ number provided, it will be total request
714
+ timeout. It can also be a pair (tuple) of
715
+ (connection, read) timeouts.
716
+ :type _request_timeout: int, tuple(int, int), optional
717
+ :param _request_auth: set to override the auth_settings for an a single
718
+ request; this effectively ignores the
719
+ authentication in the spec for a single request.
720
+ :type _request_auth: dict, optional
721
+ :param _content_type: force content-type for the request.
722
+ :type _content_type: str, Optional
723
+ :param _headers: set to override the headers for a single
724
+ request; this effectively ignores the headers
725
+ in the spec for a single request.
726
+ :type _headers: dict, optional
727
+ :param _host_index: set to override the host_index for a single
728
+ request; this effectively ignores the host_index
729
+ in the spec for a single request.
730
+ :type _host_index: int, optional
731
+ :return: Returns the result object.
732
+ """ # noqa: E501
733
+
734
+ _param = self._get_function_data_types_serialize(
735
+ analysis_id=analysis_id,
736
+ function_id=function_id,
737
+ _request_auth=_request_auth,
738
+ _content_type=_content_type,
739
+ _headers=_headers,
740
+ _host_index=_host_index
741
+ )
742
+
743
+ _response_types_map: Dict[str, Optional[str]] = {
744
+ '200': "BaseResponseFunctionDataTypes",
745
+ '422': "BaseResponse",
746
+ }
747
+ response_data = self.api_client.call_api(
748
+ *_param,
749
+ _request_timeout=_request_timeout
750
+ )
751
+ response_data.read()
752
+ return self.api_client.response_deserialize(
753
+ response_data=response_data,
754
+ response_types_map=_response_types_map,
755
+ )
756
+
757
+
758
+ @validate_call
759
+ def get_function_data_types_without_preload_content(
760
+ self,
761
+ analysis_id: StrictInt,
762
+ function_id: StrictInt,
763
+ _request_timeout: Union[
764
+ None,
765
+ Annotated[StrictFloat, Field(gt=0)],
766
+ Tuple[
767
+ Annotated[StrictFloat, Field(gt=0)],
768
+ Annotated[StrictFloat, Field(gt=0)]
769
+ ]
770
+ ] = None,
771
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
772
+ _content_type: Optional[StrictStr] = None,
773
+ _headers: Optional[Dict[StrictStr, Any]] = None,
774
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
775
+ ) -> RESTResponseType:
776
+ """Get Function Data Types
777
+
778
+ Polling endpoint which returns the current status of function generation and once completed the data type information
779
+
780
+ :param analysis_id: (required)
781
+ :type analysis_id: int
782
+ :param function_id: (required)
783
+ :type function_id: int
784
+ :param _request_timeout: timeout setting for this request. If one
785
+ number provided, it will be total request
786
+ timeout. It can also be a pair (tuple) of
787
+ (connection, read) timeouts.
788
+ :type _request_timeout: int, tuple(int, int), optional
789
+ :param _request_auth: set to override the auth_settings for an a single
790
+ request; this effectively ignores the
791
+ authentication in the spec for a single request.
792
+ :type _request_auth: dict, optional
793
+ :param _content_type: force content-type for the request.
794
+ :type _content_type: str, Optional
795
+ :param _headers: set to override the headers for a single
796
+ request; this effectively ignores the headers
797
+ in the spec for a single request.
798
+ :type _headers: dict, optional
799
+ :param _host_index: set to override the host_index for a single
800
+ request; this effectively ignores the host_index
801
+ in the spec for a single request.
802
+ :type _host_index: int, optional
803
+ :return: Returns the result object.
804
+ """ # noqa: E501
805
+
806
+ _param = self._get_function_data_types_serialize(
807
+ analysis_id=analysis_id,
808
+ function_id=function_id,
809
+ _request_auth=_request_auth,
810
+ _content_type=_content_type,
811
+ _headers=_headers,
812
+ _host_index=_host_index
813
+ )
814
+
815
+ _response_types_map: Dict[str, Optional[str]] = {
816
+ '200': "BaseResponseFunctionDataTypes",
817
+ '422': "BaseResponse",
818
+ }
819
+ response_data = self.api_client.call_api(
820
+ *_param,
821
+ _request_timeout=_request_timeout
822
+ )
823
+ return response_data.response
824
+
825
+
826
+ def _get_function_data_types_serialize(
827
+ self,
828
+ analysis_id,
829
+ function_id,
830
+ _request_auth,
831
+ _content_type,
832
+ _headers,
833
+ _host_index,
834
+ ) -> RequestSerialized:
835
+
836
+ _host = None
837
+
838
+ _collection_formats: Dict[str, str] = {
839
+ }
840
+
841
+ _path_params: Dict[str, str] = {}
842
+ _query_params: List[Tuple[str, str]] = []
843
+ _header_params: Dict[str, Optional[str]] = _headers or {}
844
+ _form_params: List[Tuple[str, str]] = []
845
+ _files: Dict[
846
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
847
+ ] = {}
848
+ _body_params: Optional[bytes] = None
849
+
850
+ # process the path parameters
851
+ if analysis_id is not None:
852
+ _path_params['analysis_id'] = analysis_id
853
+ if function_id is not None:
854
+ _path_params['function_id'] = function_id
855
+ # process the query parameters
856
+ # process the header parameters
857
+ # process the form parameters
858
+ # process the body parameter
859
+
860
+
861
+ # set the HTTP header `Accept`
862
+ if 'Accept' not in _header_params:
863
+ _header_params['Accept'] = self.api_client.select_header_accept(
864
+ [
865
+ 'application/json'
866
+ ]
867
+ )
868
+
869
+
870
+ # authentication setting
871
+ _auth_settings: List[str] = [
872
+ 'APIKey'
873
+ ]
874
+
875
+ return self.api_client.param_serialize(
876
+ method='GET',
877
+ resource_path='/v2/analyses/{analysis_id}/functions/{function_id}/data_types',
878
+ path_params=_path_params,
879
+ query_params=_query_params,
880
+ header_params=_header_params,
881
+ body=_body_params,
882
+ post_params=_form_params,
883
+ files=_files,
884
+ auth_settings=_auth_settings,
885
+ collection_formats=_collection_formats,
886
+ _host=_host,
887
+ _request_auth=_request_auth
888
+ )
889
+
890
+
891
+
892
+
893
+ @validate_call
894
+ def list_function_data_types_for_analysis(
895
+ self,
896
+ analysis_id: StrictInt,
897
+ function_ids: Optional[List[Optional[StrictInt]]] = None,
898
+ _request_timeout: Union[
899
+ None,
900
+ Annotated[StrictFloat, Field(gt=0)],
901
+ Tuple[
902
+ Annotated[StrictFloat, Field(gt=0)],
903
+ Annotated[StrictFloat, Field(gt=0)]
904
+ ]
905
+ ] = None,
906
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
907
+ _content_type: Optional[StrictStr] = None,
908
+ _headers: Optional[Dict[StrictStr, Any]] = None,
909
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
910
+ ) -> BaseResponseFunctionDataTypesList:
911
+ """List Function Data Types
912
+
913
+ Returns data types for multiple functions with optional function ID filtering
914
+
915
+ :param analysis_id: (required)
916
+ :type analysis_id: int
917
+ :param function_ids:
918
+ :type function_ids: List[Optional[int]]
919
+ :param _request_timeout: timeout setting for this request. If one
920
+ number provided, it will be total request
921
+ timeout. It can also be a pair (tuple) of
922
+ (connection, read) timeouts.
923
+ :type _request_timeout: int, tuple(int, int), optional
924
+ :param _request_auth: set to override the auth_settings for an a single
925
+ request; this effectively ignores the
926
+ authentication in the spec for a single request.
927
+ :type _request_auth: dict, optional
928
+ :param _content_type: force content-type for the request.
929
+ :type _content_type: str, Optional
930
+ :param _headers: set to override the headers for a single
931
+ request; this effectively ignores the headers
932
+ in the spec for a single request.
933
+ :type _headers: dict, optional
934
+ :param _host_index: set to override the host_index for a single
935
+ request; this effectively ignores the host_index
936
+ in the spec for a single request.
937
+ :type _host_index: int, optional
938
+ :return: Returns the result object.
939
+ """ # noqa: E501
940
+
941
+ _param = self._list_function_data_types_for_analysis_serialize(
942
+ analysis_id=analysis_id,
943
+ function_ids=function_ids,
944
+ _request_auth=_request_auth,
945
+ _content_type=_content_type,
946
+ _headers=_headers,
947
+ _host_index=_host_index
948
+ )
949
+
950
+ _response_types_map: Dict[str, Optional[str]] = {
951
+ '200': "BaseResponseFunctionDataTypesList",
952
+ '422': "BaseResponse",
953
+ }
954
+ response_data = self.api_client.call_api(
955
+ *_param,
956
+ _request_timeout=_request_timeout
957
+ )
958
+ response_data.read()
959
+ return self.api_client.response_deserialize(
960
+ response_data=response_data,
961
+ response_types_map=_response_types_map,
962
+ ).data
963
+
964
+
965
+ @validate_call
966
+ def list_function_data_types_for_analysis_with_http_info(
967
+ self,
968
+ analysis_id: StrictInt,
969
+ function_ids: Optional[List[Optional[StrictInt]]] = None,
970
+ _request_timeout: Union[
971
+ None,
972
+ Annotated[StrictFloat, Field(gt=0)],
973
+ Tuple[
974
+ Annotated[StrictFloat, Field(gt=0)],
975
+ Annotated[StrictFloat, Field(gt=0)]
976
+ ]
977
+ ] = None,
978
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
979
+ _content_type: Optional[StrictStr] = None,
980
+ _headers: Optional[Dict[StrictStr, Any]] = None,
981
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
982
+ ) -> ApiResponse[BaseResponseFunctionDataTypesList]:
983
+ """List Function Data Types
984
+
985
+ Returns data types for multiple functions with optional function ID filtering
986
+
987
+ :param analysis_id: (required)
988
+ :type analysis_id: int
989
+ :param function_ids:
990
+ :type function_ids: List[Optional[int]]
991
+ :param _request_timeout: timeout setting for this request. If one
992
+ number provided, it will be total request
993
+ timeout. It can also be a pair (tuple) of
994
+ (connection, read) timeouts.
995
+ :type _request_timeout: int, tuple(int, int), optional
996
+ :param _request_auth: set to override the auth_settings for an a single
997
+ request; this effectively ignores the
998
+ authentication in the spec for a single request.
999
+ :type _request_auth: dict, optional
1000
+ :param _content_type: force content-type for the request.
1001
+ :type _content_type: str, Optional
1002
+ :param _headers: set to override the headers for a single
1003
+ request; this effectively ignores the headers
1004
+ in the spec for a single request.
1005
+ :type _headers: dict, optional
1006
+ :param _host_index: set to override the host_index for a single
1007
+ request; this effectively ignores the host_index
1008
+ in the spec for a single request.
1009
+ :type _host_index: int, optional
1010
+ :return: Returns the result object.
1011
+ """ # noqa: E501
1012
+
1013
+ _param = self._list_function_data_types_for_analysis_serialize(
1014
+ analysis_id=analysis_id,
1015
+ function_ids=function_ids,
1016
+ _request_auth=_request_auth,
1017
+ _content_type=_content_type,
1018
+ _headers=_headers,
1019
+ _host_index=_host_index
1020
+ )
1021
+
1022
+ _response_types_map: Dict[str, Optional[str]] = {
1023
+ '200': "BaseResponseFunctionDataTypesList",
1024
+ '422': "BaseResponse",
1025
+ }
1026
+ response_data = self.api_client.call_api(
1027
+ *_param,
1028
+ _request_timeout=_request_timeout
1029
+ )
1030
+ response_data.read()
1031
+ return self.api_client.response_deserialize(
1032
+ response_data=response_data,
1033
+ response_types_map=_response_types_map,
1034
+ )
1035
+
1036
+
1037
+ @validate_call
1038
+ def list_function_data_types_for_analysis_without_preload_content(
1039
+ self,
1040
+ analysis_id: StrictInt,
1041
+ function_ids: Optional[List[Optional[StrictInt]]] = None,
1042
+ _request_timeout: Union[
1043
+ None,
1044
+ Annotated[StrictFloat, Field(gt=0)],
1045
+ Tuple[
1046
+ Annotated[StrictFloat, Field(gt=0)],
1047
+ Annotated[StrictFloat, Field(gt=0)]
1048
+ ]
1049
+ ] = None,
1050
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1051
+ _content_type: Optional[StrictStr] = None,
1052
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1053
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1054
+ ) -> RESTResponseType:
1055
+ """List Function Data Types
1056
+
1057
+ Returns data types for multiple functions with optional function ID filtering
1058
+
1059
+ :param analysis_id: (required)
1060
+ :type analysis_id: int
1061
+ :param function_ids:
1062
+ :type function_ids: List[Optional[int]]
1063
+ :param _request_timeout: timeout setting for this request. If one
1064
+ number provided, it will be total request
1065
+ timeout. It can also be a pair (tuple) of
1066
+ (connection, read) timeouts.
1067
+ :type _request_timeout: int, tuple(int, int), optional
1068
+ :param _request_auth: set to override the auth_settings for an a single
1069
+ request; this effectively ignores the
1070
+ authentication in the spec for a single request.
1071
+ :type _request_auth: dict, optional
1072
+ :param _content_type: force content-type for the request.
1073
+ :type _content_type: str, Optional
1074
+ :param _headers: set to override the headers for a single
1075
+ request; this effectively ignores the headers
1076
+ in the spec for a single request.
1077
+ :type _headers: dict, optional
1078
+ :param _host_index: set to override the host_index for a single
1079
+ request; this effectively ignores the host_index
1080
+ in the spec for a single request.
1081
+ :type _host_index: int, optional
1082
+ :return: Returns the result object.
1083
+ """ # noqa: E501
1084
+
1085
+ _param = self._list_function_data_types_for_analysis_serialize(
1086
+ analysis_id=analysis_id,
1087
+ function_ids=function_ids,
1088
+ _request_auth=_request_auth,
1089
+ _content_type=_content_type,
1090
+ _headers=_headers,
1091
+ _host_index=_host_index
1092
+ )
1093
+
1094
+ _response_types_map: Dict[str, Optional[str]] = {
1095
+ '200': "BaseResponseFunctionDataTypesList",
1096
+ '422': "BaseResponse",
1097
+ }
1098
+ response_data = self.api_client.call_api(
1099
+ *_param,
1100
+ _request_timeout=_request_timeout
1101
+ )
1102
+ return response_data.response
1103
+
1104
+
1105
+ def _list_function_data_types_for_analysis_serialize(
1106
+ self,
1107
+ analysis_id,
1108
+ function_ids,
1109
+ _request_auth,
1110
+ _content_type,
1111
+ _headers,
1112
+ _host_index,
1113
+ ) -> RequestSerialized:
1114
+
1115
+ _host = None
1116
+
1117
+ _collection_formats: Dict[str, str] = {
1118
+ 'function_ids': 'multi',
1119
+ }
1120
+
1121
+ _path_params: Dict[str, str] = {}
1122
+ _query_params: List[Tuple[str, str]] = []
1123
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1124
+ _form_params: List[Tuple[str, str]] = []
1125
+ _files: Dict[
1126
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1127
+ ] = {}
1128
+ _body_params: Optional[bytes] = None
1129
+
1130
+ # process the path parameters
1131
+ if analysis_id is not None:
1132
+ _path_params['analysis_id'] = analysis_id
1133
+ # process the query parameters
1134
+ if function_ids is not None:
1135
+
1136
+ _query_params.append(('function_ids', function_ids))
1137
+
1138
+ # process the header parameters
1139
+ # process the form parameters
1140
+ # process the body parameter
1141
+
1142
+
1143
+ # set the HTTP header `Accept`
1144
+ if 'Accept' not in _header_params:
1145
+ _header_params['Accept'] = self.api_client.select_header_accept(
1146
+ [
1147
+ 'application/json'
1148
+ ]
1149
+ )
1150
+
1151
+
1152
+ # authentication setting
1153
+ _auth_settings: List[str] = [
1154
+ 'APIKey'
1155
+ ]
1156
+
1157
+ return self.api_client.param_serialize(
1158
+ method='GET',
1159
+ resource_path='/v2/analyses/{analysis_id}/functions/data_types',
1160
+ path_params=_path_params,
1161
+ query_params=_query_params,
1162
+ header_params=_header_params,
1163
+ body=_body_params,
1164
+ post_params=_form_params,
1165
+ files=_files,
1166
+ auth_settings=_auth_settings,
1167
+ collection_formats=_collection_formats,
1168
+ _host=_host,
1169
+ _request_auth=_request_auth
1170
+ )
1171
+
1172
+
1173
+
1174
+
1175
+ @validate_call
1176
+ def list_function_data_types_for_functions(
1177
+ self,
1178
+ function_ids: Optional[List[Optional[StrictInt]]] = None,
1179
+ _request_timeout: Union[
1180
+ None,
1181
+ Annotated[StrictFloat, Field(gt=0)],
1182
+ Tuple[
1183
+ Annotated[StrictFloat, Field(gt=0)],
1184
+ Annotated[StrictFloat, Field(gt=0)]
1185
+ ]
1186
+ ] = None,
1187
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1188
+ _content_type: Optional[StrictStr] = None,
1189
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1190
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1191
+ ) -> BaseResponseFunctionDataTypesList:
1192
+ """List Function Data Types
1193
+
1194
+ Returns data types for multiple function IDs
1195
+
1196
+ :param function_ids:
1197
+ :type function_ids: List[Optional[int]]
1198
+ :param _request_timeout: timeout setting for this request. If one
1199
+ number provided, it will be total request
1200
+ timeout. It can also be a pair (tuple) of
1201
+ (connection, read) timeouts.
1202
+ :type _request_timeout: int, tuple(int, int), optional
1203
+ :param _request_auth: set to override the auth_settings for an a single
1204
+ request; this effectively ignores the
1205
+ authentication in the spec for a single request.
1206
+ :type _request_auth: dict, optional
1207
+ :param _content_type: force content-type for the request.
1208
+ :type _content_type: str, Optional
1209
+ :param _headers: set to override the headers for a single
1210
+ request; this effectively ignores the headers
1211
+ in the spec for a single request.
1212
+ :type _headers: dict, optional
1213
+ :param _host_index: set to override the host_index for a single
1214
+ request; this effectively ignores the host_index
1215
+ in the spec for a single request.
1216
+ :type _host_index: int, optional
1217
+ :return: Returns the result object.
1218
+ """ # noqa: E501
1219
+
1220
+ _param = self._list_function_data_types_for_functions_serialize(
1221
+ function_ids=function_ids,
1222
+ _request_auth=_request_auth,
1223
+ _content_type=_content_type,
1224
+ _headers=_headers,
1225
+ _host_index=_host_index
1226
+ )
1227
+
1228
+ _response_types_map: Dict[str, Optional[str]] = {
1229
+ '200': "BaseResponseFunctionDataTypesList",
1230
+ '422': "BaseResponse",
1231
+ }
1232
+ response_data = self.api_client.call_api(
1233
+ *_param,
1234
+ _request_timeout=_request_timeout
1235
+ )
1236
+ response_data.read()
1237
+ return self.api_client.response_deserialize(
1238
+ response_data=response_data,
1239
+ response_types_map=_response_types_map,
1240
+ ).data
1241
+
1242
+
1243
+ @validate_call
1244
+ def list_function_data_types_for_functions_with_http_info(
1245
+ self,
1246
+ function_ids: Optional[List[Optional[StrictInt]]] = None,
1247
+ _request_timeout: Union[
1248
+ None,
1249
+ Annotated[StrictFloat, Field(gt=0)],
1250
+ Tuple[
1251
+ Annotated[StrictFloat, Field(gt=0)],
1252
+ Annotated[StrictFloat, Field(gt=0)]
1253
+ ]
1254
+ ] = None,
1255
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1256
+ _content_type: Optional[StrictStr] = None,
1257
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1258
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1259
+ ) -> ApiResponse[BaseResponseFunctionDataTypesList]:
1260
+ """List Function Data Types
1261
+
1262
+ Returns data types for multiple function IDs
1263
+
1264
+ :param function_ids:
1265
+ :type function_ids: List[Optional[int]]
1266
+ :param _request_timeout: timeout setting for this request. If one
1267
+ number provided, it will be total request
1268
+ timeout. It can also be a pair (tuple) of
1269
+ (connection, read) timeouts.
1270
+ :type _request_timeout: int, tuple(int, int), optional
1271
+ :param _request_auth: set to override the auth_settings for an a single
1272
+ request; this effectively ignores the
1273
+ authentication in the spec for a single request.
1274
+ :type _request_auth: dict, optional
1275
+ :param _content_type: force content-type for the request.
1276
+ :type _content_type: str, Optional
1277
+ :param _headers: set to override the headers for a single
1278
+ request; this effectively ignores the headers
1279
+ in the spec for a single request.
1280
+ :type _headers: dict, optional
1281
+ :param _host_index: set to override the host_index for a single
1282
+ request; this effectively ignores the host_index
1283
+ in the spec for a single request.
1284
+ :type _host_index: int, optional
1285
+ :return: Returns the result object.
1286
+ """ # noqa: E501
1287
+
1288
+ _param = self._list_function_data_types_for_functions_serialize(
1289
+ function_ids=function_ids,
1290
+ _request_auth=_request_auth,
1291
+ _content_type=_content_type,
1292
+ _headers=_headers,
1293
+ _host_index=_host_index
1294
+ )
1295
+
1296
+ _response_types_map: Dict[str, Optional[str]] = {
1297
+ '200': "BaseResponseFunctionDataTypesList",
1298
+ '422': "BaseResponse",
1299
+ }
1300
+ response_data = self.api_client.call_api(
1301
+ *_param,
1302
+ _request_timeout=_request_timeout
1303
+ )
1304
+ response_data.read()
1305
+ return self.api_client.response_deserialize(
1306
+ response_data=response_data,
1307
+ response_types_map=_response_types_map,
1308
+ )
1309
+
1310
+
1311
+ @validate_call
1312
+ def list_function_data_types_for_functions_without_preload_content(
1313
+ self,
1314
+ function_ids: Optional[List[Optional[StrictInt]]] = None,
1315
+ _request_timeout: Union[
1316
+ None,
1317
+ Annotated[StrictFloat, Field(gt=0)],
1318
+ Tuple[
1319
+ Annotated[StrictFloat, Field(gt=0)],
1320
+ Annotated[StrictFloat, Field(gt=0)]
1321
+ ]
1322
+ ] = None,
1323
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1324
+ _content_type: Optional[StrictStr] = None,
1325
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1326
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1327
+ ) -> RESTResponseType:
1328
+ """List Function Data Types
1329
+
1330
+ Returns data types for multiple function IDs
1331
+
1332
+ :param function_ids:
1333
+ :type function_ids: List[Optional[int]]
1334
+ :param _request_timeout: timeout setting for this request. If one
1335
+ number provided, it will be total request
1336
+ timeout. It can also be a pair (tuple) of
1337
+ (connection, read) timeouts.
1338
+ :type _request_timeout: int, tuple(int, int), optional
1339
+ :param _request_auth: set to override the auth_settings for an a single
1340
+ request; this effectively ignores the
1341
+ authentication in the spec for a single request.
1342
+ :type _request_auth: dict, optional
1343
+ :param _content_type: force content-type for the request.
1344
+ :type _content_type: str, Optional
1345
+ :param _headers: set to override the headers for a single
1346
+ request; this effectively ignores the headers
1347
+ in the spec for a single request.
1348
+ :type _headers: dict, optional
1349
+ :param _host_index: set to override the host_index for a single
1350
+ request; this effectively ignores the host_index
1351
+ in the spec for a single request.
1352
+ :type _host_index: int, optional
1353
+ :return: Returns the result object.
1354
+ """ # noqa: E501
1355
+
1356
+ _param = self._list_function_data_types_for_functions_serialize(
1357
+ function_ids=function_ids,
1358
+ _request_auth=_request_auth,
1359
+ _content_type=_content_type,
1360
+ _headers=_headers,
1361
+ _host_index=_host_index
1362
+ )
1363
+
1364
+ _response_types_map: Dict[str, Optional[str]] = {
1365
+ '200': "BaseResponseFunctionDataTypesList",
1366
+ '422': "BaseResponse",
1367
+ }
1368
+ response_data = self.api_client.call_api(
1369
+ *_param,
1370
+ _request_timeout=_request_timeout
1371
+ )
1372
+ return response_data.response
1373
+
1374
+
1375
+ def _list_function_data_types_for_functions_serialize(
1376
+ self,
1377
+ function_ids,
1378
+ _request_auth,
1379
+ _content_type,
1380
+ _headers,
1381
+ _host_index,
1382
+ ) -> RequestSerialized:
1383
+
1384
+ _host = None
1385
+
1386
+ _collection_formats: Dict[str, str] = {
1387
+ 'function_ids': 'multi',
1388
+ }
1389
+
1390
+ _path_params: Dict[str, str] = {}
1391
+ _query_params: List[Tuple[str, str]] = []
1392
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1393
+ _form_params: List[Tuple[str, str]] = []
1394
+ _files: Dict[
1395
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1396
+ ] = {}
1397
+ _body_params: Optional[bytes] = None
1398
+
1399
+ # process the path parameters
1400
+ # process the query parameters
1401
+ if function_ids is not None:
1402
+
1403
+ _query_params.append(('function_ids', function_ids))
1404
+
1405
+ # process the header parameters
1406
+ # process the form parameters
1407
+ # process the body parameter
1408
+
1409
+
1410
+ # set the HTTP header `Accept`
1411
+ if 'Accept' not in _header_params:
1412
+ _header_params['Accept'] = self.api_client.select_header_accept(
1413
+ [
1414
+ 'application/json'
1415
+ ]
1416
+ )
1417
+
1418
+
1419
+ # authentication setting
1420
+ _auth_settings: List[str] = [
1421
+ 'APIKey'
1422
+ ]
1423
+
1424
+ return self.api_client.param_serialize(
1425
+ method='GET',
1426
+ resource_path='/v2/functions/data_types',
1427
+ path_params=_path_params,
1428
+ query_params=_query_params,
1429
+ header_params=_header_params,
1430
+ body=_body_params,
1431
+ post_params=_form_params,
1432
+ files=_files,
1433
+ auth_settings=_auth_settings,
1434
+ collection_formats=_collection_formats,
1435
+ _host=_host,
1436
+ _request_auth=_request_auth
1437
+ )
1438
+
1439
+
1440
+
1441
+
1442
+ @validate_call
1443
+ def update_function_data_types(
1444
+ self,
1445
+ analysis_id: StrictInt,
1446
+ function_id: StrictInt,
1447
+ update_function_data_types: UpdateFunctionDataTypes,
1448
+ _request_timeout: Union[
1449
+ None,
1450
+ Annotated[StrictFloat, Field(gt=0)],
1451
+ Tuple[
1452
+ Annotated[StrictFloat, Field(gt=0)],
1453
+ Annotated[StrictFloat, Field(gt=0)]
1454
+ ]
1455
+ ] = None,
1456
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1457
+ _content_type: Optional[StrictStr] = None,
1458
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1459
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1460
+ ) -> BaseResponseFunctionDataTypes:
1461
+ """Update Function Data Types
1462
+
1463
+ Updates the function data types for a given function
1464
+
1465
+ :param analysis_id: (required)
1466
+ :type analysis_id: int
1467
+ :param function_id: (required)
1468
+ :type function_id: int
1469
+ :param update_function_data_types: (required)
1470
+ :type update_function_data_types: UpdateFunctionDataTypes
1471
+ :param _request_timeout: timeout setting for this request. If one
1472
+ number provided, it will be total request
1473
+ timeout. It can also be a pair (tuple) of
1474
+ (connection, read) timeouts.
1475
+ :type _request_timeout: int, tuple(int, int), optional
1476
+ :param _request_auth: set to override the auth_settings for an a single
1477
+ request; this effectively ignores the
1478
+ authentication in the spec for a single request.
1479
+ :type _request_auth: dict, optional
1480
+ :param _content_type: force content-type for the request.
1481
+ :type _content_type: str, Optional
1482
+ :param _headers: set to override the headers for a single
1483
+ request; this effectively ignores the headers
1484
+ in the spec for a single request.
1485
+ :type _headers: dict, optional
1486
+ :param _host_index: set to override the host_index for a single
1487
+ request; this effectively ignores the host_index
1488
+ in the spec for a single request.
1489
+ :type _host_index: int, optional
1490
+ :return: Returns the result object.
1491
+ """ # noqa: E501
1492
+
1493
+ _param = self._update_function_data_types_serialize(
1494
+ analysis_id=analysis_id,
1495
+ function_id=function_id,
1496
+ update_function_data_types=update_function_data_types,
1497
+ _request_auth=_request_auth,
1498
+ _content_type=_content_type,
1499
+ _headers=_headers,
1500
+ _host_index=_host_index
1501
+ )
1502
+
1503
+ _response_types_map: Dict[str, Optional[str]] = {
1504
+ '200': "BaseResponseFunctionDataTypes",
1505
+ '422': "BaseResponse",
1506
+ }
1507
+ response_data = self.api_client.call_api(
1508
+ *_param,
1509
+ _request_timeout=_request_timeout
1510
+ )
1511
+ response_data.read()
1512
+ return self.api_client.response_deserialize(
1513
+ response_data=response_data,
1514
+ response_types_map=_response_types_map,
1515
+ ).data
1516
+
1517
+
1518
+ @validate_call
1519
+ def update_function_data_types_with_http_info(
1520
+ self,
1521
+ analysis_id: StrictInt,
1522
+ function_id: StrictInt,
1523
+ update_function_data_types: UpdateFunctionDataTypes,
1524
+ _request_timeout: Union[
1525
+ None,
1526
+ Annotated[StrictFloat, Field(gt=0)],
1527
+ Tuple[
1528
+ Annotated[StrictFloat, Field(gt=0)],
1529
+ Annotated[StrictFloat, Field(gt=0)]
1530
+ ]
1531
+ ] = None,
1532
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1533
+ _content_type: Optional[StrictStr] = None,
1534
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1535
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1536
+ ) -> ApiResponse[BaseResponseFunctionDataTypes]:
1537
+ """Update Function Data Types
1538
+
1539
+ Updates the function data types for a given function
1540
+
1541
+ :param analysis_id: (required)
1542
+ :type analysis_id: int
1543
+ :param function_id: (required)
1544
+ :type function_id: int
1545
+ :param update_function_data_types: (required)
1546
+ :type update_function_data_types: UpdateFunctionDataTypes
1547
+ :param _request_timeout: timeout setting for this request. If one
1548
+ number provided, it will be total request
1549
+ timeout. It can also be a pair (tuple) of
1550
+ (connection, read) timeouts.
1551
+ :type _request_timeout: int, tuple(int, int), optional
1552
+ :param _request_auth: set to override the auth_settings for an a single
1553
+ request; this effectively ignores the
1554
+ authentication in the spec for a single request.
1555
+ :type _request_auth: dict, optional
1556
+ :param _content_type: force content-type for the request.
1557
+ :type _content_type: str, Optional
1558
+ :param _headers: set to override the headers for a single
1559
+ request; this effectively ignores the headers
1560
+ in the spec for a single request.
1561
+ :type _headers: dict, optional
1562
+ :param _host_index: set to override the host_index for a single
1563
+ request; this effectively ignores the host_index
1564
+ in the spec for a single request.
1565
+ :type _host_index: int, optional
1566
+ :return: Returns the result object.
1567
+ """ # noqa: E501
1568
+
1569
+ _param = self._update_function_data_types_serialize(
1570
+ analysis_id=analysis_id,
1571
+ function_id=function_id,
1572
+ update_function_data_types=update_function_data_types,
1573
+ _request_auth=_request_auth,
1574
+ _content_type=_content_type,
1575
+ _headers=_headers,
1576
+ _host_index=_host_index
1577
+ )
1578
+
1579
+ _response_types_map: Dict[str, Optional[str]] = {
1580
+ '200': "BaseResponseFunctionDataTypes",
1581
+ '422': "BaseResponse",
1582
+ }
1583
+ response_data = self.api_client.call_api(
1584
+ *_param,
1585
+ _request_timeout=_request_timeout
1586
+ )
1587
+ response_data.read()
1588
+ return self.api_client.response_deserialize(
1589
+ response_data=response_data,
1590
+ response_types_map=_response_types_map,
1591
+ )
1592
+
1593
+
1594
+ @validate_call
1595
+ def update_function_data_types_without_preload_content(
1596
+ self,
1597
+ analysis_id: StrictInt,
1598
+ function_id: StrictInt,
1599
+ update_function_data_types: UpdateFunctionDataTypes,
1600
+ _request_timeout: Union[
1601
+ None,
1602
+ Annotated[StrictFloat, Field(gt=0)],
1603
+ Tuple[
1604
+ Annotated[StrictFloat, Field(gt=0)],
1605
+ Annotated[StrictFloat, Field(gt=0)]
1606
+ ]
1607
+ ] = None,
1608
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1609
+ _content_type: Optional[StrictStr] = None,
1610
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1611
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1612
+ ) -> RESTResponseType:
1613
+ """Update Function Data Types
1614
+
1615
+ Updates the function data types for a given function
1616
+
1617
+ :param analysis_id: (required)
1618
+ :type analysis_id: int
1619
+ :param function_id: (required)
1620
+ :type function_id: int
1621
+ :param update_function_data_types: (required)
1622
+ :type update_function_data_types: UpdateFunctionDataTypes
1623
+ :param _request_timeout: timeout setting for this request. If one
1624
+ number provided, it will be total request
1625
+ timeout. It can also be a pair (tuple) of
1626
+ (connection, read) timeouts.
1627
+ :type _request_timeout: int, tuple(int, int), optional
1628
+ :param _request_auth: set to override the auth_settings for an a single
1629
+ request; this effectively ignores the
1630
+ authentication in the spec for a single request.
1631
+ :type _request_auth: dict, optional
1632
+ :param _content_type: force content-type for the request.
1633
+ :type _content_type: str, Optional
1634
+ :param _headers: set to override the headers for a single
1635
+ request; this effectively ignores the headers
1636
+ in the spec for a single request.
1637
+ :type _headers: dict, optional
1638
+ :param _host_index: set to override the host_index for a single
1639
+ request; this effectively ignores the host_index
1640
+ in the spec for a single request.
1641
+ :type _host_index: int, optional
1642
+ :return: Returns the result object.
1643
+ """ # noqa: E501
1644
+
1645
+ _param = self._update_function_data_types_serialize(
1646
+ analysis_id=analysis_id,
1647
+ function_id=function_id,
1648
+ update_function_data_types=update_function_data_types,
1649
+ _request_auth=_request_auth,
1650
+ _content_type=_content_type,
1651
+ _headers=_headers,
1652
+ _host_index=_host_index
1653
+ )
1654
+
1655
+ _response_types_map: Dict[str, Optional[str]] = {
1656
+ '200': "BaseResponseFunctionDataTypes",
1657
+ '422': "BaseResponse",
1658
+ }
1659
+ response_data = self.api_client.call_api(
1660
+ *_param,
1661
+ _request_timeout=_request_timeout
1662
+ )
1663
+ return response_data.response
1664
+
1665
+
1666
+ def _update_function_data_types_serialize(
1667
+ self,
1668
+ analysis_id,
1669
+ function_id,
1670
+ update_function_data_types,
1671
+ _request_auth,
1672
+ _content_type,
1673
+ _headers,
1674
+ _host_index,
1675
+ ) -> RequestSerialized:
1676
+
1677
+ _host = None
1678
+
1679
+ _collection_formats: Dict[str, str] = {
1680
+ }
1681
+
1682
+ _path_params: Dict[str, str] = {}
1683
+ _query_params: List[Tuple[str, str]] = []
1684
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1685
+ _form_params: List[Tuple[str, str]] = []
1686
+ _files: Dict[
1687
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1688
+ ] = {}
1689
+ _body_params: Optional[bytes] = None
1690
+
1691
+ # process the path parameters
1692
+ if analysis_id is not None:
1693
+ _path_params['analysis_id'] = analysis_id
1694
+ if function_id is not None:
1695
+ _path_params['function_id'] = function_id
1696
+ # process the query parameters
1697
+ # process the header parameters
1698
+ # process the form parameters
1699
+ # process the body parameter
1700
+ if update_function_data_types is not None:
1701
+ _body_params = update_function_data_types
1702
+
1703
+
1704
+ # set the HTTP header `Accept`
1705
+ if 'Accept' not in _header_params:
1706
+ _header_params['Accept'] = self.api_client.select_header_accept(
1707
+ [
1708
+ 'application/json'
1709
+ ]
1710
+ )
1711
+
1712
+ # set the HTTP header `Content-Type`
1713
+ if _content_type:
1714
+ _header_params['Content-Type'] = _content_type
1715
+ else:
1716
+ _default_content_type = (
1717
+ self.api_client.select_header_content_type(
1718
+ [
1719
+ 'application/json'
1720
+ ]
1721
+ )
1722
+ )
1723
+ if _default_content_type is not None:
1724
+ _header_params['Content-Type'] = _default_content_type
1725
+
1726
+ # authentication setting
1727
+ _auth_settings: List[str] = [
1728
+ 'APIKey'
1729
+ ]
1730
+
1731
+ return self.api_client.param_serialize(
1732
+ method='PUT',
1733
+ resource_path='/v2/analyses/{analysis_id}/functions/{function_id}/data_types',
1734
+ path_params=_path_params,
1735
+ query_params=_query_params,
1736
+ header_params=_header_params,
1737
+ body=_body_params,
1738
+ post_params=_form_params,
1739
+ files=_files,
1740
+ auth_settings=_auth_settings,
1741
+ collection_formats=_collection_formats,
1742
+ _host=_host,
1743
+ _request_auth=_request_auth
1744
+ )
1745
+
1746
+