flywheel-sdk 21.2.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 (772) hide show
  1. flywheel/__init__.py +784 -0
  2. flywheel/api/__init__.py +46 -0
  3. flywheel/api/acquisitions_api.py +5014 -0
  4. flywheel/api/analyses_api.py +3848 -0
  5. flywheel/api/audit_trail_api.py +568 -0
  6. flywheel/api/auth_api.py +121 -0
  7. flywheel/api/batch_api.py +630 -0
  8. flywheel/api/bulk_api.py +140 -0
  9. flywheel/api/change_log_api.py +254 -0
  10. flywheel/api/collections_api.py +3913 -0
  11. flywheel/api/config_api.py +299 -0
  12. flywheel/api/container_tasks_api.py +137 -0
  13. flywheel/api/container_type_api.py +137 -0
  14. flywheel/api/containers_api.py +4784 -0
  15. flywheel/api/custom_filters_api.py +466 -0
  16. flywheel/api/data_view_executions_api.py +549 -0
  17. flywheel/api/dataexplorer_api.py +1192 -0
  18. flywheel/api/devices_api.py +1071 -0
  19. flywheel/api/dimse_api.py +814 -0
  20. flywheel/api/download_api.py +261 -0
  21. flywheel/api/files_api.py +1868 -0
  22. flywheel/api/form_responses_api.py +703 -0
  23. flywheel/api/gears_api.py +1875 -0
  24. flywheel/api/groups_api.py +2829 -0
  25. flywheel/api/jobs_api.py +2320 -0
  26. flywheel/api/jupyterlab_servers_api.py +245 -0
  27. flywheel/api/modalities_api.py +562 -0
  28. flywheel/api/packfiles_api.py +121 -0
  29. flywheel/api/projects_api.py +7820 -0
  30. flywheel/api/protocols_api.py +757 -0
  31. flywheel/api/reports_api.py +1057 -0
  32. flywheel/api/resolve_api.py +276 -0
  33. flywheel/api/roles_api.py +563 -0
  34. flywheel/api/sessions_api.py +5296 -0
  35. flywheel/api/site_api.py +1552 -0
  36. flywheel/api/staffing_pools_api.py +677 -0
  37. flywheel/api/subjects_api.py +5349 -0
  38. flywheel/api/tasks_api.py +897 -0
  39. flywheel/api/tree_api.py +266 -0
  40. flywheel/api/uids_api.py +140 -0
  41. flywheel/api/upload_api.py +842 -0
  42. flywheel/api/users_api.py +2142 -0
  43. flywheel/api/views_api.py +1089 -0
  44. flywheel/api_client.py +748 -0
  45. flywheel/client.py +291 -0
  46. flywheel/configuration.py +308 -0
  47. flywheel/drone_login.py +65 -0
  48. flywheel/file_spec.py +67 -0
  49. flywheel/finder.py +168 -0
  50. flywheel/flywheel.py +9867 -0
  51. flywheel/gear_context.py +374 -0
  52. flywheel/models/__init__.py +726 -0
  53. flywheel/models/access_level.py +30 -0
  54. flywheel/models/access_permission.py +197 -0
  55. flywheel/models/access_permission_output.py +192 -0
  56. flywheel/models/access_permission_update.py +166 -0
  57. flywheel/models/access_type.py +54 -0
  58. flywheel/models/accumulator.py +33 -0
  59. flywheel/models/acquisition.py +25 -0
  60. flywheel/models/acquisition_container_output.py +34 -0
  61. flywheel/models/acquisition_copy_input.py +223 -0
  62. flywheel/models/acquisition_input.py +297 -0
  63. flywheel/models/acquisition_list_output.py +767 -0
  64. flywheel/models/acquisition_modify_input.py +299 -0
  65. flywheel/models/acquisition_node.py +35 -0
  66. flywheel/models/acquisition_output.py +767 -0
  67. flywheel/models/acquisition_parents.py +241 -0
  68. flywheel/models/acquisition_template_options.py +275 -0
  69. flywheel/models/acquisition_upsert_input.py +383 -0
  70. flywheel/models/acquisition_upsert_output.py +243 -0
  71. flywheel/models/action.py +91 -0
  72. flywheel/models/adhoc_analysis_input.py +247 -0
  73. flywheel/models/analysis.py +25 -0
  74. flywheel/models/analysis_container_output.py +34 -0
  75. flywheel/models/analysis_files_create_ticket_output.py +241 -0
  76. flywheel/models/analysis_input.py +310 -0
  77. flywheel/models/analysis_input_legacy.py +25 -0
  78. flywheel/models/analysis_list_output.py +680 -0
  79. flywheel/models/analysis_list_output_inflated_job.py +650 -0
  80. flywheel/models/analysis_modify_input.py +191 -0
  81. flywheel/models/analysis_node.py +35 -0
  82. flywheel/models/analysis_output.py +683 -0
  83. flywheel/models/analysis_output_inflated_job.py +674 -0
  84. flywheel/models/analysis_parents.py +270 -0
  85. flywheel/models/analysis_update.py +25 -0
  86. flywheel/models/api_key_input_with_optional_label.py +191 -0
  87. flywheel/models/api_key_output.py +297 -0
  88. flywheel/models/as_storage.py +298 -0
  89. flywheel/models/assignee.py +192 -0
  90. flywheel/models/assignee_type.py +29 -0
  91. flywheel/models/audit_trail_report.py +486 -0
  92. flywheel/models/audit_trail_report_status.py +32 -0
  93. flywheel/models/auth0_auth_out.py +323 -0
  94. flywheel/models/auth0_options_out.py +319 -0
  95. flywheel/models/auth_out.py +357 -0
  96. flywheel/models/auth_session_output.py +272 -0
  97. flywheel/models/avatars.py +218 -0
  98. flywheel/models/aws_creds.py +191 -0
  99. flywheel/models/aws_storage.py +354 -0
  100. flywheel/models/azure_creds.py +190 -0
  101. flywheel/models/base_aet.py +245 -0
  102. flywheel/models/base_compute.py +426 -0
  103. flywheel/models/batch.py +360 -0
  104. flywheel/models/batch_cancel_output.py +36 -0
  105. flywheel/models/batch_create_filters.py +220 -0
  106. flywheel/models/batch_job_analysis_input.py +281 -0
  107. flywheel/models/batch_jobs_proposal_input.py +36 -0
  108. flywheel/models/batch_proposal.py +25 -0
  109. flywheel/models/batch_proposal_detail.py +36 -0
  110. flywheel/models/batch_proposal_input.py +25 -0
  111. flywheel/models/body.py +36 -0
  112. flywheel/models/body_regenerate_key_api_devices_device_id_key_post.py +25 -0
  113. flywheel/models/body_region.py +46 -0
  114. flywheel/models/bookmark.py +189 -0
  115. flywheel/models/bulk_move_input.py +272 -0
  116. flywheel/models/bulk_move_sessions.py +25 -0
  117. flywheel/models/callbacks_virus_scan_input.py +36 -0
  118. flywheel/models/cancelled_batch_output.py +163 -0
  119. flywheel/models/catalog_list_output.py +407 -0
  120. flywheel/models/central_out.py +299 -0
  121. flywheel/models/change.py +379 -0
  122. flywheel/models/change_log_container_type.py +38 -0
  123. flywheel/models/change_log_document.py +245 -0
  124. flywheel/models/change_method.py +33 -0
  125. flywheel/models/classic_batch_job_output.py +352 -0
  126. flywheel/models/classic_batch_job_output_inflated_jobs.py +379 -0
  127. flywheel/models/classic_batch_proposal_input.py +388 -0
  128. flywheel/models/classic_batch_proposal_output.py +471 -0
  129. flywheel/models/classification_add_delete.py +36 -0
  130. flywheel/models/classification_replace.py +36 -0
  131. flywheel/models/classification_update_input.py +36 -0
  132. flywheel/models/cohort.py +29 -0
  133. flywheel/models/collection.py +25 -0
  134. flywheel/models/collection_container_output.py +32 -0
  135. flywheel/models/collection_input.py +217 -0
  136. flywheel/models/collection_input_with_contents.py +248 -0
  137. flywheel/models/collection_node.py +192 -0
  138. flywheel/models/collection_node_level.py +31 -0
  139. flywheel/models/collection_operation.py +193 -0
  140. flywheel/models/collection_operation_type.py +29 -0
  141. flywheel/models/collection_output.py +639 -0
  142. flywheel/models/collection_with_stats.py +637 -0
  143. flywheel/models/column.py +286 -0
  144. flywheel/models/column_type.py +32 -0
  145. flywheel/models/common_classification.py +135 -0
  146. flywheel/models/common_deleted_count.py +25 -0
  147. flywheel/models/common_editions.py +25 -0
  148. flywheel/models/common_info.py +135 -0
  149. flywheel/models/common_join_origins.py +25 -0
  150. flywheel/models/common_key.py +36 -0
  151. flywheel/models/common_modified_count.py +25 -0
  152. flywheel/models/common_object_created.py +36 -0
  153. flywheel/models/common_project_settings.py +25 -0
  154. flywheel/models/common_settings.py +36 -0
  155. flywheel/models/complete_multipart_upload_output.py +189 -0
  156. flywheel/models/complete_s3_multipart_upload_input.py +241 -0
  157. flywheel/models/config_feature_map.py +36 -0
  158. flywheel/models/config_out.py +381 -0
  159. flywheel/models/config_output.py +36 -0
  160. flywheel/models/config_site_config_output.py +36 -0
  161. flywheel/models/config_site_settings.py +36 -0
  162. flywheel/models/config_site_settings_input.py +36 -0
  163. flywheel/models/conflict_types.py +30 -0
  164. flywheel/models/container_delete_reason.py +39 -0
  165. flywheel/models/container_filter.py +193 -0
  166. flywheel/models/container_id_view_input.py +521 -0
  167. flywheel/models/container_id_view_input_execute_and_save.py +308 -0
  168. flywheel/models/container_modify.py +536 -0
  169. flywheel/models/container_new_output.py +25 -0
  170. flywheel/models/container_node_min.py +350 -0
  171. flywheel/models/container_output.py +36 -0
  172. flywheel/models/container_output_with_files.py +283 -0
  173. flywheel/models/container_parents.py +311 -0
  174. flywheel/models/container_pipeline_input.py +536 -0
  175. flywheel/models/container_project_parents.py +25 -0
  176. flywheel/models/container_reference.py +193 -0
  177. flywheel/models/container_reference_with_label.py +219 -0
  178. flywheel/models/container_session_parents.py +25 -0
  179. flywheel/models/container_subject_parents.py +25 -0
  180. flywheel/models/container_type.py +39 -0
  181. flywheel/models/container_uidcheck.py +253 -0
  182. flywheel/models/container_update.py +135 -0
  183. flywheel/models/context_input.py +217 -0
  184. flywheel/models/copy_filter.py +299 -0
  185. flywheel/models/copy_status.py +32 -0
  186. flywheel/models/core_models_api_key_api_key_input.py +190 -0
  187. flywheel/models/core_models_audit_trail_create_report_input.py +273 -0
  188. flywheel/models/core_models_audit_trail_modify_report_input.py +167 -0
  189. flywheel/models/core_models_common_source.py +189 -0
  190. flywheel/models/core_models_jobs_api_key_input.py +191 -0
  191. flywheel/models/core_models_search_parent_type.py +33 -0
  192. flywheel/models/core_workflows_form_responses_models_form_parents.py +163 -0
  193. flywheel/models/core_workflows_form_responses_models_form_response_output.py +440 -0
  194. flywheel/models/core_workflows_reader_models_reader_task_parents.py +295 -0
  195. flywheel/models/creds.py +135 -0
  196. flywheel/models/curator.py +221 -0
  197. flywheel/models/current_user_output.py +707 -0
  198. flywheel/models/custom_field.py +437 -0
  199. flywheel/models/custom_form.py +244 -0
  200. flywheel/models/cvat_info.py +275 -0
  201. flywheel/models/cvat_settings.py +272 -0
  202. flywheel/models/cvat_settings_input.py +272 -0
  203. flywheel/models/cvat_sync_state.py +30 -0
  204. flywheel/models/daily_report_usage.py +565 -0
  205. flywheel/models/data_strategy.py +29 -0
  206. flywheel/models/data_view.py +25 -0
  207. flywheel/models/data_view_analysis_file_spec.py +221 -0
  208. flywheel/models/data_view_analysis_filter_spec.py +221 -0
  209. flywheel/models/data_view_column_alias.py +337 -0
  210. flywheel/models/data_view_column_spec.py +286 -0
  211. flywheel/models/data_view_execution.py +505 -0
  212. flywheel/models/data_view_execution_state.py +31 -0
  213. flywheel/models/data_view_file_spec.py +392 -0
  214. flywheel/models/data_view_group_by.py +166 -0
  215. flywheel/models/data_view_group_by_column.py +194 -0
  216. flywheel/models/data_view_name_filter_spec.py +194 -0
  217. flywheel/models/data_view_output.py +25 -0
  218. flywheel/models/data_view_save_data_view_input.py +25 -0
  219. flywheel/models/data_view_zip_filter_spec.py +223 -0
  220. flywheel/models/default_flywheel_role.py +30 -0
  221. flywheel/models/deid_log_skip_reason.py +29 -0
  222. flywheel/models/delete_by_search_query.py +253 -0
  223. flywheel/models/deleted_file.py +514 -0
  224. flywheel/models/deleted_result.py +194 -0
  225. flywheel/models/deprecated_action.py +29 -0
  226. flywheel/models/destination_container_type.py +30 -0
  227. flywheel/models/device.py +437 -0
  228. flywheel/models/device_admin_update.py +194 -0
  229. flywheel/models/device_create.py +219 -0
  230. flywheel/models/device_self_update.py +272 -0
  231. flywheel/models/device_status.py +36 -0
  232. flywheel/models/device_status_entry.py +221 -0
  233. flywheel/models/device_storage_strategy_update.py +193 -0
  234. flywheel/models/dimse_project_input.py +36 -0
  235. flywheel/models/dimse_project_output.py +36 -0
  236. flywheel/models/dimse_service_input.py +36 -0
  237. flywheel/models/dimse_service_output.py +36 -0
  238. flywheel/models/download.py +249 -0
  239. flywheel/models/download_container_filter.py +167 -0
  240. flywheel/models/download_container_filter_definition.py +222 -0
  241. flywheel/models/download_filter.py +221 -0
  242. flywheel/models/download_filter_definition.py +195 -0
  243. flywheel/models/download_format.py +29 -0
  244. flywheel/models/download_input.py +25 -0
  245. flywheel/models/download_node.py +189 -0
  246. flywheel/models/download_strategy.py +31 -0
  247. flywheel/models/download_ticket.py +36 -0
  248. flywheel/models/download_ticket_stub.py +249 -0
  249. flywheel/models/download_ticket_with_summary.py +36 -0
  250. flywheel/models/e_signature.py +242 -0
  251. flywheel/models/edition.py +169 -0
  252. flywheel/models/egress_device.py +597 -0
  253. flywheel/models/egress_device_page.py +219 -0
  254. flywheel/models/egress_provider.py +408 -0
  255. flywheel/models/egress_provider_id.py +164 -0
  256. flywheel/models/exchange_storage.py +243 -0
  257. flywheel/models/executor_info.py +353 -0
  258. flywheel/models/export_templates.py +195 -0
  259. flywheel/models/features.py +1838 -0
  260. flywheel/models/field_change.py +271 -0
  261. flywheel/models/field_change_log_document.py +245 -0
  262. flywheel/models/field_type.py +37 -0
  263. flywheel/models/file.py +1139 -0
  264. flywheel/models/file_classification_delta.py +245 -0
  265. flywheel/models/file_container_type.py +34 -0
  266. flywheel/models/file_entry.py +740 -0
  267. flywheel/models/file_export_templates.py +272 -0
  268. flywheel/models/file_format.py +33 -0
  269. flywheel/models/file_gear_info.py +215 -0
  270. flywheel/models/file_group.py +29 -0
  271. flywheel/models/file_list_output.py +1115 -0
  272. flywheel/models/file_modify_input.py +191 -0
  273. flywheel/models/file_move_input.py +221 -0
  274. flywheel/models/file_node.py +1138 -0
  275. flywheel/models/file_node_min.py +321 -0
  276. flywheel/models/file_origin.py +283 -0
  277. flywheel/models/file_output.py +1135 -0
  278. flywheel/models/file_parents.py +297 -0
  279. flywheel/models/file_reference.py +221 -0
  280. flywheel/models/file_suggestion.py +241 -0
  281. flywheel/models/file_template_options.py +299 -0
  282. flywheel/models/file_upsert_input.py +612 -0
  283. flywheel/models/file_upsert_origin.py +36 -0
  284. flywheel/models/file_upsert_output.py +1154 -0
  285. flywheel/models/file_version.py +190 -0
  286. flywheel/models/file_version_copy_of.py +273 -0
  287. flywheel/models/file_version_output.py +325 -0
  288. flywheel/models/file_via.py +245 -0
  289. flywheel/models/file_zip_entry.py +25 -0
  290. flywheel/models/file_zip_info.py +25 -0
  291. flywheel/models/filter.py +350 -0
  292. flywheel/models/filter_input.py +218 -0
  293. flywheel/models/filter_values.py +195 -0
  294. flywheel/models/filter_view.py +28 -0
  295. flywheel/models/fixed_file_version_input.py +216 -0
  296. flywheel/models/fixed_input.py +299 -0
  297. flywheel/models/form_definition.py +163 -0
  298. flywheel/models/form_response_base.py +311 -0
  299. flywheel/models/form_response_create.py +193 -0
  300. flywheel/models/gcp_creds.py +397 -0
  301. flywheel/models/gcp_storage.py +298 -0
  302. flywheel/models/gear.py +619 -0
  303. flywheel/models/gear_category.py +32 -0
  304. flywheel/models/gear_config.py +138 -0
  305. flywheel/models/gear_context_input.py +164 -0
  306. flywheel/models/gear_context_lookup.py +25 -0
  307. flywheel/models/gear_context_lookup_item.py +36 -0
  308. flywheel/models/gear_context_value_output.py +272 -0
  309. flywheel/models/gear_context_value_output_unfound.py +164 -0
  310. flywheel/models/gear_custom.py +135 -0
  311. flywheel/models/gear_directive.py +135 -0
  312. flywheel/models/gear_doc.py +25 -0
  313. flywheel/models/gear_document.py +332 -0
  314. flywheel/models/gear_document_input.py +303 -0
  315. flywheel/models/gear_document_legacy_input.py +302 -0
  316. flywheel/models/gear_environment.py +135 -0
  317. flywheel/models/gear_exchange.py +221 -0
  318. flywheel/models/gear_file_input.py +192 -0
  319. flywheel/models/gear_id_output.py +170 -0
  320. flywheel/models/gear_info.py +251 -0
  321. flywheel/models/gear_input_item.py +231 -0
  322. flywheel/models/gear_inputs.py +140 -0
  323. flywheel/models/gear_invocation.py +138 -0
  324. flywheel/models/gear_key_input.py +191 -0
  325. flywheel/models/gear_manifest.py +624 -0
  326. flywheel/models/gear_mixin.py +218 -0
  327. flywheel/models/gear_node.py +355 -0
  328. flywheel/models/gear_output_configuration.py +164 -0
  329. flywheel/models/gear_permissions.py +191 -0
  330. flywheel/models/gear_permissions_input.py +163 -0
  331. flywheel/models/gear_permissions_type.py +29 -0
  332. flywheel/models/gear_return_ticket.py +25 -0
  333. flywheel/models/gear_rule.py +653 -0
  334. flywheel/models/gear_rule_condition.py +219 -0
  335. flywheel/models/gear_rule_condition_type.py +37 -0
  336. flywheel/models/gear_rule_input.py +517 -0
  337. flywheel/models/gear_rule_modify_input.py +492 -0
  338. flywheel/models/gear_rule_output.py +652 -0
  339. flywheel/models/gear_save_submission.py +221 -0
  340. flywheel/models/gear_series.py +298 -0
  341. flywheel/models/gear_series_update.py +163 -0
  342. flywheel/models/gear_suggestion_output.py +301 -0
  343. flywheel/models/gear_ticket.py +245 -0
  344. flywheel/models/gear_ticket_output.py +163 -0
  345. flywheel/models/google_auth_out.py +299 -0
  346. flywheel/models/graph_filter.py +329 -0
  347. flywheel/models/group.py +25 -0
  348. flywheel/models/group_by.py +163 -0
  349. flywheel/models/group_by_column.py +36 -0
  350. flywheel/models/group_container_output.py +33 -0
  351. flywheel/models/group_input.py +248 -0
  352. flywheel/models/group_metadata_input.py +36 -0
  353. flywheel/models/group_node.py +34 -0
  354. flywheel/models/group_output.py +471 -0
  355. flywheel/models/group_report.py +218 -0
  356. flywheel/models/group_role.py +163 -0
  357. flywheel/models/group_settings_output.py +249 -0
  358. flywheel/models/group_update.py +249 -0
  359. flywheel/models/header_feature.py +37 -0
  360. flywheel/models/hierarchy_export_templates.py +272 -0
  361. flywheel/models/http_validation_error.py +167 -0
  362. flywheel/models/info.py +218 -0
  363. flywheel/models/info_add_remove.py +36 -0
  364. flywheel/models/info_container_type.py +35 -0
  365. flywheel/models/info_replace.py +36 -0
  366. flywheel/models/info_update_input.py +36 -0
  367. flywheel/models/ingress_provider.py +299 -0
  368. flywheel/models/ingress_providers.py +272 -0
  369. flywheel/models/ingress_site_settings.py +305 -0
  370. flywheel/models/ingress_update_provider.py +218 -0
  371. flywheel/models/inline_response200.py +163 -0
  372. flywheel/models/inline_response2001.py +171 -0
  373. flywheel/models/inline_response2002.py +163 -0
  374. flywheel/models/inline_response2003.py +36 -0
  375. flywheel/models/inline_response2005.py +25 -0
  376. flywheel/models/input_filter.py +221 -0
  377. flywheel/models/input_job.py +521 -0
  378. flywheel/models/input_job_profile.py +275 -0
  379. flywheel/models/inserted_id.py +163 -0
  380. flywheel/models/job.py +841 -0
  381. flywheel/models/job_analysis_input.py +273 -0
  382. flywheel/models/job_ask.py +301 -0
  383. flywheel/models/job_ask_response.py +195 -0
  384. flywheel/models/job_ask_response_job.py +978 -0
  385. flywheel/models/job_ask_return.py +25 -0
  386. flywheel/models/job_ask_return_criteria.py +245 -0
  387. flywheel/models/job_ask_state.py +25 -0
  388. flywheel/models/job_ask_state_response.py +163 -0
  389. flywheel/models/job_complete.py +220 -0
  390. flywheel/models/job_completion_input.py +25 -0
  391. flywheel/models/job_completion_ticket.py +25 -0
  392. flywheel/models/job_config.py +135 -0
  393. flywheel/models/job_config_input.py +272 -0
  394. flywheel/models/job_config_inputs.py +25 -0
  395. flywheel/models/job_config_output.py +25 -0
  396. flywheel/models/job_container_detail.py +25 -0
  397. flywheel/models/job_destination.py +189 -0
  398. flywheel/models/job_detail.py +925 -0
  399. flywheel/models/job_detail_container.py +190 -0
  400. flywheel/models/job_detail_file_entry.py +194 -0
  401. flywheel/models/job_detail_group.py +190 -0
  402. flywheel/models/job_detail_parent_info.py +303 -0
  403. flywheel/models/job_executor_info.py +369 -0
  404. flywheel/models/job_file_input.py +247 -0
  405. flywheel/models/job_file_input_list_output.py +247 -0
  406. flywheel/models/job_file_object.py +435 -0
  407. flywheel/models/job_file_object_list_output.py +407 -0
  408. flywheel/models/job_gear_match.py +25 -0
  409. flywheel/models/job_inputs_array_item.py +305 -0
  410. flywheel/models/job_inputs_item.py +242 -0
  411. flywheel/models/job_inputs_object.py +138 -0
  412. flywheel/models/job_list_entry.py +25 -0
  413. flywheel/models/job_list_output.py +979 -0
  414. flywheel/models/job_list_output_config.py +220 -0
  415. flywheel/models/job_log.py +189 -0
  416. flywheel/models/job_log_column.py +40 -0
  417. flywheel/models/job_log_record.py +192 -0
  418. flywheel/models/job_modify.py +193 -0
  419. flywheel/models/job_origin.py +190 -0
  420. flywheel/models/job_output.py +1005 -0
  421. flywheel/models/job_output_config.py +247 -0
  422. flywheel/models/job_parents.py +297 -0
  423. flywheel/models/job_priority.py +31 -0
  424. flywheel/models/job_priority_update.py +192 -0
  425. flywheel/models/job_profile.py +427 -0
  426. flywheel/models/job_profile_input.py +25 -0
  427. flywheel/models/job_request.py +221 -0
  428. flywheel/models/job_request_item.py +246 -0
  429. flywheel/models/job_request_item_type.py +31 -0
  430. flywheel/models/job_request_target.py +270 -0
  431. flywheel/models/job_state.py +32 -0
  432. flywheel/models/job_state_counts.py +25 -0
  433. flywheel/models/job_stats_by_state.py +25 -0
  434. flywheel/models/job_ticket_output.py +165 -0
  435. flywheel/models/job_transition_times.py +253 -0
  436. flywheel/models/job_version_info.py +135 -0
  437. flywheel/models/jobs_by_state.py +272 -0
  438. flywheel/models/jobs_list.py +166 -0
  439. flywheel/models/join_origin_device.py +164 -0
  440. flywheel/models/join_origin_job.py +219 -0
  441. flywheel/models/join_origin_user.py +189 -0
  442. flywheel/models/join_origins.py +223 -0
  443. flywheel/models/join_type.py +28 -0
  444. flywheel/models/jupyterhub_workspace.py +163 -0
  445. flywheel/models/jupyterlab_server_modify.py +275 -0
  446. flywheel/models/jupyterlab_server_origin.py +25 -0
  447. flywheel/models/jupyterlab_server_output.py +25 -0
  448. flywheel/models/jupyterlab_server_response.py +415 -0
  449. flywheel/models/jupyterlab_server_update.py +25 -0
  450. flywheel/models/ldap_sync.py +36 -0
  451. flywheel/models/ldap_sync_config.py +163 -0
  452. flywheel/models/ldap_sync_input.py +36 -0
  453. flywheel/models/ldap_sync_status.py +250 -0
  454. flywheel/models/legacy_api_key_output.py +271 -0
  455. flywheel/models/legacy_input.py +244 -0
  456. flywheel/models/legacy_usage_report.py +309 -0
  457. flywheel/models/legacys_usage_project_entry.py +194 -0
  458. flywheel/models/libs_workflows_models_parent_type.py +33 -0
  459. flywheel/models/libs_workflows_models_task_status.py +32 -0
  460. flywheel/models/local_storage.py +217 -0
  461. flywheel/models/location.py +189 -0
  462. flywheel/models/locked.py +219 -0
  463. flywheel/models/master_subject_code_dob_input.py +279 -0
  464. flywheel/models/master_subject_code_input.py +281 -0
  465. flywheel/models/master_subject_code_output.py +166 -0
  466. flywheel/models/matched_acquisition_output.py +518 -0
  467. flywheel/models/mfa_channel.py +30 -0
  468. flywheel/models/mfa_settings.py +167 -0
  469. flywheel/models/mixins.py +794 -0
  470. flywheel/models/ml_set_filter.py +194 -0
  471. flywheel/models/ml_type.py +30 -0
  472. flywheel/models/modality.py +250 -0
  473. flywheel/models/modality_input.py +244 -0
  474. flywheel/models/modality_modify.py +218 -0
  475. flywheel/models/modality_output.py +271 -0
  476. flywheel/models/modified_result.py +190 -0
  477. flywheel/models/modify_user_input.py +466 -0
  478. flywheel/models/move_conflict.py +300 -0
  479. flywheel/models/note.py +391 -0
  480. flywheel/models/note_input.py +165 -0
  481. flywheel/models/optional_input_policy.py +30 -0
  482. flywheel/models/order.py +29 -0
  483. flywheel/models/organ_system.py +64 -0
  484. flywheel/models/origin.py +193 -0
  485. flywheel/models/origin_type.py +35 -0
  486. flywheel/models/orphaned_count.py +163 -0
  487. flywheel/models/output_user_page.py +219 -0
  488. flywheel/models/packfile_cleanup_output.py +166 -0
  489. flywheel/models/packfile_removed_output.py +189 -0
  490. flywheel/models/page.py +216 -0
  491. flywheel/models/page_generic_file_output.py +219 -0
  492. flywheel/models/page_generic_filter.py +219 -0
  493. flywheel/models/page_generic_form_response_output.py +219 -0
  494. flywheel/models/page_generic_protocol.py +244 -0
  495. flywheel/models/page_generic_reader_task_output.py +244 -0
  496. flywheel/models/page_generic_staffing_pool.py +244 -0
  497. flywheel/models/parsed_query_response.py +194 -0
  498. flywheel/models/permission_access_permission.py +25 -0
  499. flywheel/models/premade_jobs_batch_job_output.py +298 -0
  500. flywheel/models/premade_jobs_batch_job_output_inflated_jobs.py +299 -0
  501. flywheel/models/premade_jobs_batch_proposal.py +334 -0
  502. flywheel/models/premade_jobs_batch_proposal_detail.py +166 -0
  503. flywheel/models/premade_jobs_batch_proposal_input.py +166 -0
  504. flywheel/models/project.py +25 -0
  505. flywheel/models/project_acquisition_upsert_input.py +25 -0
  506. flywheel/models/project_acquisition_upsert_output.py +25 -0
  507. flywheel/models/project_aet.py +331 -0
  508. flywheel/models/project_aet_input.py +248 -0
  509. flywheel/models/project_catalog_list_output.py +25 -0
  510. flywheel/models/project_contact.py +194 -0
  511. flywheel/models/project_container_output.py +41 -0
  512. flywheel/models/project_copy_input.py +245 -0
  513. flywheel/models/project_copy_output.py +215 -0
  514. flywheel/models/project_counters.py +346 -0
  515. flywheel/models/project_hierarchy_input.py +278 -0
  516. flywheel/models/project_hierarchy_output.py +222 -0
  517. flywheel/models/project_hierarchy_upsert_input.py +25 -0
  518. flywheel/models/project_hierarchy_upsert_output.py +25 -0
  519. flywheel/models/project_input.py +384 -0
  520. flywheel/models/project_institution.py +194 -0
  521. flywheel/models/project_list_output.py +897 -0
  522. flywheel/models/project_locking_reason.py +32 -0
  523. flywheel/models/project_modify.py +413 -0
  524. flywheel/models/project_node.py +42 -0
  525. flywheel/models/project_output.py +899 -0
  526. flywheel/models/project_parents.py +168 -0
  527. flywheel/models/project_report.py +463 -0
  528. flywheel/models/project_report_list.py +167 -0
  529. flywheel/models/project_session_upsert_input.py +25 -0
  530. flywheel/models/project_session_upsert_output.py +25 -0
  531. flywheel/models/project_settings_input.py +333 -0
  532. flywheel/models/project_settings_output.py +333 -0
  533. flywheel/models/project_settings_sharing.py +327 -0
  534. flywheel/models/project_settings_sharing_input.py +334 -0
  535. flywheel/models/project_settings_workspaces.py +167 -0
  536. flywheel/models/project_settings_workspaces_input.py +167 -0
  537. flywheel/models/project_share_level.py +29 -0
  538. flywheel/models/project_sharing_settings_project_contact.py +25 -0
  539. flywheel/models/project_sharing_settings_project_counters.py +36 -0
  540. flywheel/models/project_sharing_settings_project_institution.py +25 -0
  541. flywheel/models/project_sharing_settings_project_settings_input.py +25 -0
  542. flywheel/models/project_sharing_settings_project_settings_output.py +25 -0
  543. flywheel/models/project_sharing_settings_project_settings_sharing.py +25 -0
  544. flywheel/models/project_sharing_settings_project_settings_sharing_input.py +25 -0
  545. flywheel/models/project_sharing_settings_project_stats.py +36 -0
  546. flywheel/models/project_stats.py +270 -0
  547. flywheel/models/project_subject_upsert_input.py +25 -0
  548. flywheel/models/project_subject_upsert_output.py +25 -0
  549. flywheel/models/project_template.py +195 -0
  550. flywheel/models/project_template_input.py +195 -0
  551. flywheel/models/project_template_list_input.py +166 -0
  552. flywheel/models/project_template_requirement.py +36 -0
  553. flywheel/models/project_template_session_template.py +36 -0
  554. flywheel/models/project_upsert_origin.py +36 -0
  555. flywheel/models/protocol.py +515 -0
  556. flywheel/models/protocol_e_signature_config.py +191 -0
  557. flywheel/models/protocol_input.py +354 -0
  558. flywheel/models/protocol_modify.py +277 -0
  559. flywheel/models/protocol_status.py +30 -0
  560. flywheel/models/provider.py +461 -0
  561. flywheel/models/provider_access_type.py +29 -0
  562. flywheel/models/provider_class.py +29 -0
  563. flywheel/models/provider_deletion_status.py +189 -0
  564. flywheel/models/provider_input.py +25 -0
  565. flywheel/models/provider_links.py +282 -0
  566. flywheel/models/provider_type.py +34 -0
  567. flywheel/models/providers.py +277 -0
  568. flywheel/models/reader_batch_create.py +463 -0
  569. flywheel/models/reader_task.py +725 -0
  570. flywheel/models/reader_task_config.py +189 -0
  571. flywheel/models/reader_task_create.py +543 -0
  572. flywheel/models/reader_task_modify.py +303 -0
  573. flywheel/models/reader_task_output.py +752 -0
  574. flywheel/models/reader_task_parent_details.py +322 -0
  575. flywheel/models/report_access_log_context.py +301 -0
  576. flywheel/models/report_access_log_context_entry.py +194 -0
  577. flywheel/models/report_access_log_context_file_entry.py +165 -0
  578. flywheel/models/report_access_log_entry.py +624 -0
  579. flywheel/models/report_access_log_origin.py +194 -0
  580. flywheel/models/report_availability_list.py +167 -0
  581. flywheel/models/report_daily_usage_entry.py +501 -0
  582. flywheel/models/report_demographics_grid.py +36 -0
  583. flywheel/models/report_ethnicity_grid.py +252 -0
  584. flywheel/models/report_gender_count.py +222 -0
  585. flywheel/models/report_group_report.py +217 -0
  586. flywheel/models/report_legacy_usage_entry.py +36 -0
  587. flywheel/models/report_legacy_usage_project_entry.py +36 -0
  588. flywheel/models/report_project.py +25 -0
  589. flywheel/models/report_site.py +192 -0
  590. flywheel/models/report_time_period.py +193 -0
  591. flywheel/models/report_usage.py +630 -0
  592. flywheel/models/report_usage_entry.py +25 -0
  593. flywheel/models/resolve_input.py +163 -0
  594. flywheel/models/resolve_output.py +194 -0
  595. flywheel/models/resolver_acquisition_node.py +36 -0
  596. flywheel/models/resolver_analysis_node.py +36 -0
  597. flywheel/models/resolver_file_node.py +36 -0
  598. flywheel/models/resolver_gear_node.py +36 -0
  599. flywheel/models/resolver_group_node.py +36 -0
  600. flywheel/models/resolver_input.py +25 -0
  601. flywheel/models/resolver_node.py +182 -0
  602. flywheel/models/resolver_output.py +25 -0
  603. flywheel/models/resolver_project_node.py +36 -0
  604. flywheel/models/resolver_session_node.py +36 -0
  605. flywheel/models/resolver_subject_node.py +36 -0
  606. flywheel/models/role_input.py +192 -0
  607. flywheel/models/role_output.py +273 -0
  608. flywheel/models/role_permission.py +194 -0
  609. flywheel/models/role_permission_output.py +189 -0
  610. flywheel/models/role_permission_update.py +163 -0
  611. flywheel/models/role_type.py +32 -0
  612. flywheel/models/role_update.py +194 -0
  613. flywheel/models/roles_backwards_compatible_role_assignment.py +36 -0
  614. flywheel/models/roles_group_role_pool_input.py +36 -0
  615. flywheel/models/roles_role.py +36 -0
  616. flywheel/models/roles_role_assignment.py +195 -0
  617. flywheel/models/roles_role_input.py +36 -0
  618. flywheel/models/rule.py +467 -0
  619. flywheel/models/rule_any.py +216 -0
  620. flywheel/models/s3_addressing_style.py +29 -0
  621. flywheel/models/s3_compat_storage.py +381 -0
  622. flywheel/models/save_search.py +298 -0
  623. flywheel/models/save_search_input.py +219 -0
  624. flywheel/models/save_search_output.py +301 -0
  625. flywheel/models/save_search_page.py +219 -0
  626. flywheel/models/save_search_parent.py +192 -0
  627. flywheel/models/save_search_update.py +194 -0
  628. flywheel/models/search_acquisition_response.py +252 -0
  629. flywheel/models/search_analysis_response.py +254 -0
  630. flywheel/models/search_collection_response.py +254 -0
  631. flywheel/models/search_file_response.py +312 -0
  632. flywheel/models/search_group_response.py +196 -0
  633. flywheel/models/search_parent_acquisition.py +47 -0
  634. flywheel/models/search_parent_analysis.py +47 -0
  635. flywheel/models/search_parent_collection.py +46 -0
  636. flywheel/models/search_parent_project.py +54 -0
  637. flywheel/models/search_parent_response.py +213 -0
  638. flywheel/models/search_parent_session.py +48 -0
  639. flywheel/models/search_parent_subject.py +48 -0
  640. flywheel/models/search_parse_error.py +252 -0
  641. flywheel/models/search_parse_search_query_result.py +36 -0
  642. flywheel/models/search_project_response.py +196 -0
  643. flywheel/models/search_query.py +337 -0
  644. flywheel/models/search_query_suggestions.py +36 -0
  645. flywheel/models/search_response.py +448 -0
  646. flywheel/models/search_return_type.py +33 -0
  647. flywheel/models/search_save_search.py +36 -0
  648. flywheel/models/search_save_search_input.py +36 -0
  649. flywheel/models/search_save_search_parent.py +36 -0
  650. flywheel/models/search_save_search_update.py +36 -0
  651. flywheel/models/search_session_response.py +252 -0
  652. flywheel/models/search_status.py +166 -0
  653. flywheel/models/search_structured_search_query.py +25 -0
  654. flywheel/models/search_subject_response.py +225 -0
  655. flywheel/models/search_suggestion.py +36 -0
  656. flywheel/models/select_item.py +190 -0
  657. flywheel/models/server_state.py +303 -0
  658. flywheel/models/service_aet.py +301 -0
  659. flywheel/models/service_aet_input.py +276 -0
  660. flywheel/models/session.py +25 -0
  661. flywheel/models/session_container_output.py +35 -0
  662. flywheel/models/session_copy_input.py +253 -0
  663. flywheel/models/session_embedded_subject.py +299 -0
  664. flywheel/models/session_input.py +431 -0
  665. flywheel/models/session_list_output.py +897 -0
  666. flywheel/models/session_metadata_input.py +36 -0
  667. flywheel/models/session_modify.py +464 -0
  668. flywheel/models/session_node.py +36 -0
  669. flywheel/models/session_output.py +897 -0
  670. flywheel/models/session_parents.py +220 -0
  671. flywheel/models/session_template_options.py +221 -0
  672. flywheel/models/session_template_recalc_output.py +165 -0
  673. flywheel/models/session_upsert_input.py +464 -0
  674. flywheel/models/session_upsert_output.py +243 -0
  675. flywheel/models/sharing_filter_options.py +345 -0
  676. flywheel/models/signed_fs_upload_output.py +189 -0
  677. flywheel/models/signed_url_cleanup_input.py +189 -0
  678. flywheel/models/signed_url_upload_input.py +190 -0
  679. flywheel/models/signed_url_upload_output.py +349 -0
  680. flywheel/models/site.py +623 -0
  681. flywheel/models/site_report.py +194 -0
  682. flywheel/models/site_settings.py +385 -0
  683. flywheel/models/sort.py +192 -0
  684. flywheel/models/stable_api_key_input.py +25 -0
  685. flywheel/models/staffing_pool.py +324 -0
  686. flywheel/models/staffing_pool_create.py +216 -0
  687. flywheel/models/staffing_pool_list.py +164 -0
  688. flywheel/models/staffing_pool_modify.py +218 -0
  689. flywheel/models/state.py +32 -0
  690. flywheel/models/static_compute.py +218 -0
  691. flywheel/models/status_transitions.py +245 -0
  692. flywheel/models/status_type.py +31 -0
  693. flywheel/models/status_value.py +31 -0
  694. flywheel/models/storage_strategy.py +30 -0
  695. flywheel/models/storage_strategy_config.py +194 -0
  696. flywheel/models/structured_query.py +165 -0
  697. flywheel/models/structured_query_suggestions.py +196 -0
  698. flywheel/models/structured_query_value_suggestion.py +247 -0
  699. flywheel/models/subject.py +34 -0
  700. flywheel/models/subject_container_output.py +36 -0
  701. flywheel/models/subject_copy_input.py +223 -0
  702. flywheel/models/subject_input.py +627 -0
  703. flywheel/models/subject_modify.py +684 -0
  704. flywheel/models/subject_node.py +37 -0
  705. flywheel/models/subject_output.py +1008 -0
  706. flywheel/models/subject_output_for_list.py +1005 -0
  707. flywheel/models/subject_parents.py +194 -0
  708. flywheel/models/subject_role_permission.py +194 -0
  709. flywheel/models/subject_state.py +30 -0
  710. flywheel/models/subject_template_options.py +191 -0
  711. flywheel/models/subject_upsert_input.py +573 -0
  712. flywheel/models/subject_upsert_output.py +216 -0
  713. flywheel/models/sync_user_input.py +322 -0
  714. flywheel/models/tag.py +165 -0
  715. flywheel/models/task_assign.py +194 -0
  716. flywheel/models/task_facet.py +29 -0
  717. flywheel/models/task_parent_ref.py +245 -0
  718. flywheel/models/task_parent_ref_input.py +219 -0
  719. flywheel/models/task_priority.py +31 -0
  720. flywheel/models/task_submission.py +189 -0
  721. flywheel/models/therapeutic_area.py +60 -0
  722. flywheel/models/transitions.py +272 -0
  723. flywheel/models/tree_container_request_spec.py +281 -0
  724. flywheel/models/tree_graph.py +142 -0
  725. flywheel/models/tree_graph_connection.py +244 -0
  726. flywheel/models/tree_graph_connections.py +142 -0
  727. flywheel/models/tree_graph_node.py +166 -0
  728. flywheel/models/tree_request.py +25 -0
  729. flywheel/models/tree_response_item.py +142 -0
  730. flywheel/models/type_str.py +31 -0
  731. flywheel/models/uid_check_input_acquisitions.py +244 -0
  732. flywheel/models/uid_check_input_sessions.py +244 -0
  733. flywheel/models/uid_check_output.py +191 -0
  734. flywheel/models/upload_complete_s3_multipart_input.py +25 -0
  735. flywheel/models/upload_complete_s3_multipart_output.py +25 -0
  736. flywheel/models/upload_signed_fs_file_upload_output.py +36 -0
  737. flywheel/models/upload_signed_upload_url_input.py +36 -0
  738. flywheel/models/upload_signed_upload_url_output.py +36 -0
  739. flywheel/models/upload_ticket_output.py +215 -0
  740. flywheel/models/upload_token_output.py +163 -0
  741. flywheel/models/upsert_result.py +31 -0
  742. flywheel/models/user.py +760 -0
  743. flywheel/models/user_api_key.py +220 -0
  744. flywheel/models/user_input.py +461 -0
  745. flywheel/models/user_jobs.py +219 -0
  746. flywheel/models/user_jobs_output.py +25 -0
  747. flywheel/models/user_output.py +36 -0
  748. flywheel/models/user_output_id.py +163 -0
  749. flywheel/models/user_preferences.py +135 -0
  750. flywheel/models/user_wechat.py +135 -0
  751. flywheel/models/validation_error.py +215 -0
  752. flywheel/models/validation_rule.py +190 -0
  753. flywheel/models/version.py +363 -0
  754. flywheel/models/version_output.py +25 -0
  755. flywheel/models/view_id_output.py +164 -0
  756. flywheel/models/view_output.py +440 -0
  757. flywheel/models/viewer_app.py +381 -0
  758. flywheel/models/viewer_app_input.py +382 -0
  759. flywheel/models/viewer_app_type.py +29 -0
  760. flywheel/models/virus_scan.py +166 -0
  761. flywheel/models/virus_scan_state.py +30 -0
  762. flywheel/models/work_in_progress_features.py +135 -0
  763. flywheel/models/zipfile_info.py +192 -0
  764. flywheel/models/zipfile_member_info.py +241 -0
  765. flywheel/partial_reader.py +50 -0
  766. flywheel/rest.py +352 -0
  767. flywheel/util.py +95 -0
  768. flywheel/view_builder.py +449 -0
  769. flywheel_sdk-21.2.0.dist-info/METADATA +42 -0
  770. flywheel_sdk-21.2.0.dist-info/RECORD +772 -0
  771. flywheel_sdk-21.2.0.dist-info/WHEEL +4 -0
  772. flywheel_sdk-21.2.0.dist-info/licenses/LICENSE.txt +18 -0
@@ -0,0 +1,3848 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Flywheel
5
+
6
+ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
7
+
8
+ OpenAPI spec version: 0.0.1
9
+
10
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
11
+ """
12
+
13
+
14
+ from __future__ import absolute_import
15
+
16
+ import re # noqa: F401
17
+
18
+ # python 2 and python 3 compatibility library
19
+ import six
20
+
21
+ from flywheel.api_client import ApiClient
22
+ import flywheel.models
23
+ from flywheel.util import check_filename_params
24
+
25
+ # NOTE: This file is auto generated by the swagger code generator program.
26
+ # Do not edit the class manually.
27
+
28
+ class AnalysesApi(object):
29
+ def __init__(self, api_client=None):
30
+ if api_client is None:
31
+ api_client = ApiClient()
32
+ self.api_client = api_client
33
+
34
+ def add_analysis_note(self, container_id, body, **kwargs): # noqa: E501
35
+ """Add a note to a(n) analysis.
36
+
37
+ Add a note to a(n) analysis.
38
+ This method makes a synchronous HTTP request by default.
39
+
40
+ :param str container_id: (required)
41
+ :param NoteInput body: (required)
42
+ :param bool async_: Perform the request asynchronously
43
+ :return: Note
44
+ """
45
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
46
+ kwargs['_return_http_data_only'] = True
47
+
48
+ if kwargs.get('async_'):
49
+ return self.add_analysis_note_with_http_info(container_id, body, **kwargs) # noqa: E501
50
+ else:
51
+ (data) = self.add_analysis_note_with_http_info(container_id, body, **kwargs) # noqa: E501
52
+ if (
53
+ data
54
+ and hasattr(data, 'return_value')
55
+ and not ignore_simplified_return_value
56
+ ):
57
+ return data.return_value()
58
+ return data
59
+
60
+
61
+ def add_analysis_note_with_http_info(self, container_id, body, **kwargs): # noqa: E501
62
+ """Add a note to a(n) analysis.
63
+
64
+ Add a note to a(n) analysis.
65
+ This method makes a synchronous HTTP request by default.
66
+
67
+ :param str container_id: (required)
68
+ :param NoteInput body: (required)
69
+ :param bool async_: Perform the request asynchronously
70
+ :return: Note
71
+ """
72
+
73
+ all_params = ['container_id','body',] # noqa: E501
74
+ all_params.append('async_')
75
+ all_params.append('_return_http_data_only')
76
+ all_params.append('_preload_content')
77
+ all_params.append('_request_timeout')
78
+ all_params.append('_request_out')
79
+
80
+ params = locals()
81
+ for key, val in six.iteritems(params['kwargs']):
82
+ if key not in all_params:
83
+ raise TypeError(
84
+ "Got an unexpected keyword argument '%s'"
85
+ " to method add_analysis_note" % key
86
+ )
87
+ params[key] = val
88
+ del params['kwargs']
89
+ # verify the required parameter 'container_id' is set
90
+ if ('container_id' not in params or
91
+ params['container_id'] is None):
92
+ raise ValueError("Missing the required parameter `container_id` when calling `add_analysis_note`") # noqa: E501
93
+ # verify the required parameter 'body' is set
94
+ if ('body' not in params or
95
+ params['body'] is None):
96
+ raise ValueError("Missing the required parameter `body` when calling `add_analysis_note`") # noqa: E501
97
+ check_filename_params(params)
98
+
99
+ collection_formats = {}
100
+
101
+ path_params = {}
102
+ if 'container_id' in params:
103
+ path_params['container_id'] = params['container_id'] # noqa: E501
104
+
105
+ query_params = []
106
+
107
+ header_params = {}
108
+
109
+ form_params = []
110
+ local_var_files = {}
111
+
112
+ body_params = None
113
+ if 'body' in params:
114
+ if 'NoteInput'.startswith('union'):
115
+ body_type = type(params['body'])
116
+ if getattr(body_type, 'positional_to_model', None):
117
+ body_params = body_type.positional_to_model(params['body'])
118
+ else:
119
+ body_params = params['body']
120
+ else:
121
+ body_params = flywheel.models.NoteInput.positional_to_model(params['body'])
122
+ # HTTP header `Accept`
123
+ header_params['Accept'] = self.api_client.select_header_accept(
124
+ ['application/json']) # noqa: E501
125
+
126
+ # HTTP header `Content-Type`
127
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
128
+ ['application/json']) # noqa: E501
129
+
130
+ # Authentication setting
131
+ auth_settings = ['ApiKey'] # noqa: E501
132
+
133
+ return self.api_client.call_api(
134
+ '/analyses/{container_id}/notes', 'POST',
135
+ path_params,
136
+ query_params,
137
+ header_params,
138
+ body=body_params,
139
+ post_params=form_params,
140
+ files=local_var_files,
141
+ response_type='Note', # noqa: E501
142
+ auth_settings=auth_settings,
143
+ async_=params.get('async_'),
144
+ _return_http_data_only=params.get('_return_http_data_only'),
145
+ _preload_content=params.get('_preload_content', True),
146
+ _request_timeout=params.get('_request_timeout'),
147
+ _request_out=params.get('_request_out'),
148
+ collection_formats=collection_formats)
149
+
150
+ def add_analysis_tag(self, container_id, body, **kwargs): # noqa: E501
151
+ """Add a tag to a(n) analysis.
152
+
153
+ Propagates changes to projects, sessions and acquisitions
154
+ This method makes a synchronous HTTP request by default.
155
+
156
+ :param str container_id: (required)
157
+ :param Tag body: (required)
158
+ :param bool async_: Perform the request asynchronously
159
+ :return: ModifiedResult
160
+ """
161
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
162
+ kwargs['_return_http_data_only'] = True
163
+
164
+ if kwargs.get('async_'):
165
+ return self.add_analysis_tag_with_http_info(container_id, body, **kwargs) # noqa: E501
166
+ else:
167
+ (data) = self.add_analysis_tag_with_http_info(container_id, body, **kwargs) # noqa: E501
168
+ if (
169
+ data
170
+ and hasattr(data, 'return_value')
171
+ and not ignore_simplified_return_value
172
+ ):
173
+ return data.return_value()
174
+ return data
175
+
176
+
177
+ def add_analysis_tag_with_http_info(self, container_id, body, **kwargs): # noqa: E501
178
+ """Add a tag to a(n) analysis.
179
+
180
+ Propagates changes to projects, sessions and acquisitions
181
+ This method makes a synchronous HTTP request by default.
182
+
183
+ :param str container_id: (required)
184
+ :param Tag body: (required)
185
+ :param bool async_: Perform the request asynchronously
186
+ :return: ModifiedResult
187
+ """
188
+
189
+ all_params = ['container_id','body',] # noqa: E501
190
+ all_params.append('async_')
191
+ all_params.append('_return_http_data_only')
192
+ all_params.append('_preload_content')
193
+ all_params.append('_request_timeout')
194
+ all_params.append('_request_out')
195
+
196
+ params = locals()
197
+ for key, val in six.iteritems(params['kwargs']):
198
+ if key not in all_params:
199
+ raise TypeError(
200
+ "Got an unexpected keyword argument '%s'"
201
+ " to method add_analysis_tag" % key
202
+ )
203
+ params[key] = val
204
+ del params['kwargs']
205
+ # verify the required parameter 'container_id' is set
206
+ if ('container_id' not in params or
207
+ params['container_id'] is None):
208
+ raise ValueError("Missing the required parameter `container_id` when calling `add_analysis_tag`") # noqa: E501
209
+ # verify the required parameter 'body' is set
210
+ if ('body' not in params or
211
+ params['body'] is None):
212
+ raise ValueError("Missing the required parameter `body` when calling `add_analysis_tag`") # noqa: E501
213
+ check_filename_params(params)
214
+
215
+ collection_formats = {}
216
+
217
+ path_params = {}
218
+ if 'container_id' in params:
219
+ path_params['container_id'] = params['container_id'] # noqa: E501
220
+
221
+ query_params = []
222
+
223
+ header_params = {}
224
+
225
+ form_params = []
226
+ local_var_files = {}
227
+
228
+ body_params = None
229
+ if 'body' in params:
230
+ if 'Tag'.startswith('union'):
231
+ body_type = type(params['body'])
232
+ if getattr(body_type, 'positional_to_model', None):
233
+ body_params = body_type.positional_to_model(params['body'])
234
+ else:
235
+ body_params = params['body']
236
+ else:
237
+ body_params = flywheel.models.Tag.positional_to_model(params['body'])
238
+ # HTTP header `Accept`
239
+ header_params['Accept'] = self.api_client.select_header_accept(
240
+ ['application/json']) # noqa: E501
241
+
242
+ # HTTP header `Content-Type`
243
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
244
+ ['application/json']) # noqa: E501
245
+
246
+ # Authentication setting
247
+ auth_settings = ['ApiKey'] # noqa: E501
248
+
249
+ return self.api_client.call_api(
250
+ '/analyses/{container_id}/tags', 'POST',
251
+ path_params,
252
+ query_params,
253
+ header_params,
254
+ body=body_params,
255
+ post_params=form_params,
256
+ files=local_var_files,
257
+ response_type='ModifiedResult', # noqa: E501
258
+ auth_settings=auth_settings,
259
+ async_=params.get('async_'),
260
+ _return_http_data_only=params.get('_return_http_data_only'),
261
+ _preload_content=params.get('_preload_content', True),
262
+ _request_timeout=params.get('_request_timeout'),
263
+ _request_out=params.get('_request_out'),
264
+ collection_formats=collection_formats)
265
+
266
+ def delete_analyses_by_ids(self, body, **kwargs): # noqa: E501
267
+ """Delete multiple analyses by ID list
268
+
269
+ Delete multiple analyses by ID list
270
+ This method makes a synchronous HTTP request by default.
271
+
272
+ :param list[str] body: List of IDs to delete (required)
273
+ :param ContainerDeleteReason delete_reason:
274
+ :param bool async_: Perform the request asynchronously
275
+ :return: DeletedResult
276
+ """
277
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
278
+ kwargs['_return_http_data_only'] = True
279
+
280
+ if kwargs.get('async_'):
281
+ return self.delete_analyses_by_ids_with_http_info(body, **kwargs) # noqa: E501
282
+ else:
283
+ (data) = self.delete_analyses_by_ids_with_http_info(body, **kwargs) # noqa: E501
284
+ if (
285
+ data
286
+ and hasattr(data, 'return_value')
287
+ and not ignore_simplified_return_value
288
+ ):
289
+ return data.return_value()
290
+ return data
291
+
292
+
293
+ def delete_analyses_by_ids_with_http_info(self, body, **kwargs): # noqa: E501
294
+ """Delete multiple analyses by ID list
295
+
296
+ Delete multiple analyses by ID list
297
+ This method makes a synchronous HTTP request by default.
298
+
299
+ :param list[str] body: List of IDs to delete (required)
300
+ :param ContainerDeleteReason delete_reason:
301
+ :param bool async_: Perform the request asynchronously
302
+ :return: DeletedResult
303
+ """
304
+
305
+ all_params = ['body','delete_reason',] # noqa: E501
306
+ all_params.append('async_')
307
+ all_params.append('_return_http_data_only')
308
+ all_params.append('_preload_content')
309
+ all_params.append('_request_timeout')
310
+ all_params.append('_request_out')
311
+
312
+ params = locals()
313
+ for key, val in six.iteritems(params['kwargs']):
314
+ if key not in all_params:
315
+ raise TypeError(
316
+ "Got an unexpected keyword argument '%s'"
317
+ " to method delete_analyses_by_ids" % key
318
+ )
319
+ params[key] = val
320
+ del params['kwargs']
321
+ # verify the required parameter 'body' is set
322
+ if ('body' not in params or
323
+ params['body'] is None):
324
+ raise ValueError("Missing the required parameter `body` when calling `delete_analyses_by_ids`") # noqa: E501
325
+ check_filename_params(params)
326
+
327
+ collection_formats = {}
328
+
329
+ path_params = {}
330
+
331
+ query_params = []
332
+ if 'delete_reason' in params:
333
+ query_params.append(('delete_reason', params['delete_reason'])) # noqa: E501
334
+
335
+ header_params = {}
336
+
337
+ form_params = []
338
+ local_var_files = {}
339
+
340
+ body_params = None
341
+ if 'body' in params:
342
+ body_params = params['body']
343
+ # HTTP header `Accept`
344
+ header_params['Accept'] = self.api_client.select_header_accept(
345
+ ['application/json']) # noqa: E501
346
+
347
+ # HTTP header `Content-Type`
348
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
349
+ ['application/json']) # noqa: E501
350
+
351
+ # Authentication setting
352
+ auth_settings = ['ApiKey'] # noqa: E501
353
+
354
+ return self.api_client.call_api(
355
+ '/analyses', 'DELETE',
356
+ path_params,
357
+ query_params,
358
+ header_params,
359
+ body=body_params,
360
+ post_params=form_params,
361
+ files=local_var_files,
362
+ response_type='DeletedResult', # noqa: E501
363
+ auth_settings=auth_settings,
364
+ async_=params.get('async_'),
365
+ _return_http_data_only=params.get('_return_http_data_only'),
366
+ _preload_content=params.get('_preload_content', True),
367
+ _request_timeout=params.get('_request_timeout'),
368
+ _request_out=params.get('_request_out'),
369
+ collection_formats=collection_formats)
370
+
371
+ def delete_analysis(self, analysis_id, **kwargs): # noqa: E501
372
+ """Delete an analysis
373
+
374
+ Delete an analysis by its id Args: analysis_id: The id of the analysis auth_session: The auth session delete_reason: The reason for deletion (required when audit-trail is enabled)
375
+ This method makes a synchronous HTTP request by default.
376
+
377
+ :param str analysis_id: 24-char hex analysis id (required)
378
+ :param ContainerDeleteReason delete_reason:
379
+ :param bool async_: Perform the request asynchronously
380
+ :return: DeletedResult
381
+ """
382
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
383
+ kwargs['_return_http_data_only'] = True
384
+
385
+ if kwargs.get('async_'):
386
+ return self.delete_analysis_with_http_info(analysis_id, **kwargs) # noqa: E501
387
+ else:
388
+ (data) = self.delete_analysis_with_http_info(analysis_id, **kwargs) # noqa: E501
389
+ if (
390
+ data
391
+ and hasattr(data, 'return_value')
392
+ and not ignore_simplified_return_value
393
+ ):
394
+ return data.return_value()
395
+ return data
396
+
397
+
398
+ def delete_analysis_with_http_info(self, analysis_id, **kwargs): # noqa: E501
399
+ """Delete an analysis
400
+
401
+ Delete an analysis by its id Args: analysis_id: The id of the analysis auth_session: The auth session delete_reason: The reason for deletion (required when audit-trail is enabled)
402
+ This method makes a synchronous HTTP request by default.
403
+
404
+ :param str analysis_id: 24-char hex analysis id (required)
405
+ :param ContainerDeleteReason delete_reason:
406
+ :param bool async_: Perform the request asynchronously
407
+ :return: DeletedResult
408
+ """
409
+
410
+ all_params = ['analysis_id','delete_reason',] # noqa: E501
411
+ all_params.append('async_')
412
+ all_params.append('_return_http_data_only')
413
+ all_params.append('_preload_content')
414
+ all_params.append('_request_timeout')
415
+ all_params.append('_request_out')
416
+
417
+ params = locals()
418
+ for key, val in six.iteritems(params['kwargs']):
419
+ if key not in all_params:
420
+ raise TypeError(
421
+ "Got an unexpected keyword argument '%s'"
422
+ " to method delete_analysis" % key
423
+ )
424
+ params[key] = val
425
+ del params['kwargs']
426
+ # verify the required parameter 'analysis_id' is set
427
+ if ('analysis_id' not in params or
428
+ params['analysis_id'] is None):
429
+ raise ValueError("Missing the required parameter `analysis_id` when calling `delete_analysis`") # noqa: E501
430
+ check_filename_params(params)
431
+
432
+ collection_formats = {}
433
+
434
+ path_params = {}
435
+ if 'analysis_id' in params:
436
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
437
+
438
+ query_params = []
439
+ if 'delete_reason' in params:
440
+ query_params.append(('delete_reason', params['delete_reason'])) # noqa: E501
441
+
442
+ header_params = {}
443
+
444
+ form_params = []
445
+ local_var_files = {}
446
+
447
+ body_params = None
448
+ # HTTP header `Accept`
449
+ header_params['Accept'] = self.api_client.select_header_accept(
450
+ ['application/json']) # noqa: E501
451
+
452
+ # Authentication setting
453
+ auth_settings = ['ApiKey'] # noqa: E501
454
+
455
+ return self.api_client.call_api(
456
+ '/analyses/{analysis_id}', 'DELETE',
457
+ path_params,
458
+ query_params,
459
+ header_params,
460
+ body=body_params,
461
+ post_params=form_params,
462
+ files=local_var_files,
463
+ response_type='DeletedResult', # noqa: E501
464
+ auth_settings=auth_settings,
465
+ async_=params.get('async_'),
466
+ _return_http_data_only=params.get('_return_http_data_only'),
467
+ _preload_content=params.get('_preload_content', True),
468
+ _request_timeout=params.get('_request_timeout'),
469
+ _request_out=params.get('_request_out'),
470
+ collection_formats=collection_formats)
471
+
472
+ def delete_analysis_file(self, cid, filename, **kwargs): # noqa: E501
473
+ """Delete a file
474
+
475
+ A user with read-write or higher permissions on the container may delete files that were uploaded by users or were the output of jobs. (Specifically, files whose `origin.type` is either `job` or `user`.) <br/> A user with admin permissions on the container may delete any file.
476
+ This method makes a synchronous HTTP request by default.
477
+
478
+ :param str cid: (required)
479
+ :param str filename: (required)
480
+ :param ContainerDeleteReason delete_reason: A reason for deletion when audit-trail is enabled
481
+ :param bool force: Force deletion of the file even if some checks fail. Deprecated, will be removed in a future release.
482
+ :param bool async_: Perform the request asynchronously
483
+ :return: DeletedResult
484
+ """
485
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
486
+ kwargs['_return_http_data_only'] = True
487
+
488
+ if kwargs.get('async_'):
489
+ return self.delete_analysis_file_with_http_info(cid, filename, **kwargs) # noqa: E501
490
+ else:
491
+ (data) = self.delete_analysis_file_with_http_info(cid, filename, **kwargs) # noqa: E501
492
+ if (
493
+ data
494
+ and hasattr(data, 'return_value')
495
+ and not ignore_simplified_return_value
496
+ ):
497
+ return data.return_value()
498
+ return data
499
+
500
+
501
+ def delete_analysis_file_with_http_info(self, cid, filename, **kwargs): # noqa: E501
502
+ """Delete a file
503
+
504
+ A user with read-write or higher permissions on the container may delete files that were uploaded by users or were the output of jobs. (Specifically, files whose `origin.type` is either `job` or `user`.) <br/> A user with admin permissions on the container may delete any file.
505
+ This method makes a synchronous HTTP request by default.
506
+
507
+ :param str cid: (required)
508
+ :param str filename: (required)
509
+ :param ContainerDeleteReason delete_reason: A reason for deletion when audit-trail is enabled
510
+ :param bool force: Force deletion of the file even if some checks fail. Deprecated, will be removed in a future release.
511
+ :param bool async_: Perform the request asynchronously
512
+ :return: DeletedResult
513
+ """
514
+
515
+ all_params = ['cid','filename','delete_reason','force',] # noqa: E501
516
+ all_params.append('async_')
517
+ all_params.append('_return_http_data_only')
518
+ all_params.append('_preload_content')
519
+ all_params.append('_request_timeout')
520
+ all_params.append('_request_out')
521
+
522
+ params = locals()
523
+ for key, val in six.iteritems(params['kwargs']):
524
+ if key not in all_params:
525
+ raise TypeError(
526
+ "Got an unexpected keyword argument '%s'"
527
+ " to method delete_analysis_file" % key
528
+ )
529
+ params[key] = val
530
+ del params['kwargs']
531
+ # verify the required parameter 'cid' is set
532
+ if ('cid' not in params or
533
+ params['cid'] is None):
534
+ raise ValueError("Missing the required parameter `cid` when calling `delete_analysis_file`") # noqa: E501
535
+ # verify the required parameter 'filename' is set
536
+ if ('filename' not in params or
537
+ params['filename'] is None):
538
+ raise ValueError("Missing the required parameter `filename` when calling `delete_analysis_file`") # noqa: E501
539
+ check_filename_params(params)
540
+
541
+ collection_formats = {}
542
+
543
+ path_params = {}
544
+ if 'cid' in params:
545
+ path_params['cid'] = params['cid'] # noqa: E501
546
+ if 'filename' in params:
547
+ path_params['filename'] = params['filename'] # noqa: E501
548
+
549
+ query_params = []
550
+ if 'delete_reason' in params:
551
+ query_params.append(('delete_reason', params['delete_reason'])) # noqa: E501
552
+ if 'force' in params:
553
+ query_params.append(('force', params['force'])) # noqa: E501
554
+
555
+ header_params = {}
556
+
557
+ form_params = []
558
+ local_var_files = {}
559
+
560
+ body_params = None
561
+ # HTTP header `Accept`
562
+ header_params['Accept'] = self.api_client.select_header_accept(
563
+ ['application/json']) # noqa: E501
564
+
565
+ # Authentication setting
566
+ auth_settings = ['ApiKey'] # noqa: E501
567
+
568
+ return self.api_client.call_api(
569
+ '/analyses/{cid}/files/{filename}', 'DELETE',
570
+ path_params,
571
+ query_params,
572
+ header_params,
573
+ body=body_params,
574
+ post_params=form_params,
575
+ files=local_var_files,
576
+ response_type='DeletedResult', # noqa: E501
577
+ auth_settings=auth_settings,
578
+ async_=params.get('async_'),
579
+ _return_http_data_only=params.get('_return_http_data_only'),
580
+ _preload_content=params.get('_preload_content', True),
581
+ _request_timeout=params.get('_request_timeout'),
582
+ _request_out=params.get('_request_out'),
583
+ collection_formats=collection_formats)
584
+
585
+ def delete_analysis_note(self, container_id, note_id, **kwargs): # noqa: E501
586
+ """Remove a note from a(n) analysis
587
+
588
+ Remove a note from a(n) analysis
589
+ This method makes a synchronous HTTP request by default.
590
+
591
+ :param str container_id: (required)
592
+ :param str note_id: (required)
593
+ :param bool async_: Perform the request asynchronously
594
+ :return: DeletedResult
595
+ """
596
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
597
+ kwargs['_return_http_data_only'] = True
598
+
599
+ if kwargs.get('async_'):
600
+ return self.delete_analysis_note_with_http_info(container_id, note_id, **kwargs) # noqa: E501
601
+ else:
602
+ (data) = self.delete_analysis_note_with_http_info(container_id, note_id, **kwargs) # noqa: E501
603
+ if (
604
+ data
605
+ and hasattr(data, 'return_value')
606
+ and not ignore_simplified_return_value
607
+ ):
608
+ return data.return_value()
609
+ return data
610
+
611
+
612
+ def delete_analysis_note_with_http_info(self, container_id, note_id, **kwargs): # noqa: E501
613
+ """Remove a note from a(n) analysis
614
+
615
+ Remove a note from a(n) analysis
616
+ This method makes a synchronous HTTP request by default.
617
+
618
+ :param str container_id: (required)
619
+ :param str note_id: (required)
620
+ :param bool async_: Perform the request asynchronously
621
+ :return: DeletedResult
622
+ """
623
+
624
+ all_params = ['container_id','note_id',] # noqa: E501
625
+ all_params.append('async_')
626
+ all_params.append('_return_http_data_only')
627
+ all_params.append('_preload_content')
628
+ all_params.append('_request_timeout')
629
+ all_params.append('_request_out')
630
+
631
+ params = locals()
632
+ for key, val in six.iteritems(params['kwargs']):
633
+ if key not in all_params:
634
+ raise TypeError(
635
+ "Got an unexpected keyword argument '%s'"
636
+ " to method delete_analysis_note" % key
637
+ )
638
+ params[key] = val
639
+ del params['kwargs']
640
+ # verify the required parameter 'container_id' is set
641
+ if ('container_id' not in params or
642
+ params['container_id'] is None):
643
+ raise ValueError("Missing the required parameter `container_id` when calling `delete_analysis_note`") # noqa: E501
644
+ # verify the required parameter 'note_id' is set
645
+ if ('note_id' not in params or
646
+ params['note_id'] is None):
647
+ raise ValueError("Missing the required parameter `note_id` when calling `delete_analysis_note`") # noqa: E501
648
+ check_filename_params(params)
649
+
650
+ collection_formats = {}
651
+
652
+ path_params = {}
653
+ if 'container_id' in params:
654
+ path_params['container_id'] = params['container_id'] # noqa: E501
655
+ if 'note_id' in params:
656
+ path_params['note_id'] = params['note_id'] # noqa: E501
657
+
658
+ query_params = []
659
+
660
+ header_params = {}
661
+
662
+ form_params = []
663
+ local_var_files = {}
664
+
665
+ body_params = None
666
+ # HTTP header `Accept`
667
+ header_params['Accept'] = self.api_client.select_header_accept(
668
+ ['application/json']) # noqa: E501
669
+
670
+ # Authentication setting
671
+ auth_settings = ['ApiKey'] # noqa: E501
672
+
673
+ return self.api_client.call_api(
674
+ '/analyses/{container_id}/notes/{note_id}', 'DELETE',
675
+ path_params,
676
+ query_params,
677
+ header_params,
678
+ body=body_params,
679
+ post_params=form_params,
680
+ files=local_var_files,
681
+ response_type='DeletedResult', # noqa: E501
682
+ auth_settings=auth_settings,
683
+ async_=params.get('async_'),
684
+ _return_http_data_only=params.get('_return_http_data_only'),
685
+ _preload_content=params.get('_preload_content', True),
686
+ _request_timeout=params.get('_request_timeout'),
687
+ _request_out=params.get('_request_out'),
688
+ collection_formats=collection_formats)
689
+
690
+ def delete_analysis_tag(self, container_id, value, **kwargs): # noqa: E501
691
+ """Delete a tag
692
+
693
+ Delete a tag
694
+ This method makes a synchronous HTTP request by default.
695
+
696
+ :param str container_id: (required)
697
+ :param str value: The tag to interact with (required)
698
+ :param bool async_: Perform the request asynchronously
699
+ :return: DeletedResult
700
+ """
701
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
702
+ kwargs['_return_http_data_only'] = True
703
+
704
+ if kwargs.get('async_'):
705
+ return self.delete_analysis_tag_with_http_info(container_id, value, **kwargs) # noqa: E501
706
+ else:
707
+ (data) = self.delete_analysis_tag_with_http_info(container_id, value, **kwargs) # noqa: E501
708
+ if (
709
+ data
710
+ and hasattr(data, 'return_value')
711
+ and not ignore_simplified_return_value
712
+ ):
713
+ return data.return_value()
714
+ return data
715
+
716
+
717
+ def delete_analysis_tag_with_http_info(self, container_id, value, **kwargs): # noqa: E501
718
+ """Delete a tag
719
+
720
+ Delete a tag
721
+ This method makes a synchronous HTTP request by default.
722
+
723
+ :param str container_id: (required)
724
+ :param str value: The tag to interact with (required)
725
+ :param bool async_: Perform the request asynchronously
726
+ :return: DeletedResult
727
+ """
728
+
729
+ all_params = ['container_id','value',] # noqa: E501
730
+ all_params.append('async_')
731
+ all_params.append('_return_http_data_only')
732
+ all_params.append('_preload_content')
733
+ all_params.append('_request_timeout')
734
+ all_params.append('_request_out')
735
+
736
+ params = locals()
737
+ for key, val in six.iteritems(params['kwargs']):
738
+ if key not in all_params:
739
+ raise TypeError(
740
+ "Got an unexpected keyword argument '%s'"
741
+ " to method delete_analysis_tag" % key
742
+ )
743
+ params[key] = val
744
+ del params['kwargs']
745
+ # verify the required parameter 'container_id' is set
746
+ if ('container_id' not in params or
747
+ params['container_id'] is None):
748
+ raise ValueError("Missing the required parameter `container_id` when calling `delete_analysis_tag`") # noqa: E501
749
+ # verify the required parameter 'value' is set
750
+ if ('value' not in params or
751
+ params['value'] is None):
752
+ raise ValueError("Missing the required parameter `value` when calling `delete_analysis_tag`") # noqa: E501
753
+ check_filename_params(params)
754
+
755
+ collection_formats = {}
756
+
757
+ path_params = {}
758
+ if 'container_id' in params:
759
+ path_params['container_id'] = params['container_id'] # noqa: E501
760
+ if 'value' in params:
761
+ path_params['value'] = params['value'] # noqa: E501
762
+
763
+ query_params = []
764
+
765
+ header_params = {}
766
+
767
+ form_params = []
768
+ local_var_files = {}
769
+
770
+ body_params = None
771
+ # HTTP header `Accept`
772
+ header_params['Accept'] = self.api_client.select_header_accept(
773
+ ['application/json']) # noqa: E501
774
+
775
+ # Authentication setting
776
+ auth_settings = ['ApiKey'] # noqa: E501
777
+
778
+ return self.api_client.call_api(
779
+ '/analyses/{container_id}/tags/{value}', 'DELETE',
780
+ path_params,
781
+ query_params,
782
+ header_params,
783
+ body=body_params,
784
+ post_params=form_params,
785
+ files=local_var_files,
786
+ response_type='DeletedResult', # noqa: E501
787
+ auth_settings=auth_settings,
788
+ async_=params.get('async_'),
789
+ _return_http_data_only=params.get('_return_http_data_only'),
790
+ _preload_content=params.get('_preload_content', True),
791
+ _request_timeout=params.get('_request_timeout'),
792
+ _request_out=params.get('_request_out'),
793
+ collection_formats=collection_formats)
794
+
795
+ def download_file_from_analysis(self, analysis_id, file_name, dest_file, **kwargs): # noqa: E501
796
+ """Download a file.
797
+
798
+ Files can be downloaded directly from this endpoint with a valid \"Authorization\" header or via a ticket id. To generate a ticket: - Make a request with an empty \"ticket\" parameter and a valid \"Authorization\" header. The server will respond with a generated ticket id. - Make another request with the received ticket id in the \"ticket\" parameter. A valid \"Authorization\" header is no longer required. When \"view\" is true, [RFC7233](https://tools.ietf.org/html/rfc7233) range request headers are supported. When virus_scan feature is enabled the quarantined files only can be downloaded using signed urls otherwise it will return with a HTTP 400 response.
799
+ This method makes a synchronous HTTP request by default.
800
+
801
+ :param str analysis_id: 24-character hex ID (required)
802
+ :param str file_name: output file name (required)
803
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
804
+ :param str member: The filename of a zipfile member to download rather than the entire file
805
+ :param bool view: If true, the proper \"Content-Type\" header based on the file's mimetype is set on response If false, the \"Content-Type\" header is set to \"application/octet-stream\"
806
+ :param int version: version of the file to download
807
+ :param str hash: file hash for comparison
808
+ :param str range: byte ranges to return
809
+ :param list[str] x_accept_feature: redirect header
810
+ :param str dest_file: Destination file path
811
+ :param bool async_: Perform the request asynchronously
812
+ :return: union[DownloadTicketStub,ZipfileInfo]
813
+ """
814
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
815
+ kwargs['_return_http_data_only'] = True
816
+
817
+ kwargs['_preload_content'] = False
818
+ # Stream response to file
819
+ with open(dest_file, 'wb') as out_file:
820
+ (resp) = self.download_file_from_analysis_with_http_info(analysis_id, file_name, **kwargs) # noqa: E501
821
+ if resp:
822
+ try:
823
+ for chunk in resp.iter_content(chunk_size=65536):
824
+ out_file.write(chunk)
825
+ finally:
826
+ resp.close()
827
+
828
+
829
+ def download_file_from_analysis_with_http_info(self, analysis_id, file_name, **kwargs): # noqa: E501
830
+ """Download a file.
831
+
832
+ Files can be downloaded directly from this endpoint with a valid \"Authorization\" header or via a ticket id. To generate a ticket: - Make a request with an empty \"ticket\" parameter and a valid \"Authorization\" header. The server will respond with a generated ticket id. - Make another request with the received ticket id in the \"ticket\" parameter. A valid \"Authorization\" header is no longer required. When \"view\" is true, [RFC7233](https://tools.ietf.org/html/rfc7233) range request headers are supported. When virus_scan feature is enabled the quarantined files only can be downloaded using signed urls otherwise it will return with a HTTP 400 response.
833
+ This method makes a synchronous HTTP request by default.
834
+
835
+ :param str analysis_id: 24-character hex ID (required)
836
+ :param str file_name: output file name (required)
837
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
838
+ :param str member: The filename of a zipfile member to download rather than the entire file
839
+ :param bool view: If true, the proper \"Content-Type\" header based on the file's mimetype is set on response If false, the \"Content-Type\" header is set to \"application/octet-stream\"
840
+ :param int version: version of the file to download
841
+ :param str hash: file hash for comparison
842
+ :param str range: byte ranges to return
843
+ :param list[str] x_accept_feature: redirect header
844
+ :param bool async_: Perform the request asynchronously
845
+ :return: union[DownloadTicketStub,ZipfileInfo]
846
+ """
847
+
848
+ all_params = ['analysis_id','file_name','info','member','view','version','hash','range','x_accept_feature',] # noqa: E501
849
+ all_params.append('async_')
850
+ all_params.append('_return_http_data_only')
851
+ all_params.append('_preload_content')
852
+ all_params.append('_request_timeout')
853
+ all_params.append('_request_out')
854
+
855
+ params = locals()
856
+ for key, val in six.iteritems(params['kwargs']):
857
+ if key not in all_params:
858
+ raise TypeError(
859
+ "Got an unexpected keyword argument '%s'"
860
+ " to method download_file_from_analysis" % key
861
+ )
862
+ params[key] = val
863
+ del params['kwargs']
864
+ # verify the required parameter 'analysis_id' is set
865
+ if ('analysis_id' not in params or
866
+ params['analysis_id'] is None):
867
+ raise ValueError("Missing the required parameter `analysis_id` when calling `download_file_from_analysis`") # noqa: E501
868
+ # verify the required parameter 'file_name' is set
869
+ if ('file_name' not in params or
870
+ params['file_name'] is None):
871
+ raise ValueError("Missing the required parameter `file_name` when calling `download_file_from_analysis`") # noqa: E501
872
+ check_filename_params(params)
873
+
874
+ collection_formats = {}
875
+
876
+ path_params = {}
877
+ if 'analysis_id' in params:
878
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
879
+ if 'file_name' in params:
880
+ path_params['file_name'] = params['file_name'] # noqa: E501
881
+
882
+ query_params = []
883
+ if 'info' in params:
884
+ query_params.append(('info', params['info'])) # noqa: E501
885
+ if 'member' in params:
886
+ query_params.append(('member', params['member'])) # noqa: E501
887
+ if 'view' in params:
888
+ query_params.append(('view', params['view'])) # noqa: E501
889
+ if 'version' in params:
890
+ query_params.append(('version', params['version'])) # noqa: E501
891
+ if 'hash' in params:
892
+ query_params.append(('hash', params['hash'])) # noqa: E501
893
+
894
+ header_params = {}
895
+ if 'range' in params:
896
+ header_params['range'] = params['range'] # noqa: E501
897
+ if 'x_accept_feature' in params:
898
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
899
+ collection_formats['x-accept-feature'] = '' # noqa: E501
900
+
901
+ form_params = []
902
+ local_var_files = {}
903
+
904
+ body_params = None
905
+ # HTTP header `Accept`
906
+ header_params['Accept'] = self.api_client.select_header_accept(
907
+ ['application/octet-stream']) # noqa: E501
908
+
909
+ # Authentication setting
910
+ auth_settings = ['ApiKey'] # noqa: E501
911
+
912
+ return self.api_client.call_api(
913
+ '/analyses/{analysis_id}/files/{file_name}', 'GET',
914
+ path_params,
915
+ query_params,
916
+ header_params,
917
+ body=body_params,
918
+ post_params=form_params,
919
+ files=local_var_files,
920
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
921
+ auth_settings=auth_settings,
922
+ async_=params.get('async_'),
923
+ _return_http_data_only=params.get('_return_http_data_only'),
924
+ _preload_content=params.get('_preload_content', True),
925
+ _request_timeout=params.get('_request_timeout'),
926
+ _request_out=params.get('_request_out'),
927
+ collection_formats=collection_formats)
928
+
929
+ def get_analysis_file_zip_info(self, analysis_id, file_name, **kwargs): # noqa: E501
930
+ """Retrieve the zip info of a child file by name.
931
+
932
+ Does not work on files whose names contain a forward slash.
933
+ This method makes a synchronous HTTP request by default.
934
+
935
+ :param str analysis_id: 24-character hex ID (required)
936
+ :param str file_name: output file name (required)
937
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
938
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
939
+ :param str member: The filename of a zipfile member to download rather than the entire file
940
+ :param bool view: If true, the proper \"Content-Type\" header based on the file's mimetype is set on response If false, the \"Content-Type\" header is set to \"application/octet-stream\"
941
+ :param int version: version of the file to download
942
+ :param str hash: file hash for comparison
943
+ :param str range: byte ranges to return
944
+ :param list[str] x_accept_feature: redirect header
945
+ :param bool async_: Perform the request asynchronously
946
+ :return: FileZipInfo
947
+ """
948
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
949
+ kwargs['_return_http_data_only'] = True
950
+
951
+ if kwargs.get('async_'):
952
+ return self.get_analysis_file_zip_info_with_http_info(analysis_id, file_name, **kwargs) # noqa: E501
953
+ else:
954
+ (data) = self.get_analysis_file_zip_info_with_http_info(analysis_id, file_name, **kwargs) # noqa: E501
955
+ if (
956
+ data
957
+ and hasattr(data, 'return_value')
958
+ and not ignore_simplified_return_value
959
+ ):
960
+ return data.return_value()
961
+ return data
962
+
963
+
964
+ def get_analysis_file_zip_info_with_http_info(self, analysis_id, file_name, **kwargs): # noqa: E501
965
+ """Retrieve the zip info of a child file by name.
966
+
967
+ Does not work on files whose names contain a forward slash.
968
+ This method makes a synchronous HTTP request by default.
969
+
970
+ :param str analysis_id: 24-character hex ID (required)
971
+ :param str file_name: output file name (required)
972
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
973
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
974
+ :param str member: The filename of a zipfile member to download rather than the entire file
975
+ :param bool view: If true, the proper \"Content-Type\" header based on the file's mimetype is set on response If false, the \"Content-Type\" header is set to \"application/octet-stream\"
976
+ :param int version: version of the file to download
977
+ :param str hash: file hash for comparison
978
+ :param str range: byte ranges to return
979
+ :param list[str] x_accept_feature: redirect header
980
+ :param bool async_: Perform the request asynchronously
981
+ :return: FileZipInfo
982
+ """
983
+
984
+ all_params = ['analysis_id','file_name','ticket','info','member','view','version','hash','range','x_accept_feature',] # noqa: E501
985
+ all_params.append('async_')
986
+ all_params.append('_return_http_data_only')
987
+ all_params.append('_preload_content')
988
+ all_params.append('_request_timeout')
989
+ all_params.append('_request_out')
990
+
991
+ params = locals()
992
+ for key, val in six.iteritems(params['kwargs']):
993
+ if key not in all_params:
994
+ raise TypeError(
995
+ "Got an unexpected keyword argument '%s'"
996
+ " to method get_analysis_file_zip_info" % key
997
+ )
998
+ params[key] = val
999
+ del params['kwargs']
1000
+ # verify the required parameter 'analysis_id' is set
1001
+ if ('analysis_id' not in params or
1002
+ params['analysis_id'] is None):
1003
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis_file_zip_info`") # noqa: E501
1004
+ # verify the required parameter 'file_name' is set
1005
+ if ('file_name' not in params or
1006
+ params['file_name'] is None):
1007
+ raise ValueError("Missing the required parameter `file_name` when calling `get_analysis_file_zip_info`") # noqa: E501
1008
+ check_filename_params(params)
1009
+
1010
+ collection_formats = {}
1011
+
1012
+ path_params = {}
1013
+ if 'analysis_id' in params:
1014
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1015
+ if 'file_name' in params:
1016
+ path_params['file_name'] = params['file_name'] # noqa: E501
1017
+
1018
+ query_params = []
1019
+ if 'ticket' in params:
1020
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1021
+ if 'info' in params:
1022
+ query_params.append(('info', params['info'])) # noqa: E501
1023
+ else:
1024
+ query_params.append(('info', 'true'))
1025
+ if 'member' in params:
1026
+ query_params.append(('member', params['member'])) # noqa: E501
1027
+ if 'view' in params:
1028
+ query_params.append(('view', params['view'])) # noqa: E501
1029
+ if 'version' in params:
1030
+ query_params.append(('version', params['version'])) # noqa: E501
1031
+ if 'hash' in params:
1032
+ query_params.append(('hash', params['hash'])) # noqa: E501
1033
+
1034
+ header_params = {}
1035
+ if 'range' in params:
1036
+ header_params['range'] = params['range'] # noqa: E501
1037
+ if 'x_accept_feature' in params:
1038
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1039
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1040
+
1041
+ form_params = []
1042
+ local_var_files = {}
1043
+
1044
+ body_params = None
1045
+ # HTTP header `Accept`
1046
+ header_params['Accept'] = self.api_client.select_header_accept(
1047
+ ['application/json']) # noqa: E501
1048
+
1049
+ # Authentication setting
1050
+ auth_settings = ['ApiKey'] # noqa: E501
1051
+
1052
+ return self.api_client.call_api(
1053
+ '/analyses/{analysis_id}/files/{file_name}', 'GET',
1054
+ path_params,
1055
+ query_params,
1056
+ header_params,
1057
+ body=body_params,
1058
+ post_params=form_params,
1059
+ files=local_var_files,
1060
+ response_type='FileZipInfo', # noqa: E501
1061
+ auth_settings=auth_settings,
1062
+ async_=params.get('async_'),
1063
+ _return_http_data_only=params.get('_return_http_data_only'),
1064
+ _preload_content=params.get('_preload_content', True),
1065
+ _request_timeout=params.get('_request_timeout'),
1066
+ _request_out=params.get('_request_out'),
1067
+ collection_formats=collection_formats)
1068
+
1069
+ def get_analysis_download_ticket(self, analysis_id, file_name, **kwargs): # noqa: E501
1070
+ """Get a signed URL to download a named child file.
1071
+
1072
+ This method makes a synchronous HTTP request by default.
1073
+
1074
+ :param str analysis_id: 24-character hex ID (required)
1075
+ :param str file_name: output file name (required)
1076
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
1077
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1078
+ :param str member: The filename of a zipfile member to download rather than the entire file
1079
+ :param bool view: If true, the proper \"Content-Type\" header based on the file's mimetype is set on response If false, the \"Content-Type\" header is set to \"application/octet-stream\"
1080
+ :param int version: version of the file to download
1081
+ :param str hash: file hash for comparison
1082
+ :param str range: byte ranges to return
1083
+ :param list[str] x_accept_feature: redirect header
1084
+ :param bool async_: Perform the request asynchronously
1085
+ :return: union[DownloadTicketStub,ZipfileInfo]
1086
+ """
1087
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1088
+ kwargs['_return_http_data_only'] = True
1089
+
1090
+ if kwargs.get('async_'):
1091
+ return self.get_analysis_download_ticket_with_http_info(analysis_id, file_name, **kwargs) # noqa: E501
1092
+ else:
1093
+ (data) = self.get_analysis_download_ticket_with_http_info(analysis_id, file_name, **kwargs) # noqa: E501
1094
+ if (
1095
+ data
1096
+ and hasattr(data, 'return_value')
1097
+ and not ignore_simplified_return_value
1098
+ ):
1099
+ return data.return_value()
1100
+ return data
1101
+
1102
+
1103
+ def get_analysis_download_ticket_with_http_info(self, analysis_id, file_name, **kwargs): # noqa: E501
1104
+ """Get a signed URL to download a named child file.
1105
+
1106
+ This method makes a synchronous HTTP request by default.
1107
+
1108
+ :param str analysis_id: 24-character hex ID (required)
1109
+ :param str file_name: output file name (required)
1110
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
1111
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1112
+ :param str member: The filename of a zipfile member to download rather than the entire file
1113
+ :param bool view: If true, the proper \"Content-Type\" header based on the file's mimetype is set on response If false, the \"Content-Type\" header is set to \"application/octet-stream\"
1114
+ :param int version: version of the file to download
1115
+ :param str hash: file hash for comparison
1116
+ :param str range: byte ranges to return
1117
+ :param list[str] x_accept_feature: redirect header
1118
+ :param bool async_: Perform the request asynchronously
1119
+ :return: union[DownloadTicketStub,ZipfileInfo]
1120
+ """
1121
+
1122
+ all_params = ['analysis_id','file_name','ticket','info','member','view','version','hash','range','x_accept_feature',] # noqa: E501
1123
+ all_params.append('async_')
1124
+ all_params.append('_return_http_data_only')
1125
+ all_params.append('_preload_content')
1126
+ all_params.append('_request_timeout')
1127
+ all_params.append('_request_out')
1128
+
1129
+ params = locals()
1130
+ for key, val in six.iteritems(params['kwargs']):
1131
+ if key not in all_params:
1132
+ raise TypeError(
1133
+ "Got an unexpected keyword argument '%s'"
1134
+ " to method get_analysis_download_ticket" % key
1135
+ )
1136
+ params[key] = val
1137
+ del params['kwargs']
1138
+ # verify the required parameter 'analysis_id' is set
1139
+ if ('analysis_id' not in params or
1140
+ params['analysis_id'] is None):
1141
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis_download_ticket`") # noqa: E501
1142
+ # verify the required parameter 'file_name' is set
1143
+ if ('file_name' not in params or
1144
+ params['file_name'] is None):
1145
+ raise ValueError("Missing the required parameter `file_name` when calling `get_analysis_download_ticket`") # noqa: E501
1146
+ check_filename_params(params)
1147
+
1148
+ collection_formats = {}
1149
+
1150
+ path_params = {}
1151
+ if 'analysis_id' in params:
1152
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1153
+ if 'file_name' in params:
1154
+ path_params['file_name'] = params['file_name'] # noqa: E501
1155
+
1156
+ query_params = []
1157
+ if 'ticket' in params:
1158
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1159
+ if 'info' in params:
1160
+ query_params.append(('info', params['info'])) # noqa: E501
1161
+ if 'member' in params:
1162
+ query_params.append(('member', params['member'])) # noqa: E501
1163
+ if 'view' in params:
1164
+ query_params.append(('view', params['view'])) # noqa: E501
1165
+ if 'version' in params:
1166
+ query_params.append(('version', params['version'])) # noqa: E501
1167
+ if 'hash' in params:
1168
+ query_params.append(('hash', params['hash'])) # noqa: E501
1169
+
1170
+ header_params = {}
1171
+ if 'range' in params:
1172
+ header_params['range'] = params['range'] # noqa: E501
1173
+ if 'x_accept_feature' in params:
1174
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1175
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1176
+
1177
+ form_params = []
1178
+ local_var_files = {}
1179
+
1180
+ body_params = None
1181
+ # HTTP header `Accept`
1182
+ header_params['Accept'] = self.api_client.select_header_accept(
1183
+ ['application/json']) # noqa: E501
1184
+
1185
+ # Authentication setting
1186
+ auth_settings = ['ApiKey'] # noqa: E501
1187
+
1188
+ return self.api_client.call_api(
1189
+ '/analyses/{analysis_id}/files/{file_name}', 'GET',
1190
+ path_params,
1191
+ query_params,
1192
+ header_params,
1193
+ body=body_params,
1194
+ post_params=form_params,
1195
+ files=local_var_files,
1196
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1197
+ auth_settings=auth_settings,
1198
+ async_=params.get('async_'),
1199
+ _return_http_data_only=params.get('_return_http_data_only'),
1200
+ _preload_content=params.get('_preload_content', True),
1201
+ _request_timeout=params.get('_request_timeout'),
1202
+ _request_out=params.get('_request_out'),
1203
+ collection_formats=collection_formats)
1204
+
1205
+ def download_input_from_analysis(self, analysis_id, filename, dest_file, **kwargs): # noqa: E501
1206
+ """Download analysis inputs with filter.
1207
+
1208
+ If \"ticket\" query param is included and not empty, download inputs. If \"ticket\" query param is included and empty, create a ticket for matching inputs in the analysis. If no \"ticket\" query param is included, inputs will be downloaded directly.
1209
+ This method makes a synchronous HTTP request by default.
1210
+
1211
+ :param str analysis_id: 24-character hex ID (required)
1212
+ :param str filename: input filename (required)
1213
+ :param bool info: get file info only
1214
+ :param str member: get zipfile member
1215
+ :param bool view: feature flag for view/download
1216
+ :param str range: byte ranges to return
1217
+ :param list[str] x_accept_feature: redirect header
1218
+ :param str dest_file: Destination file path
1219
+ :param bool async_: Perform the request asynchronously
1220
+ :return: union[DownloadTicketStub,ZipfileInfo]
1221
+ """
1222
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1223
+ kwargs['_return_http_data_only'] = True
1224
+
1225
+ kwargs['_preload_content'] = False
1226
+ # Stream response to file
1227
+ with open(dest_file, 'wb') as out_file:
1228
+ (resp) = self.download_input_from_analysis_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1229
+ if resp:
1230
+ try:
1231
+ for chunk in resp.iter_content(chunk_size=65536):
1232
+ out_file.write(chunk)
1233
+ finally:
1234
+ resp.close()
1235
+
1236
+
1237
+ def download_input_from_analysis_with_http_info(self, analysis_id, filename, **kwargs): # noqa: E501
1238
+ """Download analysis inputs with filter.
1239
+
1240
+ If \"ticket\" query param is included and not empty, download inputs. If \"ticket\" query param is included and empty, create a ticket for matching inputs in the analysis. If no \"ticket\" query param is included, inputs will be downloaded directly.
1241
+ This method makes a synchronous HTTP request by default.
1242
+
1243
+ :param str analysis_id: 24-character hex ID (required)
1244
+ :param str filename: input filename (required)
1245
+ :param bool info: get file info only
1246
+ :param str member: get zipfile member
1247
+ :param bool view: feature flag for view/download
1248
+ :param str range: byte ranges to return
1249
+ :param list[str] x_accept_feature: redirect header
1250
+ :param bool async_: Perform the request asynchronously
1251
+ :return: union[DownloadTicketStub,ZipfileInfo]
1252
+ """
1253
+
1254
+ all_params = ['analysis_id','filename','info','member','view','range','x_accept_feature',] # noqa: E501
1255
+ all_params.append('async_')
1256
+ all_params.append('_return_http_data_only')
1257
+ all_params.append('_preload_content')
1258
+ all_params.append('_request_timeout')
1259
+ all_params.append('_request_out')
1260
+
1261
+ params = locals()
1262
+ for key, val in six.iteritems(params['kwargs']):
1263
+ if key not in all_params:
1264
+ raise TypeError(
1265
+ "Got an unexpected keyword argument '%s'"
1266
+ " to method download_input_from_analysis" % key
1267
+ )
1268
+ params[key] = val
1269
+ del params['kwargs']
1270
+ # verify the required parameter 'analysis_id' is set
1271
+ if ('analysis_id' not in params or
1272
+ params['analysis_id'] is None):
1273
+ raise ValueError("Missing the required parameter `analysis_id` when calling `download_input_from_analysis`") # noqa: E501
1274
+ # verify the required parameter 'filename' is set
1275
+ if ('filename' not in params or
1276
+ params['filename'] is None):
1277
+ raise ValueError("Missing the required parameter `filename` when calling `download_input_from_analysis`") # noqa: E501
1278
+ check_filename_params(params)
1279
+
1280
+ collection_formats = {}
1281
+
1282
+ path_params = {}
1283
+ if 'analysis_id' in params:
1284
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1285
+ if 'filename' in params:
1286
+ path_params['filename'] = params['filename'] # noqa: E501
1287
+
1288
+ query_params = []
1289
+ if 'info' in params:
1290
+ query_params.append(('info', params['info'])) # noqa: E501
1291
+ if 'member' in params:
1292
+ query_params.append(('member', params['member'])) # noqa: E501
1293
+ if 'view' in params:
1294
+ query_params.append(('view', params['view'])) # noqa: E501
1295
+
1296
+ header_params = {}
1297
+ if 'range' in params:
1298
+ header_params['range'] = params['range'] # noqa: E501
1299
+ if 'x_accept_feature' in params:
1300
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1301
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1302
+
1303
+ form_params = []
1304
+ local_var_files = {}
1305
+
1306
+ body_params = None
1307
+ # HTTP header `Accept`
1308
+ header_params['Accept'] = self.api_client.select_header_accept(
1309
+ ['application/octet-stream']) # noqa: E501
1310
+
1311
+ # Authentication setting
1312
+ auth_settings = ['ApiKey'] # noqa: E501
1313
+
1314
+ return self.api_client.call_api(
1315
+ '/analyses/{analysis_id}/inputs/{filename}', 'GET',
1316
+ path_params,
1317
+ query_params,
1318
+ header_params,
1319
+ body=body_params,
1320
+ post_params=form_params,
1321
+ files=local_var_files,
1322
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1323
+ auth_settings=auth_settings,
1324
+ async_=params.get('async_'),
1325
+ _return_http_data_only=params.get('_return_http_data_only'),
1326
+ _preload_content=params.get('_preload_content', True),
1327
+ _request_timeout=params.get('_request_timeout'),
1328
+ _request_out=params.get('_request_out'),
1329
+ collection_formats=collection_formats)
1330
+
1331
+ def get_analysis_input_zip_info(self, analysis_id, filename, **kwargs): # noqa: E501
1332
+ """Retrieve the zip info of a child file by name.
1333
+
1334
+ Does not work on files whose names contain a forward slash.
1335
+ This method makes a synchronous HTTP request by default.
1336
+
1337
+ :param str analysis_id: 24-character hex ID (required)
1338
+ :param str filename: input filename (required)
1339
+ :param str ticket: 24-char hex ticket id
1340
+ :param bool info: get file info only
1341
+ :param str member: get zipfile member
1342
+ :param bool view: feature flag for view/download
1343
+ :param str range: byte ranges to return
1344
+ :param list[str] x_accept_feature: redirect header
1345
+ :param bool async_: Perform the request asynchronously
1346
+ :return: FileZipInfo
1347
+ """
1348
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1349
+ kwargs['_return_http_data_only'] = True
1350
+
1351
+ if kwargs.get('async_'):
1352
+ return self.get_analysis_input_zip_info_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1353
+ else:
1354
+ (data) = self.get_analysis_input_zip_info_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1355
+ if (
1356
+ data
1357
+ and hasattr(data, 'return_value')
1358
+ and not ignore_simplified_return_value
1359
+ ):
1360
+ return data.return_value()
1361
+ return data
1362
+
1363
+
1364
+ def get_analysis_input_zip_info_with_http_info(self, analysis_id, filename, **kwargs): # noqa: E501
1365
+ """Retrieve the zip info of a child file by name.
1366
+
1367
+ Does not work on files whose names contain a forward slash.
1368
+ This method makes a synchronous HTTP request by default.
1369
+
1370
+ :param str analysis_id: 24-character hex ID (required)
1371
+ :param str filename: input filename (required)
1372
+ :param str ticket: 24-char hex ticket id
1373
+ :param bool info: get file info only
1374
+ :param str member: get zipfile member
1375
+ :param bool view: feature flag for view/download
1376
+ :param str range: byte ranges to return
1377
+ :param list[str] x_accept_feature: redirect header
1378
+ :param bool async_: Perform the request asynchronously
1379
+ :return: FileZipInfo
1380
+ """
1381
+
1382
+ all_params = ['analysis_id','filename','ticket','info','member','view','range','x_accept_feature',] # noqa: E501
1383
+ all_params.append('async_')
1384
+ all_params.append('_return_http_data_only')
1385
+ all_params.append('_preload_content')
1386
+ all_params.append('_request_timeout')
1387
+ all_params.append('_request_out')
1388
+
1389
+ params = locals()
1390
+ for key, val in six.iteritems(params['kwargs']):
1391
+ if key not in all_params:
1392
+ raise TypeError(
1393
+ "Got an unexpected keyword argument '%s'"
1394
+ " to method get_analysis_input_zip_info" % key
1395
+ )
1396
+ params[key] = val
1397
+ del params['kwargs']
1398
+ # verify the required parameter 'analysis_id' is set
1399
+ if ('analysis_id' not in params or
1400
+ params['analysis_id'] is None):
1401
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis_input_zip_info`") # noqa: E501
1402
+ # verify the required parameter 'filename' is set
1403
+ if ('filename' not in params or
1404
+ params['filename'] is None):
1405
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_input_zip_info`") # noqa: E501
1406
+ check_filename_params(params)
1407
+
1408
+ collection_formats = {}
1409
+
1410
+ path_params = {}
1411
+ if 'analysis_id' in params:
1412
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1413
+ if 'filename' in params:
1414
+ path_params['filename'] = params['filename'] # noqa: E501
1415
+
1416
+ query_params = []
1417
+ if 'ticket' in params:
1418
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1419
+ if 'info' in params:
1420
+ query_params.append(('info', params['info'])) # noqa: E501
1421
+ else:
1422
+ query_params.append(('info', 'true'))
1423
+ if 'member' in params:
1424
+ query_params.append(('member', params['member'])) # noqa: E501
1425
+ if 'view' in params:
1426
+ query_params.append(('view', params['view'])) # noqa: E501
1427
+
1428
+ header_params = {}
1429
+ if 'range' in params:
1430
+ header_params['range'] = params['range'] # noqa: E501
1431
+ if 'x_accept_feature' in params:
1432
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1433
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1434
+
1435
+ form_params = []
1436
+ local_var_files = {}
1437
+
1438
+ body_params = None
1439
+ # HTTP header `Accept`
1440
+ header_params['Accept'] = self.api_client.select_header_accept(
1441
+ ['application/json']) # noqa: E501
1442
+
1443
+ # Authentication setting
1444
+ auth_settings = ['ApiKey'] # noqa: E501
1445
+
1446
+ return self.api_client.call_api(
1447
+ '/analyses/{analysis_id}/inputs/{filename}', 'GET',
1448
+ path_params,
1449
+ query_params,
1450
+ header_params,
1451
+ body=body_params,
1452
+ post_params=form_params,
1453
+ files=local_var_files,
1454
+ response_type='FileZipInfo', # noqa: E501
1455
+ auth_settings=auth_settings,
1456
+ async_=params.get('async_'),
1457
+ _return_http_data_only=params.get('_return_http_data_only'),
1458
+ _preload_content=params.get('_preload_content', True),
1459
+ _request_timeout=params.get('_request_timeout'),
1460
+ _request_out=params.get('_request_out'),
1461
+ collection_formats=collection_formats)
1462
+
1463
+ def get_analysis_input_download_ticket(self, analysis_id, filename, **kwargs): # noqa: E501
1464
+ """Get a signed URL to download a named child file.
1465
+
1466
+ This method makes a synchronous HTTP request by default.
1467
+
1468
+ :param str analysis_id: 24-character hex ID (required)
1469
+ :param str filename: input filename (required)
1470
+ :param str ticket: 24-char hex ticket id
1471
+ :param bool info: get file info only
1472
+ :param str member: get zipfile member
1473
+ :param bool view: feature flag for view/download
1474
+ :param str range: byte ranges to return
1475
+ :param list[str] x_accept_feature: redirect header
1476
+ :param bool async_: Perform the request asynchronously
1477
+ :return: union[DownloadTicketStub,ZipfileInfo]
1478
+ """
1479
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1480
+ kwargs['_return_http_data_only'] = True
1481
+
1482
+ if kwargs.get('async_'):
1483
+ return self.get_analysis_input_download_ticket_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1484
+ else:
1485
+ (data) = self.get_analysis_input_download_ticket_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1486
+ if (
1487
+ data
1488
+ and hasattr(data, 'return_value')
1489
+ and not ignore_simplified_return_value
1490
+ ):
1491
+ return data.return_value()
1492
+ return data
1493
+
1494
+
1495
+ def get_analysis_input_download_ticket_with_http_info(self, analysis_id, filename, **kwargs): # noqa: E501
1496
+ """Get a signed URL to download a named child file.
1497
+
1498
+ This method makes a synchronous HTTP request by default.
1499
+
1500
+ :param str analysis_id: 24-character hex ID (required)
1501
+ :param str filename: input filename (required)
1502
+ :param str ticket: 24-char hex ticket id
1503
+ :param bool info: get file info only
1504
+ :param str member: get zipfile member
1505
+ :param bool view: feature flag for view/download
1506
+ :param str range: byte ranges to return
1507
+ :param list[str] x_accept_feature: redirect header
1508
+ :param bool async_: Perform the request asynchronously
1509
+ :return: union[DownloadTicketStub,ZipfileInfo]
1510
+ """
1511
+
1512
+ all_params = ['analysis_id','filename','ticket','info','member','view','range','x_accept_feature',] # noqa: E501
1513
+ all_params.append('async_')
1514
+ all_params.append('_return_http_data_only')
1515
+ all_params.append('_preload_content')
1516
+ all_params.append('_request_timeout')
1517
+ all_params.append('_request_out')
1518
+
1519
+ params = locals()
1520
+ for key, val in six.iteritems(params['kwargs']):
1521
+ if key not in all_params:
1522
+ raise TypeError(
1523
+ "Got an unexpected keyword argument '%s'"
1524
+ " to method get_analysis_input_download_ticket" % key
1525
+ )
1526
+ params[key] = val
1527
+ del params['kwargs']
1528
+ # verify the required parameter 'analysis_id' is set
1529
+ if ('analysis_id' not in params or
1530
+ params['analysis_id'] is None):
1531
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis_input_download_ticket`") # noqa: E501
1532
+ # verify the required parameter 'filename' is set
1533
+ if ('filename' not in params or
1534
+ params['filename'] is None):
1535
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_input_download_ticket`") # noqa: E501
1536
+ check_filename_params(params)
1537
+
1538
+ collection_formats = {}
1539
+
1540
+ path_params = {}
1541
+ if 'analysis_id' in params:
1542
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1543
+ if 'filename' in params:
1544
+ path_params['filename'] = params['filename'] # noqa: E501
1545
+
1546
+ query_params = []
1547
+ if 'ticket' in params:
1548
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1549
+ if 'info' in params:
1550
+ query_params.append(('info', params['info'])) # noqa: E501
1551
+ if 'member' in params:
1552
+ query_params.append(('member', params['member'])) # noqa: E501
1553
+ if 'view' in params:
1554
+ query_params.append(('view', params['view'])) # noqa: E501
1555
+
1556
+ header_params = {}
1557
+ if 'range' in params:
1558
+ header_params['range'] = params['range'] # noqa: E501
1559
+ if 'x_accept_feature' in params:
1560
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1561
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1562
+
1563
+ form_params = []
1564
+ local_var_files = {}
1565
+
1566
+ body_params = None
1567
+ # HTTP header `Accept`
1568
+ header_params['Accept'] = self.api_client.select_header_accept(
1569
+ ['application/json']) # noqa: E501
1570
+
1571
+ # Authentication setting
1572
+ auth_settings = ['ApiKey'] # noqa: E501
1573
+
1574
+ return self.api_client.call_api(
1575
+ '/analyses/{analysis_id}/inputs/{filename}', 'GET',
1576
+ path_params,
1577
+ query_params,
1578
+ header_params,
1579
+ body=body_params,
1580
+ post_params=form_params,
1581
+ files=local_var_files,
1582
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1583
+ auth_settings=auth_settings,
1584
+ async_=params.get('async_'),
1585
+ _return_http_data_only=params.get('_return_http_data_only'),
1586
+ _preload_content=params.get('_preload_content', True),
1587
+ _request_timeout=params.get('_request_timeout'),
1588
+ _request_out=params.get('_request_out'),
1589
+ collection_formats=collection_formats)
1590
+
1591
+ def download_output_from_analysis(self, analysis_id, filename, dest_file, **kwargs): # noqa: E501
1592
+ """Download output file from analysis
1593
+
1594
+ Download output file from analysis
1595
+ This method makes a synchronous HTTP request by default.
1596
+
1597
+ :param str analysis_id: Container ID (required)
1598
+ :param str filename: output file name (required)
1599
+ :param bool info: get file info only
1600
+ :param str member: get zipfile member
1601
+ :param bool view: feature flag for view/download
1602
+ :param str range: byte ranges to return
1603
+ :param list[str] x_accept_feature: redirect header
1604
+ :param str dest_file: Destination file path
1605
+ :param bool async_: Perform the request asynchronously
1606
+ :return: union[DownloadTicketStub,ZipfileInfo]
1607
+ """
1608
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1609
+ kwargs['_return_http_data_only'] = True
1610
+
1611
+ kwargs['_preload_content'] = False
1612
+ # Stream response to file
1613
+ with open(dest_file, 'wb') as out_file:
1614
+ (resp) = self.download_output_from_analysis_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1615
+ if resp:
1616
+ try:
1617
+ for chunk in resp.iter_content(chunk_size=65536):
1618
+ out_file.write(chunk)
1619
+ finally:
1620
+ resp.close()
1621
+
1622
+
1623
+ def download_output_from_analysis_with_http_info(self, analysis_id, filename, **kwargs): # noqa: E501
1624
+ """Download output file from analysis
1625
+
1626
+ Download output file from analysis
1627
+ This method makes a synchronous HTTP request by default.
1628
+
1629
+ :param str analysis_id: Container ID (required)
1630
+ :param str filename: output file name (required)
1631
+ :param bool info: get file info only
1632
+ :param str member: get zipfile member
1633
+ :param bool view: feature flag for view/download
1634
+ :param str range: byte ranges to return
1635
+ :param list[str] x_accept_feature: redirect header
1636
+ :param bool async_: Perform the request asynchronously
1637
+ :return: union[DownloadTicketStub,ZipfileInfo]
1638
+ """
1639
+
1640
+ all_params = ['analysis_id','filename','info','member','view','range','x_accept_feature',] # noqa: E501
1641
+ all_params.append('async_')
1642
+ all_params.append('_return_http_data_only')
1643
+ all_params.append('_preload_content')
1644
+ all_params.append('_request_timeout')
1645
+ all_params.append('_request_out')
1646
+
1647
+ params = locals()
1648
+ for key, val in six.iteritems(params['kwargs']):
1649
+ if key not in all_params:
1650
+ raise TypeError(
1651
+ "Got an unexpected keyword argument '%s'"
1652
+ " to method download_output_from_analysis" % key
1653
+ )
1654
+ params[key] = val
1655
+ del params['kwargs']
1656
+ # verify the required parameter 'analysis_id' is set
1657
+ if ('analysis_id' not in params or
1658
+ params['analysis_id'] is None):
1659
+ raise ValueError("Missing the required parameter `analysis_id` when calling `download_output_from_analysis`") # noqa: E501
1660
+ # verify the required parameter 'filename' is set
1661
+ if ('filename' not in params or
1662
+ params['filename'] is None):
1663
+ raise ValueError("Missing the required parameter `filename` when calling `download_output_from_analysis`") # noqa: E501
1664
+ check_filename_params(params)
1665
+
1666
+ collection_formats = {}
1667
+
1668
+ path_params = {}
1669
+ if 'analysis_id' in params:
1670
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1671
+ if 'filename' in params:
1672
+ path_params['filename'] = params['filename'] # noqa: E501
1673
+
1674
+ query_params = []
1675
+ if 'info' in params:
1676
+ query_params.append(('info', params['info'])) # noqa: E501
1677
+ if 'member' in params:
1678
+ query_params.append(('member', params['member'])) # noqa: E501
1679
+ if 'view' in params:
1680
+ query_params.append(('view', params['view'])) # noqa: E501
1681
+
1682
+ header_params = {}
1683
+ if 'range' in params:
1684
+ header_params['range'] = params['range'] # noqa: E501
1685
+ if 'x_accept_feature' in params:
1686
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1687
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1688
+
1689
+ form_params = []
1690
+ local_var_files = {}
1691
+
1692
+ body_params = None
1693
+ # HTTP header `Accept`
1694
+ header_params['Accept'] = self.api_client.select_header_accept(
1695
+ ['application/octet-stream']) # noqa: E501
1696
+
1697
+ # Authentication setting
1698
+ auth_settings = ['ApiKey'] # noqa: E501
1699
+
1700
+ return self.api_client.call_api(
1701
+ '/analyses/{analysis_id}/files/{filename}', 'GET',
1702
+ path_params,
1703
+ query_params,
1704
+ header_params,
1705
+ body=body_params,
1706
+ post_params=form_params,
1707
+ files=local_var_files,
1708
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1709
+ auth_settings=auth_settings,
1710
+ async_=params.get('async_'),
1711
+ _return_http_data_only=params.get('_return_http_data_only'),
1712
+ _preload_content=params.get('_preload_content', True),
1713
+ _request_timeout=params.get('_request_timeout'),
1714
+ _request_out=params.get('_request_out'),
1715
+ collection_formats=collection_formats)
1716
+
1717
+ def get_analysis_output_zip_info(self, analysis_id, filename, **kwargs): # noqa: E501
1718
+ """Retrieve the zip info of a child file by name.
1719
+
1720
+ Does not work on files whose names contain a forward slash.
1721
+ This method makes a synchronous HTTP request by default.
1722
+
1723
+ :param str analysis_id: Container ID (required)
1724
+ :param str filename: output file name (required)
1725
+ :param str ticket: 24-char hex ticket id
1726
+ :param bool info: get file info only
1727
+ :param str member: get zipfile member
1728
+ :param bool view: feature flag for view/download
1729
+ :param str range: byte ranges to return
1730
+ :param list[str] x_accept_feature: redirect header
1731
+ :param bool async_: Perform the request asynchronously
1732
+ :return: FileZipInfo
1733
+ """
1734
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1735
+ kwargs['_return_http_data_only'] = True
1736
+
1737
+ if kwargs.get('async_'):
1738
+ return self.get_analysis_output_zip_info_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1739
+ else:
1740
+ (data) = self.get_analysis_output_zip_info_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1741
+ if (
1742
+ data
1743
+ and hasattr(data, 'return_value')
1744
+ and not ignore_simplified_return_value
1745
+ ):
1746
+ return data.return_value()
1747
+ return data
1748
+
1749
+
1750
+ def get_analysis_output_zip_info_with_http_info(self, analysis_id, filename, **kwargs): # noqa: E501
1751
+ """Retrieve the zip info of a child file by name.
1752
+
1753
+ Does not work on files whose names contain a forward slash.
1754
+ This method makes a synchronous HTTP request by default.
1755
+
1756
+ :param str analysis_id: Container ID (required)
1757
+ :param str filename: output file name (required)
1758
+ :param str ticket: 24-char hex ticket id
1759
+ :param bool info: get file info only
1760
+ :param str member: get zipfile member
1761
+ :param bool view: feature flag for view/download
1762
+ :param str range: byte ranges to return
1763
+ :param list[str] x_accept_feature: redirect header
1764
+ :param bool async_: Perform the request asynchronously
1765
+ :return: FileZipInfo
1766
+ """
1767
+
1768
+ all_params = ['analysis_id','filename','ticket','info','member','view','range','x_accept_feature',] # noqa: E501
1769
+ all_params.append('async_')
1770
+ all_params.append('_return_http_data_only')
1771
+ all_params.append('_preload_content')
1772
+ all_params.append('_request_timeout')
1773
+ all_params.append('_request_out')
1774
+
1775
+ params = locals()
1776
+ for key, val in six.iteritems(params['kwargs']):
1777
+ if key not in all_params:
1778
+ raise TypeError(
1779
+ "Got an unexpected keyword argument '%s'"
1780
+ " to method get_analysis_output_zip_info" % key
1781
+ )
1782
+ params[key] = val
1783
+ del params['kwargs']
1784
+ # verify the required parameter 'analysis_id' is set
1785
+ if ('analysis_id' not in params or
1786
+ params['analysis_id'] is None):
1787
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis_output_zip_info`") # noqa: E501
1788
+ # verify the required parameter 'filename' is set
1789
+ if ('filename' not in params or
1790
+ params['filename'] is None):
1791
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_output_zip_info`") # noqa: E501
1792
+ check_filename_params(params)
1793
+
1794
+ collection_formats = {}
1795
+
1796
+ path_params = {}
1797
+ if 'analysis_id' in params:
1798
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1799
+ if 'filename' in params:
1800
+ path_params['filename'] = params['filename'] # noqa: E501
1801
+
1802
+ query_params = []
1803
+ if 'ticket' in params:
1804
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1805
+ if 'info' in params:
1806
+ query_params.append(('info', params['info'])) # noqa: E501
1807
+ else:
1808
+ query_params.append(('info', 'true'))
1809
+ if 'member' in params:
1810
+ query_params.append(('member', params['member'])) # noqa: E501
1811
+ if 'view' in params:
1812
+ query_params.append(('view', params['view'])) # noqa: E501
1813
+
1814
+ header_params = {}
1815
+ if 'range' in params:
1816
+ header_params['range'] = params['range'] # noqa: E501
1817
+ if 'x_accept_feature' in params:
1818
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1819
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1820
+
1821
+ form_params = []
1822
+ local_var_files = {}
1823
+
1824
+ body_params = None
1825
+ # HTTP header `Accept`
1826
+ header_params['Accept'] = self.api_client.select_header_accept(
1827
+ ['application/json']) # noqa: E501
1828
+
1829
+ # Authentication setting
1830
+ auth_settings = ['ApiKey'] # noqa: E501
1831
+
1832
+ return self.api_client.call_api(
1833
+ '/analyses/{analysis_id}/files/{filename}', 'GET',
1834
+ path_params,
1835
+ query_params,
1836
+ header_params,
1837
+ body=body_params,
1838
+ post_params=form_params,
1839
+ files=local_var_files,
1840
+ response_type='FileZipInfo', # noqa: E501
1841
+ auth_settings=auth_settings,
1842
+ async_=params.get('async_'),
1843
+ _return_http_data_only=params.get('_return_http_data_only'),
1844
+ _preload_content=params.get('_preload_content', True),
1845
+ _request_timeout=params.get('_request_timeout'),
1846
+ _request_out=params.get('_request_out'),
1847
+ collection_formats=collection_formats)
1848
+
1849
+ def get_analysis_output_download_ticket(self, analysis_id, filename, **kwargs): # noqa: E501
1850
+ """Get a signed URL to download a named child file.
1851
+
1852
+ This method makes a synchronous HTTP request by default.
1853
+
1854
+ :param str analysis_id: Container ID (required)
1855
+ :param str filename: output file name (required)
1856
+ :param str ticket: 24-char hex ticket id
1857
+ :param bool info: get file info only
1858
+ :param str member: get zipfile member
1859
+ :param bool view: feature flag for view/download
1860
+ :param str range: byte ranges to return
1861
+ :param list[str] x_accept_feature: redirect header
1862
+ :param bool async_: Perform the request asynchronously
1863
+ :return: union[DownloadTicketStub,ZipfileInfo]
1864
+ """
1865
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1866
+ kwargs['_return_http_data_only'] = True
1867
+
1868
+ if kwargs.get('async_'):
1869
+ return self.get_analysis_output_download_ticket_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1870
+ else:
1871
+ (data) = self.get_analysis_output_download_ticket_with_http_info(analysis_id, filename, **kwargs) # noqa: E501
1872
+ if (
1873
+ data
1874
+ and hasattr(data, 'return_value')
1875
+ and not ignore_simplified_return_value
1876
+ ):
1877
+ return data.return_value()
1878
+ return data
1879
+
1880
+
1881
+ def get_analysis_output_download_ticket_with_http_info(self, analysis_id, filename, **kwargs): # noqa: E501
1882
+ """Get a signed URL to download a named child file.
1883
+
1884
+ This method makes a synchronous HTTP request by default.
1885
+
1886
+ :param str analysis_id: Container ID (required)
1887
+ :param str filename: output file name (required)
1888
+ :param str ticket: 24-char hex ticket id
1889
+ :param bool info: get file info only
1890
+ :param str member: get zipfile member
1891
+ :param bool view: feature flag for view/download
1892
+ :param str range: byte ranges to return
1893
+ :param list[str] x_accept_feature: redirect header
1894
+ :param bool async_: Perform the request asynchronously
1895
+ :return: union[DownloadTicketStub,ZipfileInfo]
1896
+ """
1897
+
1898
+ all_params = ['analysis_id','filename','ticket','info','member','view','range','x_accept_feature',] # noqa: E501
1899
+ all_params.append('async_')
1900
+ all_params.append('_return_http_data_only')
1901
+ all_params.append('_preload_content')
1902
+ all_params.append('_request_timeout')
1903
+ all_params.append('_request_out')
1904
+
1905
+ params = locals()
1906
+ for key, val in six.iteritems(params['kwargs']):
1907
+ if key not in all_params:
1908
+ raise TypeError(
1909
+ "Got an unexpected keyword argument '%s'"
1910
+ " to method get_analysis_output_download_ticket" % key
1911
+ )
1912
+ params[key] = val
1913
+ del params['kwargs']
1914
+ # verify the required parameter 'analysis_id' is set
1915
+ if ('analysis_id' not in params or
1916
+ params['analysis_id'] is None):
1917
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis_output_download_ticket`") # noqa: E501
1918
+ # verify the required parameter 'filename' is set
1919
+ if ('filename' not in params or
1920
+ params['filename'] is None):
1921
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_output_download_ticket`") # noqa: E501
1922
+ check_filename_params(params)
1923
+
1924
+ collection_formats = {}
1925
+
1926
+ path_params = {}
1927
+ if 'analysis_id' in params:
1928
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
1929
+ if 'filename' in params:
1930
+ path_params['filename'] = params['filename'] # noqa: E501
1931
+
1932
+ query_params = []
1933
+ if 'ticket' in params:
1934
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1935
+ if 'info' in params:
1936
+ query_params.append(('info', params['info'])) # noqa: E501
1937
+ if 'member' in params:
1938
+ query_params.append(('member', params['member'])) # noqa: E501
1939
+ if 'view' in params:
1940
+ query_params.append(('view', params['view'])) # noqa: E501
1941
+
1942
+ header_params = {}
1943
+ if 'range' in params:
1944
+ header_params['range'] = params['range'] # noqa: E501
1945
+ if 'x_accept_feature' in params:
1946
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1947
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1948
+
1949
+ form_params = []
1950
+ local_var_files = {}
1951
+
1952
+ body_params = None
1953
+ # HTTP header `Accept`
1954
+ header_params['Accept'] = self.api_client.select_header_accept(
1955
+ ['application/json']) # noqa: E501
1956
+
1957
+ # Authentication setting
1958
+ auth_settings = ['ApiKey'] # noqa: E501
1959
+
1960
+ return self.api_client.call_api(
1961
+ '/analyses/{analysis_id}/files/{filename}', 'GET',
1962
+ path_params,
1963
+ query_params,
1964
+ header_params,
1965
+ body=body_params,
1966
+ post_params=form_params,
1967
+ files=local_var_files,
1968
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1969
+ auth_settings=auth_settings,
1970
+ async_=params.get('async_'),
1971
+ _return_http_data_only=params.get('_return_http_data_only'),
1972
+ _preload_content=params.get('_preload_content', True),
1973
+ _request_timeout=params.get('_request_timeout'),
1974
+ _request_out=params.get('_request_out'),
1975
+ collection_formats=collection_formats)
1976
+
1977
+ def get_all_analyses(self, **kwargs): # noqa: E501
1978
+ """Find all analyses
1979
+
1980
+ Returns a page of analyses Args: filter (t.Optional[str]): The filters to apply sort (t.List[Tuple[str,int]): Sorting, as a list of (str, int) tuples limit (t.Optional[int]): The maximum number of entries to return skip (t.Optional[int]): The number of entries to skip page (t.Optional[int]): Page number after_id (t.Optional[str]): Id to return results after Returns: Page: if a above argument is not None
1981
+ This method makes a synchronous HTTP request by default.
1982
+
1983
+ :param bool inflate_job: Return job as an object instead of an id
1984
+ :param bool include_all_info: Include all info in returned objects
1985
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
1986
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
1987
+ :param int limit: The maximum number of entries to return.
1988
+ :param int skip: The number of entries to skip.
1989
+ :param int page: The page number (i.e. skip limit*page entries)
1990
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
1991
+ :param list[str] x_accept_feature:
1992
+ :param bool async_: Perform the request asynchronously
1993
+ :return: union[Page,list[union[AnalysisListOutput,AnalysisListOutputInflatedJob]]]
1994
+ """
1995
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1996
+ kwargs['_return_http_data_only'] = True
1997
+
1998
+ if kwargs.get('async_'):
1999
+ return self.get_all_analyses_with_http_info(**kwargs) # noqa: E501
2000
+ else:
2001
+ (data) = self.get_all_analyses_with_http_info(**kwargs) # noqa: E501
2002
+ if (
2003
+ data
2004
+ and hasattr(data, 'return_value')
2005
+ and not ignore_simplified_return_value
2006
+ ):
2007
+ return data.return_value()
2008
+ return data
2009
+
2010
+
2011
+ def get_all_analyses_with_http_info(self, **kwargs): # noqa: E501
2012
+ """Find all analyses
2013
+
2014
+ Returns a page of analyses Args: filter (t.Optional[str]): The filters to apply sort (t.List[Tuple[str,int]): Sorting, as a list of (str, int) tuples limit (t.Optional[int]): The maximum number of entries to return skip (t.Optional[int]): The number of entries to skip page (t.Optional[int]): Page number after_id (t.Optional[str]): Id to return results after Returns: Page: if a above argument is not None
2015
+ This method makes a synchronous HTTP request by default.
2016
+
2017
+ :param bool inflate_job: Return job as an object instead of an id
2018
+ :param bool include_all_info: Include all info in returned objects
2019
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
2020
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
2021
+ :param int limit: The maximum number of entries to return.
2022
+ :param int skip: The number of entries to skip.
2023
+ :param int page: The page number (i.e. skip limit*page entries)
2024
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
2025
+ :param list[str] x_accept_feature:
2026
+ :param bool async_: Perform the request asynchronously
2027
+ :return: union[Page,list[union[AnalysisListOutput,AnalysisListOutputInflatedJob]]]
2028
+ """
2029
+
2030
+ all_params = ['inflate_job','include_all_info','filter','sort','limit','skip','page','after_id','x_accept_feature',] # noqa: E501
2031
+ all_params.append('async_')
2032
+ all_params.append('_return_http_data_only')
2033
+ all_params.append('_preload_content')
2034
+ all_params.append('_request_timeout')
2035
+ all_params.append('_request_out')
2036
+
2037
+ params = locals()
2038
+ for key, val in six.iteritems(params['kwargs']):
2039
+ if key not in all_params:
2040
+ raise TypeError(
2041
+ "Got an unexpected keyword argument '%s'"
2042
+ " to method get_all_analyses" % key
2043
+ )
2044
+ params[key] = val
2045
+ del params['kwargs']
2046
+ check_filename_params(params)
2047
+
2048
+ collection_formats = {}
2049
+
2050
+ path_params = {}
2051
+
2052
+ query_params = []
2053
+ if 'inflate_job' in params:
2054
+ query_params.append(('inflate_job', params['inflate_job'])) # noqa: E501
2055
+ if 'include_all_info' in params:
2056
+ query_params.append(('include_all_info', params['include_all_info'])) # noqa: E501
2057
+ if 'filter' in params:
2058
+ query_params.append(('filter', params['filter'])) # noqa: E501
2059
+ if 'sort' in params:
2060
+ query_params.append(('sort', params['sort'])) # noqa: E501
2061
+ if 'limit' in params:
2062
+ query_params.append(('limit', params['limit'])) # noqa: E501
2063
+ if 'skip' in params:
2064
+ query_params.append(('skip', params['skip'])) # noqa: E501
2065
+ if 'page' in params:
2066
+ query_params.append(('page', params['page'])) # noqa: E501
2067
+ if 'after_id' in params:
2068
+ query_params.append(('after_id', params['after_id'])) # noqa: E501
2069
+
2070
+ header_params = {}
2071
+ if 'x_accept_feature' in params:
2072
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
2073
+ collection_formats['x-accept-feature'] = '' # noqa: E501
2074
+
2075
+ form_params = []
2076
+ local_var_files = {}
2077
+
2078
+ body_params = None
2079
+ # HTTP header `Accept`
2080
+ header_params['Accept'] = self.api_client.select_header_accept(
2081
+ ['application/json']) # noqa: E501
2082
+
2083
+ # Authentication setting
2084
+ auth_settings = ['ApiKey'] # noqa: E501
2085
+
2086
+ return self.api_client.call_api(
2087
+ '/analyses', 'GET',
2088
+ path_params,
2089
+ query_params,
2090
+ header_params,
2091
+ body=body_params,
2092
+ post_params=form_params,
2093
+ files=local_var_files,
2094
+ response_type='union[Page,list[union[AnalysisListOutput,AnalysisListOutputInflatedJob]]]', # noqa: E501
2095
+ auth_settings=auth_settings,
2096
+ async_=params.get('async_'),
2097
+ _return_http_data_only=params.get('_return_http_data_only'),
2098
+ _preload_content=params.get('_preload_content', True),
2099
+ _request_timeout=params.get('_request_timeout'),
2100
+ _request_out=params.get('_request_out'),
2101
+ collection_formats=collection_formats)
2102
+
2103
+ def get_analyses(self, container_name, container_id, subcontainer_name, **kwargs): # noqa: E501
2104
+ """Get nested analyses for a container
2105
+
2106
+ Returns analyses that belong to containers of the specified type that belong to ContainerId. Ex: `projects/{ProjectId}/acquisitions/analyses` will return any analyses that have an acquisition that is under that project as a parent. The `all` keyword is also supported, for example: projects/{ProjectId}/all/analyses will return any analyses that have any session or acquisition or the project itself as a parent.
2107
+ This method makes a synchronous HTTP request by default.
2108
+
2109
+ :param str container_name: The parent container type (required)
2110
+ :param str container_id: The parent container id (required)
2111
+ :param str subcontainer_name: The sub container type (required)
2112
+ :param bool async_: Perform the request asynchronously
2113
+ :return: list[AnalysisListOutput]
2114
+ """
2115
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2116
+ kwargs['_return_http_data_only'] = True
2117
+
2118
+ if kwargs.get('async_'):
2119
+ return self.get_analyses_with_http_info(container_name, container_id, subcontainer_name, **kwargs) # noqa: E501
2120
+ else:
2121
+ (data) = self.get_analyses_with_http_info(container_name, container_id, subcontainer_name, **kwargs) # noqa: E501
2122
+ if (
2123
+ data
2124
+ and hasattr(data, 'return_value')
2125
+ and not ignore_simplified_return_value
2126
+ ):
2127
+ return data.return_value()
2128
+ return data
2129
+
2130
+
2131
+ def get_analyses_with_http_info(self, container_name, container_id, subcontainer_name, **kwargs): # noqa: E501
2132
+ """Get nested analyses for a container
2133
+
2134
+ Returns analyses that belong to containers of the specified type that belong to ContainerId. Ex: `projects/{ProjectId}/acquisitions/analyses` will return any analyses that have an acquisition that is under that project as a parent. The `all` keyword is also supported, for example: projects/{ProjectId}/all/analyses will return any analyses that have any session or acquisition or the project itself as a parent.
2135
+ This method makes a synchronous HTTP request by default.
2136
+
2137
+ :param str container_name: The parent container type (required)
2138
+ :param str container_id: The parent container id (required)
2139
+ :param str subcontainer_name: The sub container type (required)
2140
+ :param bool async_: Perform the request asynchronously
2141
+ :return: list[AnalysisListOutput]
2142
+ """
2143
+
2144
+ all_params = ['container_name','container_id','subcontainer_name',] # noqa: E501
2145
+ all_params.append('async_')
2146
+ all_params.append('_return_http_data_only')
2147
+ all_params.append('_preload_content')
2148
+ all_params.append('_request_timeout')
2149
+ all_params.append('_request_out')
2150
+
2151
+ params = locals()
2152
+ for key, val in six.iteritems(params['kwargs']):
2153
+ if key not in all_params:
2154
+ raise TypeError(
2155
+ "Got an unexpected keyword argument '%s'"
2156
+ " to method get_analyses" % key
2157
+ )
2158
+ params[key] = val
2159
+ del params['kwargs']
2160
+ # verify the required parameter 'container_name' is set
2161
+ if ('container_name' not in params or
2162
+ params['container_name'] is None):
2163
+ raise ValueError("Missing the required parameter `container_name` when calling `get_analyses`") # noqa: E501
2164
+ # verify the required parameter 'container_id' is set
2165
+ if ('container_id' not in params or
2166
+ params['container_id'] is None):
2167
+ raise ValueError("Missing the required parameter `container_id` when calling `get_analyses`") # noqa: E501
2168
+ # verify the required parameter 'subcontainer_name' is set
2169
+ if ('subcontainer_name' not in params or
2170
+ params['subcontainer_name'] is None):
2171
+ raise ValueError("Missing the required parameter `subcontainer_name` when calling `get_analyses`") # noqa: E501
2172
+ check_filename_params(params)
2173
+
2174
+ collection_formats = {}
2175
+
2176
+ path_params = {}
2177
+ if 'container_name' in params:
2178
+ path_params['container_name'] = params['container_name'] # noqa: E501
2179
+ if 'container_id' in params:
2180
+ path_params['container_id'] = params['container_id'] # noqa: E501
2181
+ if 'subcontainer_name' in params:
2182
+ path_params['subcontainer_name'] = params['subcontainer_name'] # noqa: E501
2183
+
2184
+ query_params = []
2185
+
2186
+ header_params = {}
2187
+
2188
+ form_params = []
2189
+ local_var_files = {}
2190
+
2191
+ body_params = None
2192
+ # HTTP header `Accept`
2193
+ header_params['Accept'] = self.api_client.select_header_accept(
2194
+ ['application/json']) # noqa: E501
2195
+
2196
+ # Authentication setting
2197
+ auth_settings = ['ApiKey'] # noqa: E501
2198
+
2199
+ return self.api_client.call_api(
2200
+ '/{container_name}/{container_id}/{subcontainer_name}/analyses', 'GET',
2201
+ path_params,
2202
+ query_params,
2203
+ header_params,
2204
+ body=body_params,
2205
+ post_params=form_params,
2206
+ files=local_var_files,
2207
+ response_type='list[AnalysisListOutput]', # noqa: E501
2208
+ auth_settings=auth_settings,
2209
+ async_=params.get('async_'),
2210
+ _return_http_data_only=params.get('_return_http_data_only'),
2211
+ _preload_content=params.get('_preload_content', True),
2212
+ _request_timeout=params.get('_request_timeout'),
2213
+ _request_out=params.get('_request_out'),
2214
+ collection_formats=collection_formats)
2215
+
2216
+ def get_analysis(self, analysis_id, **kwargs): # noqa: E501
2217
+ """Get an analysis.
2218
+
2219
+ Get an analysis by its id
2220
+ This method makes a synchronous HTTP request by default.
2221
+
2222
+ :param str analysis_id: 24-char hex analysis id (required)
2223
+ :param bool inflate_job: expand job info
2224
+ :param bool join_avatars: add name and avatar to notes
2225
+ :param JoinType join:
2226
+ :param bool async_: Perform the request asynchronously
2227
+ :return: union[AnalysisOutput,AnalysisOutputInflatedJob]
2228
+ """
2229
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2230
+ kwargs['_return_http_data_only'] = True
2231
+
2232
+ if kwargs.get('async_'):
2233
+ return self.get_analysis_with_http_info(analysis_id, **kwargs) # noqa: E501
2234
+ else:
2235
+ (data) = self.get_analysis_with_http_info(analysis_id, **kwargs) # noqa: E501
2236
+ if (
2237
+ data
2238
+ and hasattr(data, 'return_value')
2239
+ and not ignore_simplified_return_value
2240
+ ):
2241
+ return data.return_value()
2242
+ return data
2243
+
2244
+
2245
+ def get_analysis_with_http_info(self, analysis_id, **kwargs): # noqa: E501
2246
+ """Get an analysis.
2247
+
2248
+ Get an analysis by its id
2249
+ This method makes a synchronous HTTP request by default.
2250
+
2251
+ :param str analysis_id: 24-char hex analysis id (required)
2252
+ :param bool inflate_job: expand job info
2253
+ :param bool join_avatars: add name and avatar to notes
2254
+ :param JoinType join:
2255
+ :param bool async_: Perform the request asynchronously
2256
+ :return: union[AnalysisOutput,AnalysisOutputInflatedJob]
2257
+ """
2258
+
2259
+ all_params = ['analysis_id','inflate_job','join_avatars','join',] # noqa: E501
2260
+ all_params.append('async_')
2261
+ all_params.append('_return_http_data_only')
2262
+ all_params.append('_preload_content')
2263
+ all_params.append('_request_timeout')
2264
+ all_params.append('_request_out')
2265
+
2266
+ params = locals()
2267
+ for key, val in six.iteritems(params['kwargs']):
2268
+ if key not in all_params:
2269
+ raise TypeError(
2270
+ "Got an unexpected keyword argument '%s'"
2271
+ " to method get_analysis" % key
2272
+ )
2273
+ params[key] = val
2274
+ del params['kwargs']
2275
+ # verify the required parameter 'analysis_id' is set
2276
+ if ('analysis_id' not in params or
2277
+ params['analysis_id'] is None):
2278
+ raise ValueError("Missing the required parameter `analysis_id` when calling `get_analysis`") # noqa: E501
2279
+ check_filename_params(params)
2280
+
2281
+ collection_formats = {}
2282
+
2283
+ path_params = {}
2284
+ if 'analysis_id' in params:
2285
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
2286
+
2287
+ query_params = []
2288
+ if 'inflate_job' in params:
2289
+ query_params.append(('inflate_job', params['inflate_job'])) # noqa: E501
2290
+ else:
2291
+ query_params.append(('inflate_job', 'true'))
2292
+ if 'join_avatars' in params:
2293
+ query_params.append(('join_avatars', params['join_avatars'])) # noqa: E501
2294
+ if 'join' in params:
2295
+ query_params.append(('join', params['join'])) # noqa: E501
2296
+
2297
+ header_params = {}
2298
+
2299
+ form_params = []
2300
+ local_var_files = {}
2301
+
2302
+ body_params = None
2303
+ # HTTP header `Accept`
2304
+ header_params['Accept'] = self.api_client.select_header_accept(
2305
+ ['application/json']) # noqa: E501
2306
+
2307
+ # Authentication setting
2308
+ auth_settings = ['ApiKey'] # noqa: E501
2309
+
2310
+ return self.api_client.call_api(
2311
+ '/analyses/{analysis_id}', 'GET',
2312
+ path_params,
2313
+ query_params,
2314
+ header_params,
2315
+ body=body_params,
2316
+ post_params=form_params,
2317
+ files=local_var_files,
2318
+ response_type='union[AnalysisOutput,AnalysisOutputInflatedJob]', # noqa: E501
2319
+ auth_settings=auth_settings,
2320
+ async_=params.get('async_'),
2321
+ _return_http_data_only=params.get('_return_http_data_only'),
2322
+ _preload_content=params.get('_preload_content', True),
2323
+ _request_timeout=params.get('_request_timeout'),
2324
+ _request_out=params.get('_request_out'),
2325
+ collection_formats=collection_formats)
2326
+
2327
+ def get_analysis_file_info(self, container_id, filename, **kwargs): # noqa: E501
2328
+ """Get metadata for an input file of an analysis.
2329
+
2330
+ Get metadata for an input file of an analysis.
2331
+ This method makes a synchronous HTTP request by default.
2332
+
2333
+ :param str container_id: Container Id (required)
2334
+ :param str filename: (required)
2335
+ :param bool async_: Perform the request asynchronously
2336
+ :return: FileOutput
2337
+ """
2338
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2339
+ kwargs['_return_http_data_only'] = True
2340
+
2341
+ if kwargs.get('async_'):
2342
+ return self.get_analysis_file_info_with_http_info(container_id, filename, **kwargs) # noqa: E501
2343
+ else:
2344
+ (data) = self.get_analysis_file_info_with_http_info(container_id, filename, **kwargs) # noqa: E501
2345
+ if (
2346
+ data
2347
+ and hasattr(data, 'return_value')
2348
+ and not ignore_simplified_return_value
2349
+ ):
2350
+ return data.return_value()
2351
+ return data
2352
+
2353
+
2354
+ def get_analysis_file_info_with_http_info(self, container_id, filename, **kwargs): # noqa: E501
2355
+ """Get metadata for an input file of an analysis.
2356
+
2357
+ Get metadata for an input file of an analysis.
2358
+ This method makes a synchronous HTTP request by default.
2359
+
2360
+ :param str container_id: Container Id (required)
2361
+ :param str filename: (required)
2362
+ :param bool async_: Perform the request asynchronously
2363
+ :return: FileOutput
2364
+ """
2365
+
2366
+ all_params = ['container_id','filename',] # noqa: E501
2367
+ all_params.append('async_')
2368
+ all_params.append('_return_http_data_only')
2369
+ all_params.append('_preload_content')
2370
+ all_params.append('_request_timeout')
2371
+ all_params.append('_request_out')
2372
+
2373
+ params = locals()
2374
+ for key, val in six.iteritems(params['kwargs']):
2375
+ if key not in all_params:
2376
+ raise TypeError(
2377
+ "Got an unexpected keyword argument '%s'"
2378
+ " to method get_analysis_file_info" % key
2379
+ )
2380
+ params[key] = val
2381
+ del params['kwargs']
2382
+ # verify the required parameter 'container_id' is set
2383
+ if ('container_id' not in params or
2384
+ params['container_id'] is None):
2385
+ raise ValueError("Missing the required parameter `container_id` when calling `get_analysis_file_info`") # noqa: E501
2386
+ # verify the required parameter 'filename' is set
2387
+ if ('filename' not in params or
2388
+ params['filename'] is None):
2389
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_file_info`") # noqa: E501
2390
+ check_filename_params(params)
2391
+
2392
+ collection_formats = {}
2393
+
2394
+ path_params = {}
2395
+ if 'container_id' in params:
2396
+ path_params['container_id'] = params['container_id'] # noqa: E501
2397
+ if 'filename' in params:
2398
+ path_params['filename'] = params['filename'] # noqa: E501
2399
+
2400
+ query_params = []
2401
+
2402
+ header_params = {}
2403
+
2404
+ form_params = []
2405
+ local_var_files = {}
2406
+
2407
+ body_params = None
2408
+ # HTTP header `Accept`
2409
+ header_params['Accept'] = self.api_client.select_header_accept(
2410
+ ['application/json']) # noqa: E501
2411
+
2412
+ # Authentication setting
2413
+ auth_settings = ['ApiKey'] # noqa: E501
2414
+
2415
+ return self.api_client.call_api(
2416
+ '/analyses/{container_id}/inputs/{filename}/info', 'GET',
2417
+ path_params,
2418
+ query_params,
2419
+ header_params,
2420
+ body=body_params,
2421
+ post_params=form_params,
2422
+ files=local_var_files,
2423
+ response_type='FileOutput', # noqa: E501
2424
+ auth_settings=auth_settings,
2425
+ async_=params.get('async_'),
2426
+ _return_http_data_only=params.get('_return_http_data_only'),
2427
+ _preload_content=params.get('_preload_content', True),
2428
+ _request_timeout=params.get('_request_timeout'),
2429
+ _request_out=params.get('_request_out'),
2430
+ collection_formats=collection_formats)
2431
+
2432
+ def get_analysis_input_files(self, container_id, filename, **kwargs): # noqa: E501
2433
+ """Get metadata for input file(s) for an analysis.
2434
+
2435
+ Get metadata for input file(s) for an analysis. There may be more than one since input filenames are not guaranteed to be unique.
2436
+ This method makes a synchronous HTTP request by default.
2437
+
2438
+ :param str container_id: Container Id (required)
2439
+ :param str filename: (required)
2440
+ :param bool async_: Perform the request asynchronously
2441
+ :return: list[FileOutput]
2442
+ """
2443
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2444
+ kwargs['_return_http_data_only'] = True
2445
+
2446
+ if kwargs.get('async_'):
2447
+ return self.get_analysis_input_files_with_http_info(container_id, filename, **kwargs) # noqa: E501
2448
+ else:
2449
+ (data) = self.get_analysis_input_files_with_http_info(container_id, filename, **kwargs) # noqa: E501
2450
+ if (
2451
+ data
2452
+ and hasattr(data, 'return_value')
2453
+ and not ignore_simplified_return_value
2454
+ ):
2455
+ return data.return_value()
2456
+ return data
2457
+
2458
+
2459
+ def get_analysis_input_files_with_http_info(self, container_id, filename, **kwargs): # noqa: E501
2460
+ """Get metadata for input file(s) for an analysis.
2461
+
2462
+ Get metadata for input file(s) for an analysis. There may be more than one since input filenames are not guaranteed to be unique.
2463
+ This method makes a synchronous HTTP request by default.
2464
+
2465
+ :param str container_id: Container Id (required)
2466
+ :param str filename: (required)
2467
+ :param bool async_: Perform the request asynchronously
2468
+ :return: list[FileOutput]
2469
+ """
2470
+
2471
+ all_params = ['container_id','filename',] # noqa: E501
2472
+ all_params.append('async_')
2473
+ all_params.append('_return_http_data_only')
2474
+ all_params.append('_preload_content')
2475
+ all_params.append('_request_timeout')
2476
+ all_params.append('_request_out')
2477
+
2478
+ params = locals()
2479
+ for key, val in six.iteritems(params['kwargs']):
2480
+ if key not in all_params:
2481
+ raise TypeError(
2482
+ "Got an unexpected keyword argument '%s'"
2483
+ " to method get_analysis_input_files" % key
2484
+ )
2485
+ params[key] = val
2486
+ del params['kwargs']
2487
+ # verify the required parameter 'container_id' is set
2488
+ if ('container_id' not in params or
2489
+ params['container_id'] is None):
2490
+ raise ValueError("Missing the required parameter `container_id` when calling `get_analysis_input_files`") # noqa: E501
2491
+ # verify the required parameter 'filename' is set
2492
+ if ('filename' not in params or
2493
+ params['filename'] is None):
2494
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_input_files`") # noqa: E501
2495
+ check_filename_params(params)
2496
+
2497
+ collection_formats = {}
2498
+
2499
+ path_params = {}
2500
+ if 'container_id' in params:
2501
+ path_params['container_id'] = params['container_id'] # noqa: E501
2502
+ if 'filename' in params:
2503
+ path_params['filename'] = params['filename'] # noqa: E501
2504
+
2505
+ query_params = []
2506
+
2507
+ header_params = {}
2508
+
2509
+ form_params = []
2510
+ local_var_files = {}
2511
+
2512
+ body_params = None
2513
+ # HTTP header `Accept`
2514
+ header_params['Accept'] = self.api_client.select_header_accept(
2515
+ ['application/json']) # noqa: E501
2516
+
2517
+ # Authentication setting
2518
+ auth_settings = ['ApiKey'] # noqa: E501
2519
+
2520
+ return self.api_client.call_api(
2521
+ '/analyses/{container_id}/input_files/{filename}/info', 'GET',
2522
+ path_params,
2523
+ query_params,
2524
+ header_params,
2525
+ body=body_params,
2526
+ post_params=form_params,
2527
+ files=local_var_files,
2528
+ response_type='list[FileOutput]', # noqa: E501
2529
+ auth_settings=auth_settings,
2530
+ async_=params.get('async_'),
2531
+ _return_http_data_only=params.get('_return_http_data_only'),
2532
+ _preload_content=params.get('_preload_content', True),
2533
+ _request_timeout=params.get('_request_timeout'),
2534
+ _request_out=params.get('_request_out'),
2535
+ collection_formats=collection_formats)
2536
+
2537
+ def get_analysis_note(self, container_id, note_id, **kwargs): # noqa: E501
2538
+ """Get a note of a(n) analysis.
2539
+
2540
+ Get a note of a(n) analysis
2541
+ This method makes a synchronous HTTP request by default.
2542
+
2543
+ :param str container_id: (required)
2544
+ :param str note_id: (required)
2545
+ :param bool async_: Perform the request asynchronously
2546
+ :return: Note
2547
+ """
2548
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2549
+ kwargs['_return_http_data_only'] = True
2550
+
2551
+ if kwargs.get('async_'):
2552
+ return self.get_analysis_note_with_http_info(container_id, note_id, **kwargs) # noqa: E501
2553
+ else:
2554
+ (data) = self.get_analysis_note_with_http_info(container_id, note_id, **kwargs) # noqa: E501
2555
+ if (
2556
+ data
2557
+ and hasattr(data, 'return_value')
2558
+ and not ignore_simplified_return_value
2559
+ ):
2560
+ return data.return_value()
2561
+ return data
2562
+
2563
+
2564
+ def get_analysis_note_with_http_info(self, container_id, note_id, **kwargs): # noqa: E501
2565
+ """Get a note of a(n) analysis.
2566
+
2567
+ Get a note of a(n) analysis
2568
+ This method makes a synchronous HTTP request by default.
2569
+
2570
+ :param str container_id: (required)
2571
+ :param str note_id: (required)
2572
+ :param bool async_: Perform the request asynchronously
2573
+ :return: Note
2574
+ """
2575
+
2576
+ all_params = ['container_id','note_id',] # noqa: E501
2577
+ all_params.append('async_')
2578
+ all_params.append('_return_http_data_only')
2579
+ all_params.append('_preload_content')
2580
+ all_params.append('_request_timeout')
2581
+ all_params.append('_request_out')
2582
+
2583
+ params = locals()
2584
+ for key, val in six.iteritems(params['kwargs']):
2585
+ if key not in all_params:
2586
+ raise TypeError(
2587
+ "Got an unexpected keyword argument '%s'"
2588
+ " to method get_analysis_note" % key
2589
+ )
2590
+ params[key] = val
2591
+ del params['kwargs']
2592
+ # verify the required parameter 'container_id' is set
2593
+ if ('container_id' not in params or
2594
+ params['container_id'] is None):
2595
+ raise ValueError("Missing the required parameter `container_id` when calling `get_analysis_note`") # noqa: E501
2596
+ # verify the required parameter 'note_id' is set
2597
+ if ('note_id' not in params or
2598
+ params['note_id'] is None):
2599
+ raise ValueError("Missing the required parameter `note_id` when calling `get_analysis_note`") # noqa: E501
2600
+ check_filename_params(params)
2601
+
2602
+ collection_formats = {}
2603
+
2604
+ path_params = {}
2605
+ if 'container_id' in params:
2606
+ path_params['container_id'] = params['container_id'] # noqa: E501
2607
+ if 'note_id' in params:
2608
+ path_params['note_id'] = params['note_id'] # noqa: E501
2609
+
2610
+ query_params = []
2611
+
2612
+ header_params = {}
2613
+
2614
+ form_params = []
2615
+ local_var_files = {}
2616
+
2617
+ body_params = None
2618
+ # HTTP header `Accept`
2619
+ header_params['Accept'] = self.api_client.select_header_accept(
2620
+ ['application/json']) # noqa: E501
2621
+
2622
+ # Authentication setting
2623
+ auth_settings = ['ApiKey'] # noqa: E501
2624
+
2625
+ return self.api_client.call_api(
2626
+ '/analyses/{container_id}/notes/{note_id}', 'GET',
2627
+ path_params,
2628
+ query_params,
2629
+ header_params,
2630
+ body=body_params,
2631
+ post_params=form_params,
2632
+ files=local_var_files,
2633
+ response_type='Note', # noqa: E501
2634
+ auth_settings=auth_settings,
2635
+ async_=params.get('async_'),
2636
+ _return_http_data_only=params.get('_return_http_data_only'),
2637
+ _preload_content=params.get('_preload_content', True),
2638
+ _request_timeout=params.get('_request_timeout'),
2639
+ _request_out=params.get('_request_out'),
2640
+ collection_formats=collection_formats)
2641
+
2642
+ def get_analysis_output_file(self, cid, filename, **kwargs): # noqa: E501
2643
+ """Get metadata for an output file of an analysis.
2644
+
2645
+ Get metadata for an output file of an analysis.
2646
+ This method makes a synchronous HTTP request by default.
2647
+
2648
+ :param str cid: Container Id (required)
2649
+ :param str filename: (required)
2650
+ :param FileContainerType ctype:
2651
+ :param bool async_: Perform the request asynchronously
2652
+ :return: FileOutput
2653
+ """
2654
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2655
+ kwargs['_return_http_data_only'] = True
2656
+
2657
+ if kwargs.get('async_'):
2658
+ return self.get_analysis_output_file_with_http_info(cid, filename, **kwargs) # noqa: E501
2659
+ else:
2660
+ (data) = self.get_analysis_output_file_with_http_info(cid, filename, **kwargs) # noqa: E501
2661
+ if (
2662
+ data
2663
+ and hasattr(data, 'return_value')
2664
+ and not ignore_simplified_return_value
2665
+ ):
2666
+ return data.return_value()
2667
+ return data
2668
+
2669
+
2670
+ def get_analysis_output_file_with_http_info(self, cid, filename, **kwargs): # noqa: E501
2671
+ """Get metadata for an output file of an analysis.
2672
+
2673
+ Get metadata for an output file of an analysis.
2674
+ This method makes a synchronous HTTP request by default.
2675
+
2676
+ :param str cid: Container Id (required)
2677
+ :param str filename: (required)
2678
+ :param FileContainerType ctype:
2679
+ :param bool async_: Perform the request asynchronously
2680
+ :return: FileOutput
2681
+ """
2682
+
2683
+ all_params = ['cid','filename','ctype',] # noqa: E501
2684
+ all_params.append('async_')
2685
+ all_params.append('_return_http_data_only')
2686
+ all_params.append('_preload_content')
2687
+ all_params.append('_request_timeout')
2688
+ all_params.append('_request_out')
2689
+
2690
+ params = locals()
2691
+ for key, val in six.iteritems(params['kwargs']):
2692
+ if key not in all_params:
2693
+ raise TypeError(
2694
+ "Got an unexpected keyword argument '%s'"
2695
+ " to method get_analysis_output_file" % key
2696
+ )
2697
+ params[key] = val
2698
+ del params['kwargs']
2699
+ # verify the required parameter 'cid' is set
2700
+ if ('cid' not in params or
2701
+ params['cid'] is None):
2702
+ raise ValueError("Missing the required parameter `cid` when calling `get_analysis_output_file`") # noqa: E501
2703
+ # verify the required parameter 'filename' is set
2704
+ if ('filename' not in params or
2705
+ params['filename'] is None):
2706
+ raise ValueError("Missing the required parameter `filename` when calling `get_analysis_output_file`") # noqa: E501
2707
+ check_filename_params(params)
2708
+
2709
+ collection_formats = {}
2710
+
2711
+ path_params = {}
2712
+ if 'cid' in params:
2713
+ path_params['cid'] = params['cid'] # noqa: E501
2714
+ if 'filename' in params:
2715
+ path_params['filename'] = params['filename'] # noqa: E501
2716
+
2717
+ query_params = []
2718
+ if 'ctype' in params:
2719
+ query_params.append(('ctype', params['ctype'])) # noqa: E501
2720
+
2721
+ header_params = {}
2722
+
2723
+ form_params = []
2724
+ local_var_files = {}
2725
+
2726
+ body_params = None
2727
+ # HTTP header `Accept`
2728
+ header_params['Accept'] = self.api_client.select_header_accept(
2729
+ ['application/json']) # noqa: E501
2730
+
2731
+ # Authentication setting
2732
+ auth_settings = ['ApiKey'] # noqa: E501
2733
+
2734
+ return self.api_client.call_api(
2735
+ '/analyses/{cid}/files/{filename}/info', 'GET',
2736
+ path_params,
2737
+ query_params,
2738
+ header_params,
2739
+ body=body_params,
2740
+ post_params=form_params,
2741
+ files=local_var_files,
2742
+ response_type='FileOutput', # noqa: E501
2743
+ auth_settings=auth_settings,
2744
+ async_=params.get('async_'),
2745
+ _return_http_data_only=params.get('_return_http_data_only'),
2746
+ _preload_content=params.get('_preload_content', True),
2747
+ _request_timeout=params.get('_request_timeout'),
2748
+ _request_out=params.get('_request_out'),
2749
+ collection_formats=collection_formats)
2750
+
2751
+ def get_analysis_tag(self, container_id, value, **kwargs): # noqa: E501
2752
+ """Get the value of a tag, by name.
2753
+
2754
+ Get the value of a tag, by name
2755
+ This method makes a synchronous HTTP request by default.
2756
+
2757
+ :param str container_id: (required)
2758
+ :param str value: The tag to interact with (required)
2759
+ :param bool async_: Perform the request asynchronously
2760
+ :return: str
2761
+ """
2762
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2763
+ kwargs['_return_http_data_only'] = True
2764
+
2765
+ if kwargs.get('async_'):
2766
+ return self.get_analysis_tag_with_http_info(container_id, value, **kwargs) # noqa: E501
2767
+ else:
2768
+ (data) = self.get_analysis_tag_with_http_info(container_id, value, **kwargs) # noqa: E501
2769
+ if (
2770
+ data
2771
+ and hasattr(data, 'return_value')
2772
+ and not ignore_simplified_return_value
2773
+ ):
2774
+ return data.return_value()
2775
+ return data
2776
+
2777
+
2778
+ def get_analysis_tag_with_http_info(self, container_id, value, **kwargs): # noqa: E501
2779
+ """Get the value of a tag, by name.
2780
+
2781
+ Get the value of a tag, by name
2782
+ This method makes a synchronous HTTP request by default.
2783
+
2784
+ :param str container_id: (required)
2785
+ :param str value: The tag to interact with (required)
2786
+ :param bool async_: Perform the request asynchronously
2787
+ :return: str
2788
+ """
2789
+
2790
+ all_params = ['container_id','value',] # noqa: E501
2791
+ all_params.append('async_')
2792
+ all_params.append('_return_http_data_only')
2793
+ all_params.append('_preload_content')
2794
+ all_params.append('_request_timeout')
2795
+ all_params.append('_request_out')
2796
+
2797
+ params = locals()
2798
+ for key, val in six.iteritems(params['kwargs']):
2799
+ if key not in all_params:
2800
+ raise TypeError(
2801
+ "Got an unexpected keyword argument '%s'"
2802
+ " to method get_analysis_tag" % key
2803
+ )
2804
+ params[key] = val
2805
+ del params['kwargs']
2806
+ # verify the required parameter 'container_id' is set
2807
+ if ('container_id' not in params or
2808
+ params['container_id'] is None):
2809
+ raise ValueError("Missing the required parameter `container_id` when calling `get_analysis_tag`") # noqa: E501
2810
+ # verify the required parameter 'value' is set
2811
+ if ('value' not in params or
2812
+ params['value'] is None):
2813
+ raise ValueError("Missing the required parameter `value` when calling `get_analysis_tag`") # noqa: E501
2814
+ check_filename_params(params)
2815
+
2816
+ collection_formats = {}
2817
+
2818
+ path_params = {}
2819
+ if 'container_id' in params:
2820
+ path_params['container_id'] = params['container_id'] # noqa: E501
2821
+ if 'value' in params:
2822
+ path_params['value'] = params['value'] # noqa: E501
2823
+
2824
+ query_params = []
2825
+
2826
+ header_params = {}
2827
+
2828
+ form_params = []
2829
+ local_var_files = {}
2830
+
2831
+ body_params = None
2832
+ # HTTP header `Accept`
2833
+ header_params['Accept'] = self.api_client.select_header_accept(
2834
+ ['application/json']) # noqa: E501
2835
+
2836
+ # Authentication setting
2837
+ auth_settings = ['ApiKey'] # noqa: E501
2838
+
2839
+ return self.api_client.call_api(
2840
+ '/analyses/{container_id}/tags/{value}', 'GET',
2841
+ path_params,
2842
+ query_params,
2843
+ header_params,
2844
+ body=body_params,
2845
+ post_params=form_params,
2846
+ files=local_var_files,
2847
+ response_type='str', # noqa: E501
2848
+ auth_settings=auth_settings,
2849
+ async_=params.get('async_'),
2850
+ _return_http_data_only=params.get('_return_http_data_only'),
2851
+ _preload_content=params.get('_preload_content', True),
2852
+ _request_timeout=params.get('_request_timeout'),
2853
+ _request_out=params.get('_request_out'),
2854
+ collection_formats=collection_formats)
2855
+
2856
+ def modify_analysis(self, analysis_id, body, **kwargs): # noqa: E501
2857
+ """Modify an analysis.
2858
+
2859
+ Modify an analysis by its id Args: analysis_id: The id of the analysis analysis_modify: The modifications to make auth_session: The auth session
2860
+ This method makes a synchronous HTTP request by default.
2861
+
2862
+ :param str analysis_id: 24-char hex analysis id (required)
2863
+ :param AnalysisModifyInput body: (required)
2864
+ :param bool async_: Perform the request asynchronously
2865
+ :return: ModifiedResult
2866
+ """
2867
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2868
+ kwargs['_return_http_data_only'] = True
2869
+
2870
+ if kwargs.get('async_'):
2871
+ return self.modify_analysis_with_http_info(analysis_id, body, **kwargs) # noqa: E501
2872
+ else:
2873
+ (data) = self.modify_analysis_with_http_info(analysis_id, body, **kwargs) # noqa: E501
2874
+ if (
2875
+ data
2876
+ and hasattr(data, 'return_value')
2877
+ and not ignore_simplified_return_value
2878
+ ):
2879
+ return data.return_value()
2880
+ return data
2881
+
2882
+
2883
+ def modify_analysis_with_http_info(self, analysis_id, body, **kwargs): # noqa: E501
2884
+ """Modify an analysis.
2885
+
2886
+ Modify an analysis by its id Args: analysis_id: The id of the analysis analysis_modify: The modifications to make auth_session: The auth session
2887
+ This method makes a synchronous HTTP request by default.
2888
+
2889
+ :param str analysis_id: 24-char hex analysis id (required)
2890
+ :param AnalysisModifyInput body: (required)
2891
+ :param bool async_: Perform the request asynchronously
2892
+ :return: ModifiedResult
2893
+ """
2894
+
2895
+ all_params = ['analysis_id','body',] # noqa: E501
2896
+ all_params.append('async_')
2897
+ all_params.append('_return_http_data_only')
2898
+ all_params.append('_preload_content')
2899
+ all_params.append('_request_timeout')
2900
+ all_params.append('_request_out')
2901
+
2902
+ params = locals()
2903
+ for key, val in six.iteritems(params['kwargs']):
2904
+ if key not in all_params:
2905
+ raise TypeError(
2906
+ "Got an unexpected keyword argument '%s'"
2907
+ " to method modify_analysis" % key
2908
+ )
2909
+ params[key] = val
2910
+ del params['kwargs']
2911
+ # verify the required parameter 'analysis_id' is set
2912
+ if ('analysis_id' not in params or
2913
+ params['analysis_id'] is None):
2914
+ raise ValueError("Missing the required parameter `analysis_id` when calling `modify_analysis`") # noqa: E501
2915
+ # verify the required parameter 'body' is set
2916
+ if ('body' not in params or
2917
+ params['body'] is None):
2918
+ raise ValueError("Missing the required parameter `body` when calling `modify_analysis`") # noqa: E501
2919
+ check_filename_params(params)
2920
+
2921
+ collection_formats = {}
2922
+
2923
+ path_params = {}
2924
+ if 'analysis_id' in params:
2925
+ path_params['analysis_id'] = params['analysis_id'] # noqa: E501
2926
+
2927
+ query_params = []
2928
+
2929
+ header_params = {}
2930
+
2931
+ form_params = []
2932
+ local_var_files = {}
2933
+
2934
+ body_params = None
2935
+ if 'body' in params:
2936
+ if 'AnalysisModifyInput'.startswith('union'):
2937
+ body_type = type(params['body'])
2938
+ if getattr(body_type, 'positional_to_model', None):
2939
+ body_params = body_type.positional_to_model(params['body'])
2940
+ else:
2941
+ body_params = params['body']
2942
+ else:
2943
+ body_params = flywheel.models.AnalysisModifyInput.positional_to_model(params['body'])
2944
+ # HTTP header `Accept`
2945
+ header_params['Accept'] = self.api_client.select_header_accept(
2946
+ ['application/json']) # noqa: E501
2947
+
2948
+ # HTTP header `Content-Type`
2949
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2950
+ ['application/json']) # noqa: E501
2951
+
2952
+ # Authentication setting
2953
+ auth_settings = ['ApiKey'] # noqa: E501
2954
+
2955
+ return self.api_client.call_api(
2956
+ '/analyses/{analysis_id}', 'PUT',
2957
+ path_params,
2958
+ query_params,
2959
+ header_params,
2960
+ body=body_params,
2961
+ post_params=form_params,
2962
+ files=local_var_files,
2963
+ response_type='ModifiedResult', # noqa: E501
2964
+ auth_settings=auth_settings,
2965
+ async_=params.get('async_'),
2966
+ _return_http_data_only=params.get('_return_http_data_only'),
2967
+ _preload_content=params.get('_preload_content', True),
2968
+ _request_timeout=params.get('_request_timeout'),
2969
+ _request_out=params.get('_request_out'),
2970
+ collection_formats=collection_formats)
2971
+
2972
+ def modify_analysis_file(self, cid, filename, body, **kwargs): # noqa: E501
2973
+ """Modify a file&#x27;s attributes
2974
+
2975
+ Note: If modifying a file's modality, the current classification will be cleared (except for items in the \"Custom\" list)
2976
+ This method makes a synchronous HTTP request by default.
2977
+
2978
+ :param str cid: (required)
2979
+ :param str filename: (required)
2980
+ :param FileModifyInput body: (required)
2981
+ :param bool async_: Perform the request asynchronously
2982
+ :return: ModifiedResult
2983
+ """
2984
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2985
+ kwargs['_return_http_data_only'] = True
2986
+
2987
+ if kwargs.get('async_'):
2988
+ return self.modify_analysis_file_with_http_info(cid, filename, body, **kwargs) # noqa: E501
2989
+ else:
2990
+ (data) = self.modify_analysis_file_with_http_info(cid, filename, body, **kwargs) # noqa: E501
2991
+ if (
2992
+ data
2993
+ and hasattr(data, 'return_value')
2994
+ and not ignore_simplified_return_value
2995
+ ):
2996
+ return data.return_value()
2997
+ return data
2998
+
2999
+
3000
+ def modify_analysis_file_with_http_info(self, cid, filename, body, **kwargs): # noqa: E501
3001
+ """Modify a file&#x27;s attributes
3002
+
3003
+ Note: If modifying a file's modality, the current classification will be cleared (except for items in the \"Custom\" list)
3004
+ This method makes a synchronous HTTP request by default.
3005
+
3006
+ :param str cid: (required)
3007
+ :param str filename: (required)
3008
+ :param FileModifyInput body: (required)
3009
+ :param bool async_: Perform the request asynchronously
3010
+ :return: ModifiedResult
3011
+ """
3012
+
3013
+ all_params = ['cid','filename','body',] # noqa: E501
3014
+ all_params.append('async_')
3015
+ all_params.append('_return_http_data_only')
3016
+ all_params.append('_preload_content')
3017
+ all_params.append('_request_timeout')
3018
+ all_params.append('_request_out')
3019
+
3020
+ params = locals()
3021
+ for key, val in six.iteritems(params['kwargs']):
3022
+ if key not in all_params:
3023
+ raise TypeError(
3024
+ "Got an unexpected keyword argument '%s'"
3025
+ " to method modify_analysis_file" % key
3026
+ )
3027
+ params[key] = val
3028
+ del params['kwargs']
3029
+ # verify the required parameter 'cid' is set
3030
+ if ('cid' not in params or
3031
+ params['cid'] is None):
3032
+ raise ValueError("Missing the required parameter `cid` when calling `modify_analysis_file`") # noqa: E501
3033
+ # verify the required parameter 'filename' is set
3034
+ if ('filename' not in params or
3035
+ params['filename'] is None):
3036
+ raise ValueError("Missing the required parameter `filename` when calling `modify_analysis_file`") # noqa: E501
3037
+ # verify the required parameter 'body' is set
3038
+ if ('body' not in params or
3039
+ params['body'] is None):
3040
+ raise ValueError("Missing the required parameter `body` when calling `modify_analysis_file`") # noqa: E501
3041
+ check_filename_params(params)
3042
+
3043
+ collection_formats = {}
3044
+
3045
+ path_params = {}
3046
+ if 'cid' in params:
3047
+ path_params['cid'] = params['cid'] # noqa: E501
3048
+ if 'filename' in params:
3049
+ path_params['filename'] = params['filename'] # noqa: E501
3050
+
3051
+ query_params = []
3052
+
3053
+ header_params = {}
3054
+
3055
+ form_params = []
3056
+ local_var_files = {}
3057
+
3058
+ body_params = None
3059
+ if 'body' in params:
3060
+ if 'FileModifyInput'.startswith('union'):
3061
+ body_type = type(params['body'])
3062
+ if getattr(body_type, 'positional_to_model', None):
3063
+ body_params = body_type.positional_to_model(params['body'])
3064
+ else:
3065
+ body_params = params['body']
3066
+ else:
3067
+ body_params = flywheel.models.FileModifyInput.positional_to_model(params['body'])
3068
+ # HTTP header `Accept`
3069
+ header_params['Accept'] = self.api_client.select_header_accept(
3070
+ ['application/json']) # noqa: E501
3071
+
3072
+ # HTTP header `Content-Type`
3073
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3074
+ ['application/json']) # noqa: E501
3075
+
3076
+ # Authentication setting
3077
+ auth_settings = ['ApiKey'] # noqa: E501
3078
+
3079
+ return self.api_client.call_api(
3080
+ '/analyses/{cid}/files/{filename}', 'PUT',
3081
+ path_params,
3082
+ query_params,
3083
+ header_params,
3084
+ body=body_params,
3085
+ post_params=form_params,
3086
+ files=local_var_files,
3087
+ response_type='ModifiedResult', # noqa: E501
3088
+ auth_settings=auth_settings,
3089
+ async_=params.get('async_'),
3090
+ _return_http_data_only=params.get('_return_http_data_only'),
3091
+ _preload_content=params.get('_preload_content', True),
3092
+ _request_timeout=params.get('_request_timeout'),
3093
+ _request_out=params.get('_request_out'),
3094
+ collection_formats=collection_formats)
3095
+
3096
+ def modify_analysis_file_classification(self, cid, filename, body, **kwargs): # noqa: E501
3097
+ """Update classification for a particular file.
3098
+
3099
+ If replacing a file's classification, the modality can optionally be modified as well.
3100
+ This method makes a synchronous HTTP request by default.
3101
+
3102
+ :param str cid: (required)
3103
+ :param str filename: (required)
3104
+ :param FileClassificationDelta body: (required)
3105
+ :param bool async_: Perform the request asynchronously
3106
+ :return: ModifiedResult
3107
+ """
3108
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3109
+ kwargs['_return_http_data_only'] = True
3110
+
3111
+ if kwargs.get('async_'):
3112
+ return self.modify_analysis_file_classification_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3113
+ else:
3114
+ (data) = self.modify_analysis_file_classification_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3115
+ if (
3116
+ data
3117
+ and hasattr(data, 'return_value')
3118
+ and not ignore_simplified_return_value
3119
+ ):
3120
+ return data.return_value()
3121
+ return data
3122
+
3123
+
3124
+ def modify_analysis_file_classification_with_http_info(self, cid, filename, body, **kwargs): # noqa: E501
3125
+ """Update classification for a particular file.
3126
+
3127
+ If replacing a file's classification, the modality can optionally be modified as well.
3128
+ This method makes a synchronous HTTP request by default.
3129
+
3130
+ :param str cid: (required)
3131
+ :param str filename: (required)
3132
+ :param FileClassificationDelta body: (required)
3133
+ :param bool async_: Perform the request asynchronously
3134
+ :return: ModifiedResult
3135
+ """
3136
+
3137
+ all_params = ['cid','filename','body',] # noqa: E501
3138
+ all_params.append('async_')
3139
+ all_params.append('_return_http_data_only')
3140
+ all_params.append('_preload_content')
3141
+ all_params.append('_request_timeout')
3142
+ all_params.append('_request_out')
3143
+
3144
+ params = locals()
3145
+ for key, val in six.iteritems(params['kwargs']):
3146
+ if key not in all_params:
3147
+ raise TypeError(
3148
+ "Got an unexpected keyword argument '%s'"
3149
+ " to method modify_analysis_file_classification" % key
3150
+ )
3151
+ params[key] = val
3152
+ del params['kwargs']
3153
+ # verify the required parameter 'cid' is set
3154
+ if ('cid' not in params or
3155
+ params['cid'] is None):
3156
+ raise ValueError("Missing the required parameter `cid` when calling `modify_analysis_file_classification`") # noqa: E501
3157
+ # verify the required parameter 'filename' is set
3158
+ if ('filename' not in params or
3159
+ params['filename'] is None):
3160
+ raise ValueError("Missing the required parameter `filename` when calling `modify_analysis_file_classification`") # noqa: E501
3161
+ # verify the required parameter 'body' is set
3162
+ if ('body' not in params or
3163
+ params['body'] is None):
3164
+ raise ValueError("Missing the required parameter `body` when calling `modify_analysis_file_classification`") # noqa: E501
3165
+ check_filename_params(params)
3166
+
3167
+ collection_formats = {}
3168
+
3169
+ path_params = {}
3170
+ if 'cid' in params:
3171
+ path_params['cid'] = params['cid'] # noqa: E501
3172
+ if 'filename' in params:
3173
+ path_params['filename'] = params['filename'] # noqa: E501
3174
+
3175
+ query_params = []
3176
+
3177
+ header_params = {}
3178
+
3179
+ form_params = []
3180
+ local_var_files = {}
3181
+
3182
+ body_params = None
3183
+ if 'body' in params:
3184
+ if 'FileClassificationDelta'.startswith('union'):
3185
+ body_type = type(params['body'])
3186
+ if getattr(body_type, 'positional_to_model', None):
3187
+ body_params = body_type.positional_to_model(params['body'])
3188
+ else:
3189
+ body_params = params['body']
3190
+ else:
3191
+ body_params = flywheel.models.FileClassificationDelta.positional_to_model(params['body'])
3192
+ # HTTP header `Accept`
3193
+ header_params['Accept'] = self.api_client.select_header_accept(
3194
+ ['application/json']) # noqa: E501
3195
+
3196
+ # HTTP header `Content-Type`
3197
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3198
+ ['application/json']) # noqa: E501
3199
+
3200
+ # Authentication setting
3201
+ auth_settings = ['ApiKey'] # noqa: E501
3202
+
3203
+ return self.api_client.call_api(
3204
+ '/analyses/{cid}/files/{filename}/classification', 'PATCH',
3205
+ path_params,
3206
+ query_params,
3207
+ header_params,
3208
+ body=body_params,
3209
+ post_params=form_params,
3210
+ files=local_var_files,
3211
+ response_type='ModifiedResult', # noqa: E501
3212
+ auth_settings=auth_settings,
3213
+ async_=params.get('async_'),
3214
+ _return_http_data_only=params.get('_return_http_data_only'),
3215
+ _preload_content=params.get('_preload_content', True),
3216
+ _request_timeout=params.get('_request_timeout'),
3217
+ _request_out=params.get('_request_out'),
3218
+ collection_formats=collection_formats)
3219
+
3220
+ def modify_analysis_file_info(self, cid, filename, body, **kwargs): # noqa: E501
3221
+ """Update info for a particular file.
3222
+
3223
+ Modify and return the file 'info' field
3224
+ This method makes a synchronous HTTP request by default.
3225
+
3226
+ :param str cid: (required)
3227
+ :param str filename: (required)
3228
+ :param Info body: (required)
3229
+ :param bool async_: Perform the request asynchronously
3230
+ :return: ModifiedResult
3231
+ """
3232
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3233
+ kwargs['_return_http_data_only'] = True
3234
+
3235
+ if kwargs.get('async_'):
3236
+ return self.modify_analysis_file_info_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3237
+ else:
3238
+ (data) = self.modify_analysis_file_info_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3239
+ if (
3240
+ data
3241
+ and hasattr(data, 'return_value')
3242
+ and not ignore_simplified_return_value
3243
+ ):
3244
+ return data.return_value()
3245
+ return data
3246
+
3247
+
3248
+ def modify_analysis_file_info_with_http_info(self, cid, filename, body, **kwargs): # noqa: E501
3249
+ """Update info for a particular file.
3250
+
3251
+ Modify and return the file 'info' field
3252
+ This method makes a synchronous HTTP request by default.
3253
+
3254
+ :param str cid: (required)
3255
+ :param str filename: (required)
3256
+ :param Info body: (required)
3257
+ :param bool async_: Perform the request asynchronously
3258
+ :return: ModifiedResult
3259
+ """
3260
+
3261
+ all_params = ['cid','filename','body',] # noqa: E501
3262
+ all_params.append('async_')
3263
+ all_params.append('_return_http_data_only')
3264
+ all_params.append('_preload_content')
3265
+ all_params.append('_request_timeout')
3266
+ all_params.append('_request_out')
3267
+
3268
+ params = locals()
3269
+ for key, val in six.iteritems(params['kwargs']):
3270
+ if key not in all_params:
3271
+ raise TypeError(
3272
+ "Got an unexpected keyword argument '%s'"
3273
+ " to method modify_analysis_file_info" % key
3274
+ )
3275
+ params[key] = val
3276
+ del params['kwargs']
3277
+ # verify the required parameter 'cid' is set
3278
+ if ('cid' not in params or
3279
+ params['cid'] is None):
3280
+ raise ValueError("Missing the required parameter `cid` when calling `modify_analysis_file_info`") # noqa: E501
3281
+ # verify the required parameter 'filename' is set
3282
+ if ('filename' not in params or
3283
+ params['filename'] is None):
3284
+ raise ValueError("Missing the required parameter `filename` when calling `modify_analysis_file_info`") # noqa: E501
3285
+ # verify the required parameter 'body' is set
3286
+ if ('body' not in params or
3287
+ params['body'] is None):
3288
+ raise ValueError("Missing the required parameter `body` when calling `modify_analysis_file_info`") # noqa: E501
3289
+ check_filename_params(params)
3290
+
3291
+ collection_formats = {}
3292
+
3293
+ path_params = {}
3294
+ if 'cid' in params:
3295
+ path_params['cid'] = params['cid'] # noqa: E501
3296
+ if 'filename' in params:
3297
+ path_params['filename'] = params['filename'] # noqa: E501
3298
+
3299
+ query_params = []
3300
+
3301
+ header_params = {}
3302
+
3303
+ form_params = []
3304
+ local_var_files = {}
3305
+
3306
+ body_params = None
3307
+ if 'body' in params:
3308
+ if 'Info'.startswith('union'):
3309
+ body_type = type(params['body'])
3310
+ if getattr(body_type, 'positional_to_model', None):
3311
+ body_params = body_type.positional_to_model(params['body'])
3312
+ else:
3313
+ body_params = params['body']
3314
+ else:
3315
+ body_params = flywheel.models.Info.positional_to_model(params['body'])
3316
+ # HTTP header `Accept`
3317
+ header_params['Accept'] = self.api_client.select_header_accept(
3318
+ ['application/json']) # noqa: E501
3319
+
3320
+ # HTTP header `Content-Type`
3321
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3322
+ ['application/json']) # noqa: E501
3323
+
3324
+ # Authentication setting
3325
+ auth_settings = ['ApiKey'] # noqa: E501
3326
+
3327
+ return self.api_client.call_api(
3328
+ '/analyses/{cid}/files/{filename}/info', 'PATCH',
3329
+ path_params,
3330
+ query_params,
3331
+ header_params,
3332
+ body=body_params,
3333
+ post_params=form_params,
3334
+ files=local_var_files,
3335
+ response_type='ModifiedResult', # noqa: E501
3336
+ auth_settings=auth_settings,
3337
+ async_=params.get('async_'),
3338
+ _return_http_data_only=params.get('_return_http_data_only'),
3339
+ _preload_content=params.get('_preload_content', True),
3340
+ _request_timeout=params.get('_request_timeout'),
3341
+ _request_out=params.get('_request_out'),
3342
+ collection_formats=collection_formats)
3343
+
3344
+ def modify_analysis_info(self, container_id, body, **kwargs): # noqa: E501
3345
+ """Update or replace info for a(n) analysis.
3346
+
3347
+ Update or replace info for a(n) analysis. Keys that contain '$' or '.' will be sanitized in the process of being updated on the container.
3348
+ This method makes a synchronous HTTP request by default.
3349
+
3350
+ :param str container_id: (required)
3351
+ :param Info body: (required)
3352
+ :param bool async_: Perform the request asynchronously
3353
+ :return: ModifiedResult
3354
+ """
3355
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3356
+ kwargs['_return_http_data_only'] = True
3357
+
3358
+ if kwargs.get('async_'):
3359
+ return self.modify_analysis_info_with_http_info(container_id, body, **kwargs) # noqa: E501
3360
+ else:
3361
+ (data) = self.modify_analysis_info_with_http_info(container_id, body, **kwargs) # noqa: E501
3362
+ if (
3363
+ data
3364
+ and hasattr(data, 'return_value')
3365
+ and not ignore_simplified_return_value
3366
+ ):
3367
+ return data.return_value()
3368
+ return data
3369
+
3370
+
3371
+ def modify_analysis_info_with_http_info(self, container_id, body, **kwargs): # noqa: E501
3372
+ """Update or replace info for a(n) analysis.
3373
+
3374
+ Update or replace info for a(n) analysis. Keys that contain '$' or '.' will be sanitized in the process of being updated on the container.
3375
+ This method makes a synchronous HTTP request by default.
3376
+
3377
+ :param str container_id: (required)
3378
+ :param Info body: (required)
3379
+ :param bool async_: Perform the request asynchronously
3380
+ :return: ModifiedResult
3381
+ """
3382
+
3383
+ all_params = ['container_id','body',] # noqa: E501
3384
+ all_params.append('async_')
3385
+ all_params.append('_return_http_data_only')
3386
+ all_params.append('_preload_content')
3387
+ all_params.append('_request_timeout')
3388
+ all_params.append('_request_out')
3389
+
3390
+ params = locals()
3391
+ for key, val in six.iteritems(params['kwargs']):
3392
+ if key not in all_params:
3393
+ raise TypeError(
3394
+ "Got an unexpected keyword argument '%s'"
3395
+ " to method modify_analysis_info" % key
3396
+ )
3397
+ params[key] = val
3398
+ del params['kwargs']
3399
+ # verify the required parameter 'container_id' is set
3400
+ if ('container_id' not in params or
3401
+ params['container_id'] is None):
3402
+ raise ValueError("Missing the required parameter `container_id` when calling `modify_analysis_info`") # noqa: E501
3403
+ # verify the required parameter 'body' is set
3404
+ if ('body' not in params or
3405
+ params['body'] is None):
3406
+ raise ValueError("Missing the required parameter `body` when calling `modify_analysis_info`") # noqa: E501
3407
+ check_filename_params(params)
3408
+
3409
+ collection_formats = {}
3410
+
3411
+ path_params = {}
3412
+ if 'container_id' in params:
3413
+ path_params['container_id'] = params['container_id'] # noqa: E501
3414
+
3415
+ query_params = []
3416
+
3417
+ header_params = {}
3418
+
3419
+ form_params = []
3420
+ local_var_files = {}
3421
+
3422
+ body_params = None
3423
+ if 'body' in params:
3424
+ if 'Info'.startswith('union'):
3425
+ body_type = type(params['body'])
3426
+ if getattr(body_type, 'positional_to_model', None):
3427
+ body_params = body_type.positional_to_model(params['body'])
3428
+ else:
3429
+ body_params = params['body']
3430
+ else:
3431
+ body_params = flywheel.models.Info.positional_to_model(params['body'])
3432
+ # HTTP header `Accept`
3433
+ header_params['Accept'] = self.api_client.select_header_accept(
3434
+ ['application/json']) # noqa: E501
3435
+
3436
+ # HTTP header `Content-Type`
3437
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3438
+ ['application/json']) # noqa: E501
3439
+
3440
+ # Authentication setting
3441
+ auth_settings = ['ApiKey'] # noqa: E501
3442
+
3443
+ return self.api_client.call_api(
3444
+ '/analyses/{container_id}/info', 'PATCH',
3445
+ path_params,
3446
+ query_params,
3447
+ header_params,
3448
+ body=body_params,
3449
+ post_params=form_params,
3450
+ files=local_var_files,
3451
+ response_type='ModifiedResult', # noqa: E501
3452
+ auth_settings=auth_settings,
3453
+ async_=params.get('async_'),
3454
+ _return_http_data_only=params.get('_return_http_data_only'),
3455
+ _preload_content=params.get('_preload_content', True),
3456
+ _request_timeout=params.get('_request_timeout'),
3457
+ _request_out=params.get('_request_out'),
3458
+ collection_formats=collection_formats)
3459
+
3460
+ def modify_analysis_note(self, container_id, note_id, body, **kwargs): # noqa: E501
3461
+ """Update a note of a(n) analysis.
3462
+
3463
+ Update a note of a(n) analysis
3464
+ This method makes a synchronous HTTP request by default.
3465
+
3466
+ :param str container_id: (required)
3467
+ :param str note_id: (required)
3468
+ :param NoteInput body: (required)
3469
+ :param bool async_: Perform the request asynchronously
3470
+ :return: int
3471
+ """
3472
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3473
+ kwargs['_return_http_data_only'] = True
3474
+
3475
+ if kwargs.get('async_'):
3476
+ return self.modify_analysis_note_with_http_info(container_id, note_id, body, **kwargs) # noqa: E501
3477
+ else:
3478
+ (data) = self.modify_analysis_note_with_http_info(container_id, note_id, body, **kwargs) # noqa: E501
3479
+ if (
3480
+ data
3481
+ and hasattr(data, 'return_value')
3482
+ and not ignore_simplified_return_value
3483
+ ):
3484
+ return data.return_value()
3485
+ return data
3486
+
3487
+
3488
+ def modify_analysis_note_with_http_info(self, container_id, note_id, body, **kwargs): # noqa: E501
3489
+ """Update a note of a(n) analysis.
3490
+
3491
+ Update a note of a(n) analysis
3492
+ This method makes a synchronous HTTP request by default.
3493
+
3494
+ :param str container_id: (required)
3495
+ :param str note_id: (required)
3496
+ :param NoteInput body: (required)
3497
+ :param bool async_: Perform the request asynchronously
3498
+ :return: int
3499
+ """
3500
+
3501
+ all_params = ['container_id','note_id','body',] # noqa: E501
3502
+ all_params.append('async_')
3503
+ all_params.append('_return_http_data_only')
3504
+ all_params.append('_preload_content')
3505
+ all_params.append('_request_timeout')
3506
+ all_params.append('_request_out')
3507
+
3508
+ params = locals()
3509
+ for key, val in six.iteritems(params['kwargs']):
3510
+ if key not in all_params:
3511
+ raise TypeError(
3512
+ "Got an unexpected keyword argument '%s'"
3513
+ " to method modify_analysis_note" % key
3514
+ )
3515
+ params[key] = val
3516
+ del params['kwargs']
3517
+ # verify the required parameter 'container_id' is set
3518
+ if ('container_id' not in params or
3519
+ params['container_id'] is None):
3520
+ raise ValueError("Missing the required parameter `container_id` when calling `modify_analysis_note`") # noqa: E501
3521
+ # verify the required parameter 'note_id' is set
3522
+ if ('note_id' not in params or
3523
+ params['note_id'] is None):
3524
+ raise ValueError("Missing the required parameter `note_id` when calling `modify_analysis_note`") # noqa: E501
3525
+ # verify the required parameter 'body' is set
3526
+ if ('body' not in params or
3527
+ params['body'] is None):
3528
+ raise ValueError("Missing the required parameter `body` when calling `modify_analysis_note`") # noqa: E501
3529
+ check_filename_params(params)
3530
+
3531
+ collection_formats = {}
3532
+
3533
+ path_params = {}
3534
+ if 'container_id' in params:
3535
+ path_params['container_id'] = params['container_id'] # noqa: E501
3536
+ if 'note_id' in params:
3537
+ path_params['note_id'] = params['note_id'] # noqa: E501
3538
+
3539
+ query_params = []
3540
+
3541
+ header_params = {}
3542
+
3543
+ form_params = []
3544
+ local_var_files = {}
3545
+
3546
+ body_params = None
3547
+ if 'body' in params:
3548
+ if 'NoteInput'.startswith('union'):
3549
+ body_type = type(params['body'])
3550
+ if getattr(body_type, 'positional_to_model', None):
3551
+ body_params = body_type.positional_to_model(params['body'])
3552
+ else:
3553
+ body_params = params['body']
3554
+ else:
3555
+ body_params = flywheel.models.NoteInput.positional_to_model(params['body'])
3556
+ # HTTP header `Accept`
3557
+ header_params['Accept'] = self.api_client.select_header_accept(
3558
+ ['application/json']) # noqa: E501
3559
+
3560
+ # HTTP header `Content-Type`
3561
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3562
+ ['application/json']) # noqa: E501
3563
+
3564
+ # Authentication setting
3565
+ auth_settings = ['ApiKey'] # noqa: E501
3566
+
3567
+ return self.api_client.call_api(
3568
+ '/analyses/{container_id}/notes/{note_id}', 'PUT',
3569
+ path_params,
3570
+ query_params,
3571
+ header_params,
3572
+ body=body_params,
3573
+ post_params=form_params,
3574
+ files=local_var_files,
3575
+ response_type='int', # noqa: E501
3576
+ auth_settings=auth_settings,
3577
+ async_=params.get('async_'),
3578
+ _return_http_data_only=params.get('_return_http_data_only'),
3579
+ _preload_content=params.get('_preload_content', True),
3580
+ _request_timeout=params.get('_request_timeout'),
3581
+ _request_out=params.get('_request_out'),
3582
+ collection_formats=collection_formats)
3583
+
3584
+ def rename_analysis_tag(self, container_id, value, body, **kwargs): # noqa: E501
3585
+ """Rename a tag.
3586
+
3587
+ Rename a tag
3588
+ This method makes a synchronous HTTP request by default.
3589
+
3590
+ :param str container_id: (required)
3591
+ :param str value: The tag to interact with (required)
3592
+ :param Tag body: (required)
3593
+ :param bool async_: Perform the request asynchronously
3594
+ :return: str
3595
+ """
3596
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3597
+ kwargs['_return_http_data_only'] = True
3598
+
3599
+ if kwargs.get('async_'):
3600
+ return self.rename_analysis_tag_with_http_info(container_id, value, body, **kwargs) # noqa: E501
3601
+ else:
3602
+ (data) = self.rename_analysis_tag_with_http_info(container_id, value, body, **kwargs) # noqa: E501
3603
+ if (
3604
+ data
3605
+ and hasattr(data, 'return_value')
3606
+ and not ignore_simplified_return_value
3607
+ ):
3608
+ return data.return_value()
3609
+ return data
3610
+
3611
+
3612
+ def rename_analysis_tag_with_http_info(self, container_id, value, body, **kwargs): # noqa: E501
3613
+ """Rename a tag.
3614
+
3615
+ Rename a tag
3616
+ This method makes a synchronous HTTP request by default.
3617
+
3618
+ :param str container_id: (required)
3619
+ :param str value: The tag to interact with (required)
3620
+ :param Tag body: (required)
3621
+ :param bool async_: Perform the request asynchronously
3622
+ :return: str
3623
+ """
3624
+
3625
+ all_params = ['container_id','value','body',] # noqa: E501
3626
+ all_params.append('async_')
3627
+ all_params.append('_return_http_data_only')
3628
+ all_params.append('_preload_content')
3629
+ all_params.append('_request_timeout')
3630
+ all_params.append('_request_out')
3631
+
3632
+ params = locals()
3633
+ for key, val in six.iteritems(params['kwargs']):
3634
+ if key not in all_params:
3635
+ raise TypeError(
3636
+ "Got an unexpected keyword argument '%s'"
3637
+ " to method rename_analysis_tag" % key
3638
+ )
3639
+ params[key] = val
3640
+ del params['kwargs']
3641
+ # verify the required parameter 'container_id' is set
3642
+ if ('container_id' not in params or
3643
+ params['container_id'] is None):
3644
+ raise ValueError("Missing the required parameter `container_id` when calling `rename_analysis_tag`") # noqa: E501
3645
+ # verify the required parameter 'value' is set
3646
+ if ('value' not in params or
3647
+ params['value'] is None):
3648
+ raise ValueError("Missing the required parameter `value` when calling `rename_analysis_tag`") # noqa: E501
3649
+ # verify the required parameter 'body' is set
3650
+ if ('body' not in params or
3651
+ params['body'] is None):
3652
+ raise ValueError("Missing the required parameter `body` when calling `rename_analysis_tag`") # noqa: E501
3653
+ check_filename_params(params)
3654
+
3655
+ collection_formats = {}
3656
+
3657
+ path_params = {}
3658
+ if 'container_id' in params:
3659
+ path_params['container_id'] = params['container_id'] # noqa: E501
3660
+ if 'value' in params:
3661
+ path_params['value'] = params['value'] # noqa: E501
3662
+
3663
+ query_params = []
3664
+
3665
+ header_params = {}
3666
+
3667
+ form_params = []
3668
+ local_var_files = {}
3669
+
3670
+ body_params = None
3671
+ if 'body' in params:
3672
+ if 'Tag'.startswith('union'):
3673
+ body_type = type(params['body'])
3674
+ if getattr(body_type, 'positional_to_model', None):
3675
+ body_params = body_type.positional_to_model(params['body'])
3676
+ else:
3677
+ body_params = params['body']
3678
+ else:
3679
+ body_params = flywheel.models.Tag.positional_to_model(params['body'])
3680
+ # HTTP header `Accept`
3681
+ header_params['Accept'] = self.api_client.select_header_accept(
3682
+ ['application/json']) # noqa: E501
3683
+
3684
+ # HTTP header `Content-Type`
3685
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3686
+ ['application/json']) # noqa: E501
3687
+
3688
+ # Authentication setting
3689
+ auth_settings = ['ApiKey'] # noqa: E501
3690
+
3691
+ return self.api_client.call_api(
3692
+ '/analyses/{container_id}/tags/{value}', 'PUT',
3693
+ path_params,
3694
+ query_params,
3695
+ header_params,
3696
+ body=body_params,
3697
+ post_params=form_params,
3698
+ files=local_var_files,
3699
+ response_type='str', # noqa: E501
3700
+ auth_settings=auth_settings,
3701
+ async_=params.get('async_'),
3702
+ _return_http_data_only=params.get('_return_http_data_only'),
3703
+ _preload_content=params.get('_preload_content', True),
3704
+ _request_timeout=params.get('_request_timeout'),
3705
+ _request_out=params.get('_request_out'),
3706
+ collection_formats=collection_formats)
3707
+
3708
+ def upload_output_to_analysis(self, container_id, file, **kwargs): # noqa: E501
3709
+ """Upload an output file to an analysis.
3710
+
3711
+ Upload an output file to an analysis
3712
+ This method makes a synchronous HTTP request by default.
3713
+
3714
+ :param str container_id: (required)
3715
+ :param str file: The file to upload (required)
3716
+ :param str ticket:
3717
+ :param bool preserve_metadata:
3718
+ :param str id:
3719
+ :param ContainerType level:
3720
+ :param str job:
3721
+ :param object metadata: Dictionary of file metadata (type, modality, info, etc.)
3722
+ :param list[str] x_accept_feature: redirect header
3723
+ :param str content_type:
3724
+ :param bool async_: Perform the request asynchronously
3725
+ :return: union[list[FileOutput],UploadTicketOutput]
3726
+ """
3727
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3728
+ kwargs['_return_http_data_only'] = True
3729
+
3730
+ if kwargs.get('async_'):
3731
+ return self.upload_output_to_analysis_with_http_info(container_id, file, **kwargs) # noqa: E501
3732
+ else:
3733
+ (data) = self.upload_output_to_analysis_with_http_info(container_id, file, **kwargs) # noqa: E501
3734
+ if (
3735
+ data
3736
+ and hasattr(data, 'return_value')
3737
+ and not ignore_simplified_return_value
3738
+ ):
3739
+ return data.return_value()
3740
+ return data
3741
+
3742
+
3743
+ def upload_output_to_analysis_with_http_info(self, container_id, file, **kwargs): # noqa: E501
3744
+ """Upload an output file to an analysis.
3745
+
3746
+ Upload an output file to an analysis
3747
+ This method makes a synchronous HTTP request by default.
3748
+
3749
+ :param str container_id: (required)
3750
+ :param str file: The file to upload (required)
3751
+ :param str ticket:
3752
+ :param bool preserve_metadata:
3753
+ :param str id:
3754
+ :param ContainerType level:
3755
+ :param str job:
3756
+ :param object metadata: Dictionary of file metadata (type, modality, info, etc.)
3757
+ :param list[str] x_accept_feature: redirect header
3758
+ :param str content_type:
3759
+ :param bool async_: Perform the request asynchronously
3760
+ :return: union[list[FileOutput],UploadTicketOutput]
3761
+ """
3762
+
3763
+ all_params = ['container_id','file','ticket','preserve_metadata','id','level','job','metadata','x_accept_feature','content_type',] # noqa: E501
3764
+ all_params.append('async_')
3765
+ all_params.append('_return_http_data_only')
3766
+ all_params.append('_preload_content')
3767
+ all_params.append('_request_timeout')
3768
+ all_params.append('_request_out')
3769
+
3770
+ params = locals()
3771
+ for key, val in six.iteritems(params['kwargs']):
3772
+ if key not in all_params:
3773
+ raise TypeError(
3774
+ "Got an unexpected keyword argument '%s'"
3775
+ " to method upload_output_to_analysis" % key
3776
+ )
3777
+ params[key] = val
3778
+ del params['kwargs']
3779
+ # verify the required parameter 'container_id' is set
3780
+ if ('container_id' not in params or
3781
+ params['container_id'] is None):
3782
+ raise ValueError("Missing the required parameter `container_id` when calling `upload_output_to_analysis`") # noqa: E501
3783
+ # verify the required parameter 'file' is set
3784
+ if ('file' not in params or
3785
+ params['file'] is None):
3786
+ raise ValueError("Missing the required parameter `file` when calling `upload_output_to_analysis`") # noqa: E501
3787
+ check_filename_params(params)
3788
+
3789
+ collection_formats = {}
3790
+
3791
+ path_params = {}
3792
+ if 'container_id' in params:
3793
+ path_params['container_id'] = params['container_id'] # noqa: E501
3794
+
3795
+ query_params = []
3796
+ if 'ticket' in params:
3797
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
3798
+ if 'preserve_metadata' in params:
3799
+ query_params.append(('preserve_metadata', params['preserve_metadata'])) # noqa: E501
3800
+ if 'id' in params:
3801
+ query_params.append(('id', params['id'])) # noqa: E501
3802
+ if 'level' in params:
3803
+ query_params.append(('level', params['level'])) # noqa: E501
3804
+ if 'job' in params:
3805
+ query_params.append(('job', params['job'])) # noqa: E501
3806
+
3807
+ header_params = {}
3808
+ if 'x_accept_feature' in params:
3809
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
3810
+ collection_formats['x-accept-feature'] = '' # noqa: E501
3811
+ if 'content_type' in params:
3812
+ header_params['content-type'] = params['content_type'] # noqa: E501
3813
+
3814
+ form_params = []
3815
+ local_var_files = {}
3816
+ if 'file' in params:
3817
+ local_var_files['file'] = params['file'] # noqa: E501
3818
+ if 'metadata' in params:
3819
+ form_params.append(('metadata', params['metadata'])) # noqa: E501
3820
+
3821
+ body_params = None
3822
+ # HTTP header `Accept`
3823
+ header_params['Accept'] = self.api_client.select_header_accept(
3824
+ ['application/json']) # noqa: E501
3825
+
3826
+ # HTTP header `Content-Type`
3827
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3828
+ ['multipart/form-data']) # noqa: E501
3829
+
3830
+ # Authentication setting
3831
+ auth_settings = ['ApiKey'] # noqa: E501
3832
+
3833
+ return self.api_client.call_api(
3834
+ '/analyses/{container_id}/files', 'POST',
3835
+ path_params,
3836
+ query_params,
3837
+ header_params,
3838
+ body=body_params,
3839
+ post_params=form_params,
3840
+ files=local_var_files,
3841
+ response_type='union[list[FileOutput],UploadTicketOutput]', # noqa: E501
3842
+ auth_settings=auth_settings,
3843
+ async_=params.get('async_'),
3844
+ _return_http_data_only=params.get('_return_http_data_only'),
3845
+ _preload_content=params.get('_preload_content', True),
3846
+ _request_timeout=params.get('_request_timeout'),
3847
+ _request_out=params.get('_request_out'),
3848
+ collection_formats=collection_formats)