flywheel-sdk 21.2.0rc0__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.0rc0.dist-info/METADATA +41 -0
  770. flywheel_sdk-21.2.0rc0.dist-info/RECORD +772 -0
  771. flywheel_sdk-21.2.0rc0.dist-info/WHEEL +4 -0
  772. flywheel_sdk-21.2.0rc0.dist-info/licenses/LICENSE.txt +18 -0
@@ -0,0 +1,3913 @@
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 CollectionsApi(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_collection(self, body, **kwargs): # noqa: E501
35
+ """Create a collection
36
+
37
+ Create a collection
38
+ This method makes a synchronous HTTP request by default.
39
+
40
+ :param CollectionInput body: (required)
41
+ :param bool async_: Perform the request asynchronously
42
+ :return: InsertedId
43
+ """
44
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
45
+ kwargs['_return_http_data_only'] = True
46
+
47
+ if kwargs.get('async_'):
48
+ return self.add_collection_with_http_info(body, **kwargs) # noqa: E501
49
+ else:
50
+ (data) = self.add_collection_with_http_info(body, **kwargs) # noqa: E501
51
+ if (
52
+ data
53
+ and hasattr(data, 'return_value')
54
+ and not ignore_simplified_return_value
55
+ ):
56
+ return data.return_value()
57
+ return data
58
+
59
+
60
+ def add_collection_with_http_info(self, body, **kwargs): # noqa: E501
61
+ """Create a collection
62
+
63
+ Create a collection
64
+ This method makes a synchronous HTTP request by default.
65
+
66
+ :param CollectionInput body: (required)
67
+ :param bool async_: Perform the request asynchronously
68
+ :return: InsertedId
69
+ """
70
+
71
+ all_params = ['body',] # noqa: E501
72
+ all_params.append('async_')
73
+ all_params.append('_return_http_data_only')
74
+ all_params.append('_preload_content')
75
+ all_params.append('_request_timeout')
76
+ all_params.append('_request_out')
77
+
78
+ params = locals()
79
+ for key, val in six.iteritems(params['kwargs']):
80
+ if key not in all_params:
81
+ raise TypeError(
82
+ "Got an unexpected keyword argument '%s'"
83
+ " to method add_collection" % key
84
+ )
85
+ params[key] = val
86
+ del params['kwargs']
87
+ # verify the required parameter 'body' is set
88
+ if ('body' not in params or
89
+ params['body'] is None):
90
+ raise ValueError("Missing the required parameter `body` when calling `add_collection`") # noqa: E501
91
+ check_filename_params(params)
92
+
93
+ collection_formats = {}
94
+
95
+ path_params = {}
96
+
97
+ query_params = []
98
+
99
+ header_params = {}
100
+
101
+ form_params = []
102
+ local_var_files = {}
103
+
104
+ body_params = None
105
+ if 'body' in params:
106
+ if 'CollectionInput'.startswith('union'):
107
+ body_type = type(params['body'])
108
+ if getattr(body_type, 'positional_to_model', None):
109
+ body_params = body_type.positional_to_model(params['body'])
110
+ else:
111
+ body_params = params['body']
112
+ else:
113
+ body_params = flywheel.models.CollectionInput.positional_to_model(params['body'])
114
+ # HTTP header `Accept`
115
+ header_params['Accept'] = self.api_client.select_header_accept(
116
+ ['application/json']) # noqa: E501
117
+
118
+ # HTTP header `Content-Type`
119
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
120
+ ['application/json']) # noqa: E501
121
+
122
+ # Authentication setting
123
+ auth_settings = ['ApiKey'] # noqa: E501
124
+
125
+ return self.api_client.call_api(
126
+ '/collections', 'POST',
127
+ path_params,
128
+ query_params,
129
+ header_params,
130
+ body=body_params,
131
+ post_params=form_params,
132
+ files=local_var_files,
133
+ response_type='InsertedId', # noqa: E501
134
+ auth_settings=auth_settings,
135
+ async_=params.get('async_'),
136
+ _return_http_data_only=params.get('_return_http_data_only'),
137
+ _preload_content=params.get('_preload_content', True),
138
+ _request_timeout=params.get('_request_timeout'),
139
+ _request_out=params.get('_request_out'),
140
+ collection_formats=collection_formats)
141
+
142
+ def add_collection_note(self, container_id, body, **kwargs): # noqa: E501
143
+ """Add a note to a(n) collection.
144
+
145
+ Add a note to a(n) collection.
146
+ This method makes a synchronous HTTP request by default.
147
+
148
+ :param str container_id: (required)
149
+ :param NoteInput body: (required)
150
+ :param bool async_: Perform the request asynchronously
151
+ :return: Note
152
+ """
153
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
154
+ kwargs['_return_http_data_only'] = True
155
+
156
+ if kwargs.get('async_'):
157
+ return self.add_collection_note_with_http_info(container_id, body, **kwargs) # noqa: E501
158
+ else:
159
+ (data) = self.add_collection_note_with_http_info(container_id, body, **kwargs) # noqa: E501
160
+ if (
161
+ data
162
+ and hasattr(data, 'return_value')
163
+ and not ignore_simplified_return_value
164
+ ):
165
+ return data.return_value()
166
+ return data
167
+
168
+
169
+ def add_collection_note_with_http_info(self, container_id, body, **kwargs): # noqa: E501
170
+ """Add a note to a(n) collection.
171
+
172
+ Add a note to a(n) collection.
173
+ This method makes a synchronous HTTP request by default.
174
+
175
+ :param str container_id: (required)
176
+ :param NoteInput body: (required)
177
+ :param bool async_: Perform the request asynchronously
178
+ :return: Note
179
+ """
180
+
181
+ all_params = ['container_id','body',] # noqa: E501
182
+ all_params.append('async_')
183
+ all_params.append('_return_http_data_only')
184
+ all_params.append('_preload_content')
185
+ all_params.append('_request_timeout')
186
+ all_params.append('_request_out')
187
+
188
+ params = locals()
189
+ for key, val in six.iteritems(params['kwargs']):
190
+ if key not in all_params:
191
+ raise TypeError(
192
+ "Got an unexpected keyword argument '%s'"
193
+ " to method add_collection_note" % key
194
+ )
195
+ params[key] = val
196
+ del params['kwargs']
197
+ # verify the required parameter 'container_id' is set
198
+ if ('container_id' not in params or
199
+ params['container_id'] is None):
200
+ raise ValueError("Missing the required parameter `container_id` when calling `add_collection_note`") # noqa: E501
201
+ # verify the required parameter 'body' is set
202
+ if ('body' not in params or
203
+ params['body'] is None):
204
+ raise ValueError("Missing the required parameter `body` when calling `add_collection_note`") # noqa: E501
205
+ check_filename_params(params)
206
+
207
+ collection_formats = {}
208
+
209
+ path_params = {}
210
+ if 'container_id' in params:
211
+ path_params['container_id'] = params['container_id'] # noqa: E501
212
+
213
+ query_params = []
214
+
215
+ header_params = {}
216
+
217
+ form_params = []
218
+ local_var_files = {}
219
+
220
+ body_params = None
221
+ if 'body' in params:
222
+ if 'NoteInput'.startswith('union'):
223
+ body_type = type(params['body'])
224
+ if getattr(body_type, 'positional_to_model', None):
225
+ body_params = body_type.positional_to_model(params['body'])
226
+ else:
227
+ body_params = params['body']
228
+ else:
229
+ body_params = flywheel.models.NoteInput.positional_to_model(params['body'])
230
+ # HTTP header `Accept`
231
+ header_params['Accept'] = self.api_client.select_header_accept(
232
+ ['application/json']) # noqa: E501
233
+
234
+ # HTTP header `Content-Type`
235
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
236
+ ['application/json']) # noqa: E501
237
+
238
+ # Authentication setting
239
+ auth_settings = ['ApiKey'] # noqa: E501
240
+
241
+ return self.api_client.call_api(
242
+ '/collections/{container_id}/notes', 'POST',
243
+ path_params,
244
+ query_params,
245
+ header_params,
246
+ body=body_params,
247
+ post_params=form_params,
248
+ files=local_var_files,
249
+ response_type='Note', # noqa: E501
250
+ auth_settings=auth_settings,
251
+ async_=params.get('async_'),
252
+ _return_http_data_only=params.get('_return_http_data_only'),
253
+ _preload_content=params.get('_preload_content', True),
254
+ _request_timeout=params.get('_request_timeout'),
255
+ _request_out=params.get('_request_out'),
256
+ collection_formats=collection_formats)
257
+
258
+ def add_collection_permission(self, collection_id, body, **kwargs): # noqa: E501
259
+ """Add a permission
260
+
261
+ Add a permission
262
+ This method makes a synchronous HTTP request by default.
263
+
264
+ :param str collection_id: (required)
265
+ :param AccessPermission body: (required)
266
+ :param bool async_: Perform the request asynchronously
267
+ :return: AccessPermissionOutput
268
+ """
269
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
270
+ kwargs['_return_http_data_only'] = True
271
+
272
+ if kwargs.get('async_'):
273
+ return self.add_collection_permission_with_http_info(collection_id, body, **kwargs) # noqa: E501
274
+ else:
275
+ (data) = self.add_collection_permission_with_http_info(collection_id, body, **kwargs) # noqa: E501
276
+ if (
277
+ data
278
+ and hasattr(data, 'return_value')
279
+ and not ignore_simplified_return_value
280
+ ):
281
+ return data.return_value()
282
+ return data
283
+
284
+
285
+ def add_collection_permission_with_http_info(self, collection_id, body, **kwargs): # noqa: E501
286
+ """Add a permission
287
+
288
+ Add a permission
289
+ This method makes a synchronous HTTP request by default.
290
+
291
+ :param str collection_id: (required)
292
+ :param AccessPermission body: (required)
293
+ :param bool async_: Perform the request asynchronously
294
+ :return: AccessPermissionOutput
295
+ """
296
+
297
+ all_params = ['collection_id','body',] # noqa: E501
298
+ all_params.append('async_')
299
+ all_params.append('_return_http_data_only')
300
+ all_params.append('_preload_content')
301
+ all_params.append('_request_timeout')
302
+ all_params.append('_request_out')
303
+
304
+ params = locals()
305
+ for key, val in six.iteritems(params['kwargs']):
306
+ if key not in all_params:
307
+ raise TypeError(
308
+ "Got an unexpected keyword argument '%s'"
309
+ " to method add_collection_permission" % key
310
+ )
311
+ params[key] = val
312
+ del params['kwargs']
313
+ # verify the required parameter 'collection_id' is set
314
+ if ('collection_id' not in params or
315
+ params['collection_id'] is None):
316
+ raise ValueError("Missing the required parameter `collection_id` when calling `add_collection_permission`") # noqa: E501
317
+ # verify the required parameter 'body' is set
318
+ if ('body' not in params or
319
+ params['body'] is None):
320
+ raise ValueError("Missing the required parameter `body` when calling `add_collection_permission`") # noqa: E501
321
+ check_filename_params(params)
322
+
323
+ collection_formats = {}
324
+
325
+ path_params = {}
326
+ if 'collection_id' in params:
327
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
328
+
329
+ query_params = []
330
+
331
+ header_params = {}
332
+
333
+ form_params = []
334
+ local_var_files = {}
335
+
336
+ body_params = None
337
+ if 'body' in params:
338
+ if 'AccessPermission'.startswith('union'):
339
+ body_type = type(params['body'])
340
+ if getattr(body_type, 'positional_to_model', None):
341
+ body_params = body_type.positional_to_model(params['body'])
342
+ else:
343
+ body_params = params['body']
344
+ else:
345
+ body_params = flywheel.models.AccessPermission.positional_to_model(params['body'])
346
+ # HTTP header `Accept`
347
+ header_params['Accept'] = self.api_client.select_header_accept(
348
+ ['application/json']) # noqa: E501
349
+
350
+ # HTTP header `Content-Type`
351
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
352
+ ['application/json']) # noqa: E501
353
+
354
+ # Authentication setting
355
+ auth_settings = ['ApiKey'] # noqa: E501
356
+
357
+ return self.api_client.call_api(
358
+ '/collections/{collection_id}/permissions', 'POST',
359
+ path_params,
360
+ query_params,
361
+ header_params,
362
+ body=body_params,
363
+ post_params=form_params,
364
+ files=local_var_files,
365
+ response_type='AccessPermissionOutput', # noqa: E501
366
+ auth_settings=auth_settings,
367
+ async_=params.get('async_'),
368
+ _return_http_data_only=params.get('_return_http_data_only'),
369
+ _preload_content=params.get('_preload_content', True),
370
+ _request_timeout=params.get('_request_timeout'),
371
+ _request_out=params.get('_request_out'),
372
+ collection_formats=collection_formats)
373
+
374
+ def add_collection_tag(self, cid, body, **kwargs): # noqa: E501
375
+ """Add a tag to a(n) collection.
376
+
377
+ Propagates changes to projects, sessions and acquisitions
378
+ This method makes a synchronous HTTP request by default.
379
+
380
+ :param str cid: (required)
381
+ :param Tag body: (required)
382
+ :param bool async_: Perform the request asynchronously
383
+ :return: ModifiedResult
384
+ """
385
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
386
+ kwargs['_return_http_data_only'] = True
387
+
388
+ if kwargs.get('async_'):
389
+ return self.add_collection_tag_with_http_info(cid, body, **kwargs) # noqa: E501
390
+ else:
391
+ (data) = self.add_collection_tag_with_http_info(cid, body, **kwargs) # noqa: E501
392
+ if (
393
+ data
394
+ and hasattr(data, 'return_value')
395
+ and not ignore_simplified_return_value
396
+ ):
397
+ return data.return_value()
398
+ return data
399
+
400
+
401
+ def add_collection_tag_with_http_info(self, cid, body, **kwargs): # noqa: E501
402
+ """Add a tag to a(n) collection.
403
+
404
+ Propagates changes to projects, sessions and acquisitions
405
+ This method makes a synchronous HTTP request by default.
406
+
407
+ :param str cid: (required)
408
+ :param Tag body: (required)
409
+ :param bool async_: Perform the request asynchronously
410
+ :return: ModifiedResult
411
+ """
412
+
413
+ all_params = ['cid','body',] # noqa: E501
414
+ all_params.append('async_')
415
+ all_params.append('_return_http_data_only')
416
+ all_params.append('_preload_content')
417
+ all_params.append('_request_timeout')
418
+ all_params.append('_request_out')
419
+
420
+ params = locals()
421
+ for key, val in six.iteritems(params['kwargs']):
422
+ if key not in all_params:
423
+ raise TypeError(
424
+ "Got an unexpected keyword argument '%s'"
425
+ " to method add_collection_tag" % key
426
+ )
427
+ params[key] = val
428
+ del params['kwargs']
429
+ # verify the required parameter 'cid' is set
430
+ if ('cid' not in params or
431
+ params['cid'] is None):
432
+ raise ValueError("Missing the required parameter `cid` when calling `add_collection_tag`") # noqa: E501
433
+ # verify the required parameter 'body' is set
434
+ if ('body' not in params or
435
+ params['body'] is None):
436
+ raise ValueError("Missing the required parameter `body` when calling `add_collection_tag`") # noqa: E501
437
+ check_filename_params(params)
438
+
439
+ collection_formats = {}
440
+
441
+ path_params = {}
442
+ if 'cid' in params:
443
+ path_params['cid'] = params['cid'] # noqa: E501
444
+
445
+ query_params = []
446
+
447
+ header_params = {}
448
+
449
+ form_params = []
450
+ local_var_files = {}
451
+
452
+ body_params = None
453
+ if 'body' in params:
454
+ if 'Tag'.startswith('union'):
455
+ body_type = type(params['body'])
456
+ if getattr(body_type, 'positional_to_model', None):
457
+ body_params = body_type.positional_to_model(params['body'])
458
+ else:
459
+ body_params = params['body']
460
+ else:
461
+ body_params = flywheel.models.Tag.positional_to_model(params['body'])
462
+ # HTTP header `Accept`
463
+ header_params['Accept'] = self.api_client.select_header_accept(
464
+ ['application/json']) # noqa: E501
465
+
466
+ # HTTP header `Content-Type`
467
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
468
+ ['application/json']) # noqa: E501
469
+
470
+ # Authentication setting
471
+ auth_settings = ['ApiKey'] # noqa: E501
472
+
473
+ return self.api_client.call_api(
474
+ '/collections/{cid}/tags', 'POST',
475
+ path_params,
476
+ query_params,
477
+ header_params,
478
+ body=body_params,
479
+ post_params=form_params,
480
+ files=local_var_files,
481
+ response_type='ModifiedResult', # noqa: E501
482
+ auth_settings=auth_settings,
483
+ async_=params.get('async_'),
484
+ _return_http_data_only=params.get('_return_http_data_only'),
485
+ _preload_content=params.get('_preload_content', True),
486
+ _request_timeout=params.get('_request_timeout'),
487
+ _request_out=params.get('_request_out'),
488
+ collection_formats=collection_formats)
489
+
490
+ def add_collection_tags(self, cid, body, **kwargs): # noqa: E501
491
+ """Add multiple tags to a(n) collection
492
+
493
+ Add multiple tags to a(n) collection
494
+ This method makes a synchronous HTTP request by default.
495
+
496
+ :param str cid: (required)
497
+ :param list[str] body: (required)
498
+ :param bool async_: Perform the request asynchronously
499
+ :return: None
500
+ """
501
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
502
+ kwargs['_return_http_data_only'] = True
503
+
504
+ if kwargs.get('async_'):
505
+ return self.add_collection_tags_with_http_info(cid, body, **kwargs) # noqa: E501
506
+ else:
507
+ (data) = self.add_collection_tags_with_http_info(cid, body, **kwargs) # noqa: E501
508
+ if (
509
+ data
510
+ and hasattr(data, 'return_value')
511
+ and not ignore_simplified_return_value
512
+ ):
513
+ return data.return_value()
514
+ return data
515
+
516
+
517
+ def add_collection_tags_with_http_info(self, cid, body, **kwargs): # noqa: E501
518
+ """Add multiple tags to a(n) collection
519
+
520
+ Add multiple tags to a(n) collection
521
+ This method makes a synchronous HTTP request by default.
522
+
523
+ :param str cid: (required)
524
+ :param list[str] body: (required)
525
+ :param bool async_: Perform the request asynchronously
526
+ :return: None
527
+ """
528
+
529
+ all_params = ['cid','body',] # noqa: E501
530
+ all_params.append('async_')
531
+ all_params.append('_return_http_data_only')
532
+ all_params.append('_preload_content')
533
+ all_params.append('_request_timeout')
534
+ all_params.append('_request_out')
535
+
536
+ params = locals()
537
+ for key, val in six.iteritems(params['kwargs']):
538
+ if key not in all_params:
539
+ raise TypeError(
540
+ "Got an unexpected keyword argument '%s'"
541
+ " to method add_collection_tags" % key
542
+ )
543
+ params[key] = val
544
+ del params['kwargs']
545
+ # verify the required parameter 'cid' is set
546
+ if ('cid' not in params or
547
+ params['cid'] is None):
548
+ raise ValueError("Missing the required parameter `cid` when calling `add_collection_tags`") # noqa: E501
549
+ # verify the required parameter 'body' is set
550
+ if ('body' not in params or
551
+ params['body'] is None):
552
+ raise ValueError("Missing the required parameter `body` when calling `add_collection_tags`") # noqa: E501
553
+ check_filename_params(params)
554
+
555
+ collection_formats = {}
556
+
557
+ path_params = {}
558
+ if 'cid' in params:
559
+ path_params['cid'] = params['cid'] # noqa: E501
560
+
561
+ query_params = []
562
+
563
+ header_params = {}
564
+
565
+ form_params = []
566
+ local_var_files = {}
567
+
568
+ body_params = None
569
+ if 'body' in params:
570
+ body_params = params['body']
571
+ # HTTP header `Accept`
572
+ header_params['Accept'] = self.api_client.select_header_accept(
573
+ ['application/json']) # noqa: E501
574
+
575
+ # HTTP header `Content-Type`
576
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
577
+ ['application/json']) # noqa: E501
578
+
579
+ # Authentication setting
580
+ auth_settings = ['ApiKey'] # noqa: E501
581
+
582
+ return self.api_client.call_api(
583
+ '/collections/{cid}/tags', 'PATCH',
584
+ path_params,
585
+ query_params,
586
+ header_params,
587
+ body=body_params,
588
+ post_params=form_params,
589
+ files=local_var_files,
590
+ response_type=None, # noqa: E501
591
+ auth_settings=auth_settings,
592
+ async_=params.get('async_'),
593
+ _return_http_data_only=params.get('_return_http_data_only'),
594
+ _preload_content=params.get('_preload_content', True),
595
+ _request_timeout=params.get('_request_timeout'),
596
+ _request_out=params.get('_request_out'),
597
+ collection_formats=collection_formats)
598
+
599
+ def delete_collection(self, collection_id, **kwargs): # noqa: E501
600
+ """Delete a collection
601
+
602
+ Delete Collections.
603
+ This method makes a synchronous HTTP request by default.
604
+
605
+ :param str collection_id: (required)
606
+ :param bool async_: Perform the request asynchronously
607
+ :return: DeletedResult
608
+ """
609
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
610
+ kwargs['_return_http_data_only'] = True
611
+
612
+ if kwargs.get('async_'):
613
+ return self.delete_collection_with_http_info(collection_id, **kwargs) # noqa: E501
614
+ else:
615
+ (data) = self.delete_collection_with_http_info(collection_id, **kwargs) # noqa: E501
616
+ if (
617
+ data
618
+ and hasattr(data, 'return_value')
619
+ and not ignore_simplified_return_value
620
+ ):
621
+ return data.return_value()
622
+ return data
623
+
624
+
625
+ def delete_collection_with_http_info(self, collection_id, **kwargs): # noqa: E501
626
+ """Delete a collection
627
+
628
+ Delete Collections.
629
+ This method makes a synchronous HTTP request by default.
630
+
631
+ :param str collection_id: (required)
632
+ :param bool async_: Perform the request asynchronously
633
+ :return: DeletedResult
634
+ """
635
+
636
+ all_params = ['collection_id',] # noqa: E501
637
+ all_params.append('async_')
638
+ all_params.append('_return_http_data_only')
639
+ all_params.append('_preload_content')
640
+ all_params.append('_request_timeout')
641
+ all_params.append('_request_out')
642
+
643
+ params = locals()
644
+ for key, val in six.iteritems(params['kwargs']):
645
+ if key not in all_params:
646
+ raise TypeError(
647
+ "Got an unexpected keyword argument '%s'"
648
+ " to method delete_collection" % key
649
+ )
650
+ params[key] = val
651
+ del params['kwargs']
652
+ # verify the required parameter 'collection_id' is set
653
+ if ('collection_id' not in params or
654
+ params['collection_id'] is None):
655
+ raise ValueError("Missing the required parameter `collection_id` when calling `delete_collection`") # noqa: E501
656
+ check_filename_params(params)
657
+
658
+ collection_formats = {}
659
+
660
+ path_params = {}
661
+ if 'collection_id' in params:
662
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
663
+
664
+ query_params = []
665
+
666
+ header_params = {}
667
+
668
+ form_params = []
669
+ local_var_files = {}
670
+
671
+ body_params = None
672
+ # HTTP header `Accept`
673
+ header_params['Accept'] = self.api_client.select_header_accept(
674
+ ['application/json']) # noqa: E501
675
+
676
+ # Authentication setting
677
+ auth_settings = ['ApiKey'] # noqa: E501
678
+
679
+ return self.api_client.call_api(
680
+ '/collections/{collection_id}', 'DELETE',
681
+ path_params,
682
+ query_params,
683
+ header_params,
684
+ body=body_params,
685
+ post_params=form_params,
686
+ files=local_var_files,
687
+ response_type='DeletedResult', # noqa: E501
688
+ auth_settings=auth_settings,
689
+ async_=params.get('async_'),
690
+ _return_http_data_only=params.get('_return_http_data_only'),
691
+ _preload_content=params.get('_preload_content', True),
692
+ _request_timeout=params.get('_request_timeout'),
693
+ _request_out=params.get('_request_out'),
694
+ collection_formats=collection_formats)
695
+
696
+ def delete_collection_file(self, cid, filename, **kwargs): # noqa: E501
697
+ """Delete a file
698
+
699
+ 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.
700
+ This method makes a synchronous HTTP request by default.
701
+
702
+ :param str cid: (required)
703
+ :param str filename: (required)
704
+ :param ContainerDeleteReason delete_reason: A reason for deletion when audit-trail is enabled
705
+ :param bool force: Force deletion of the file even if some checks fail. Deprecated, will be removed in a future release.
706
+ :param bool async_: Perform the request asynchronously
707
+ :return: DeletedResult
708
+ """
709
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
710
+ kwargs['_return_http_data_only'] = True
711
+
712
+ if kwargs.get('async_'):
713
+ return self.delete_collection_file_with_http_info(cid, filename, **kwargs) # noqa: E501
714
+ else:
715
+ (data) = self.delete_collection_file_with_http_info(cid, filename, **kwargs) # noqa: E501
716
+ if (
717
+ data
718
+ and hasattr(data, 'return_value')
719
+ and not ignore_simplified_return_value
720
+ ):
721
+ return data.return_value()
722
+ return data
723
+
724
+
725
+ def delete_collection_file_with_http_info(self, cid, filename, **kwargs): # noqa: E501
726
+ """Delete a file
727
+
728
+ 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.
729
+ This method makes a synchronous HTTP request by default.
730
+
731
+ :param str cid: (required)
732
+ :param str filename: (required)
733
+ :param ContainerDeleteReason delete_reason: A reason for deletion when audit-trail is enabled
734
+ :param bool force: Force deletion of the file even if some checks fail. Deprecated, will be removed in a future release.
735
+ :param bool async_: Perform the request asynchronously
736
+ :return: DeletedResult
737
+ """
738
+
739
+ all_params = ['cid','filename','delete_reason','force',] # noqa: E501
740
+ all_params.append('async_')
741
+ all_params.append('_return_http_data_only')
742
+ all_params.append('_preload_content')
743
+ all_params.append('_request_timeout')
744
+ all_params.append('_request_out')
745
+
746
+ params = locals()
747
+ for key, val in six.iteritems(params['kwargs']):
748
+ if key not in all_params:
749
+ raise TypeError(
750
+ "Got an unexpected keyword argument '%s'"
751
+ " to method delete_collection_file" % key
752
+ )
753
+ params[key] = val
754
+ del params['kwargs']
755
+ # verify the required parameter 'cid' is set
756
+ if ('cid' not in params or
757
+ params['cid'] is None):
758
+ raise ValueError("Missing the required parameter `cid` when calling `delete_collection_file`") # noqa: E501
759
+ # verify the required parameter 'filename' is set
760
+ if ('filename' not in params or
761
+ params['filename'] is None):
762
+ raise ValueError("Missing the required parameter `filename` when calling `delete_collection_file`") # noqa: E501
763
+ check_filename_params(params)
764
+
765
+ collection_formats = {}
766
+
767
+ path_params = {}
768
+ if 'cid' in params:
769
+ path_params['cid'] = params['cid'] # noqa: E501
770
+ if 'filename' in params:
771
+ path_params['filename'] = params['filename'] # noqa: E501
772
+
773
+ query_params = []
774
+ if 'delete_reason' in params:
775
+ query_params.append(('delete_reason', params['delete_reason'])) # noqa: E501
776
+ if 'force' in params:
777
+ query_params.append(('force', params['force'])) # noqa: E501
778
+
779
+ header_params = {}
780
+
781
+ form_params = []
782
+ local_var_files = {}
783
+
784
+ body_params = None
785
+ # HTTP header `Accept`
786
+ header_params['Accept'] = self.api_client.select_header_accept(
787
+ ['application/json']) # noqa: E501
788
+
789
+ # Authentication setting
790
+ auth_settings = ['ApiKey'] # noqa: E501
791
+
792
+ return self.api_client.call_api(
793
+ '/collections/{cid}/files/{filename}', 'DELETE',
794
+ path_params,
795
+ query_params,
796
+ header_params,
797
+ body=body_params,
798
+ post_params=form_params,
799
+ files=local_var_files,
800
+ response_type='DeletedResult', # noqa: E501
801
+ auth_settings=auth_settings,
802
+ async_=params.get('async_'),
803
+ _return_http_data_only=params.get('_return_http_data_only'),
804
+ _preload_content=params.get('_preload_content', True),
805
+ _request_timeout=params.get('_request_timeout'),
806
+ _request_out=params.get('_request_out'),
807
+ collection_formats=collection_formats)
808
+
809
+ def delete_collection_note(self, cid, note_id, **kwargs): # noqa: E501
810
+ """Remove a note from a(n) collection
811
+
812
+ Remove a note from a(n) collection
813
+ This method makes a synchronous HTTP request by default.
814
+
815
+ :param str cid: (required)
816
+ :param str note_id: (required)
817
+ :param bool async_: Perform the request asynchronously
818
+ :return: DeletedResult
819
+ """
820
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
821
+ kwargs['_return_http_data_only'] = True
822
+
823
+ if kwargs.get('async_'):
824
+ return self.delete_collection_note_with_http_info(cid, note_id, **kwargs) # noqa: E501
825
+ else:
826
+ (data) = self.delete_collection_note_with_http_info(cid, note_id, **kwargs) # noqa: E501
827
+ if (
828
+ data
829
+ and hasattr(data, 'return_value')
830
+ and not ignore_simplified_return_value
831
+ ):
832
+ return data.return_value()
833
+ return data
834
+
835
+
836
+ def delete_collection_note_with_http_info(self, cid, note_id, **kwargs): # noqa: E501
837
+ """Remove a note from a(n) collection
838
+
839
+ Remove a note from a(n) collection
840
+ This method makes a synchronous HTTP request by default.
841
+
842
+ :param str cid: (required)
843
+ :param str note_id: (required)
844
+ :param bool async_: Perform the request asynchronously
845
+ :return: DeletedResult
846
+ """
847
+
848
+ all_params = ['cid','note_id',] # 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 delete_collection_note" % key
861
+ )
862
+ params[key] = val
863
+ del params['kwargs']
864
+ # verify the required parameter 'cid' is set
865
+ if ('cid' not in params or
866
+ params['cid'] is None):
867
+ raise ValueError("Missing the required parameter `cid` when calling `delete_collection_note`") # noqa: E501
868
+ # verify the required parameter 'note_id' is set
869
+ if ('note_id' not in params or
870
+ params['note_id'] is None):
871
+ raise ValueError("Missing the required parameter `note_id` when calling `delete_collection_note`") # noqa: E501
872
+ check_filename_params(params)
873
+
874
+ collection_formats = {}
875
+
876
+ path_params = {}
877
+ if 'cid' in params:
878
+ path_params['cid'] = params['cid'] # noqa: E501
879
+ if 'note_id' in params:
880
+ path_params['note_id'] = params['note_id'] # noqa: E501
881
+
882
+ query_params = []
883
+
884
+ header_params = {}
885
+
886
+ form_params = []
887
+ local_var_files = {}
888
+
889
+ body_params = None
890
+ # HTTP header `Accept`
891
+ header_params['Accept'] = self.api_client.select_header_accept(
892
+ ['application/json']) # noqa: E501
893
+
894
+ # Authentication setting
895
+ auth_settings = ['ApiKey'] # noqa: E501
896
+
897
+ return self.api_client.call_api(
898
+ '/collections/{cid}/notes/{note_id}', 'DELETE',
899
+ path_params,
900
+ query_params,
901
+ header_params,
902
+ body=body_params,
903
+ post_params=form_params,
904
+ files=local_var_files,
905
+ response_type='DeletedResult', # noqa: E501
906
+ auth_settings=auth_settings,
907
+ async_=params.get('async_'),
908
+ _return_http_data_only=params.get('_return_http_data_only'),
909
+ _preload_content=params.get('_preload_content', True),
910
+ _request_timeout=params.get('_request_timeout'),
911
+ _request_out=params.get('_request_out'),
912
+ collection_formats=collection_formats)
913
+
914
+ def delete_collection_tag(self, cid, value, **kwargs): # noqa: E501
915
+ """Delete a tag
916
+
917
+ Delete a tag
918
+ This method makes a synchronous HTTP request by default.
919
+
920
+ :param str cid: (required)
921
+ :param str value: The tag to interact with (required)
922
+ :param bool async_: Perform the request asynchronously
923
+ :return: DeletedResult
924
+ """
925
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
926
+ kwargs['_return_http_data_only'] = True
927
+
928
+ if kwargs.get('async_'):
929
+ return self.delete_collection_tag_with_http_info(cid, value, **kwargs) # noqa: E501
930
+ else:
931
+ (data) = self.delete_collection_tag_with_http_info(cid, value, **kwargs) # noqa: E501
932
+ if (
933
+ data
934
+ and hasattr(data, 'return_value')
935
+ and not ignore_simplified_return_value
936
+ ):
937
+ return data.return_value()
938
+ return data
939
+
940
+
941
+ def delete_collection_tag_with_http_info(self, cid, value, **kwargs): # noqa: E501
942
+ """Delete a tag
943
+
944
+ Delete a tag
945
+ This method makes a synchronous HTTP request by default.
946
+
947
+ :param str cid: (required)
948
+ :param str value: The tag to interact with (required)
949
+ :param bool async_: Perform the request asynchronously
950
+ :return: DeletedResult
951
+ """
952
+
953
+ all_params = ['cid','value',] # noqa: E501
954
+ all_params.append('async_')
955
+ all_params.append('_return_http_data_only')
956
+ all_params.append('_preload_content')
957
+ all_params.append('_request_timeout')
958
+ all_params.append('_request_out')
959
+
960
+ params = locals()
961
+ for key, val in six.iteritems(params['kwargs']):
962
+ if key not in all_params:
963
+ raise TypeError(
964
+ "Got an unexpected keyword argument '%s'"
965
+ " to method delete_collection_tag" % key
966
+ )
967
+ params[key] = val
968
+ del params['kwargs']
969
+ # verify the required parameter 'cid' is set
970
+ if ('cid' not in params or
971
+ params['cid'] is None):
972
+ raise ValueError("Missing the required parameter `cid` when calling `delete_collection_tag`") # noqa: E501
973
+ # verify the required parameter 'value' is set
974
+ if ('value' not in params or
975
+ params['value'] is None):
976
+ raise ValueError("Missing the required parameter `value` when calling `delete_collection_tag`") # noqa: E501
977
+ check_filename_params(params)
978
+
979
+ collection_formats = {}
980
+
981
+ path_params = {}
982
+ if 'cid' in params:
983
+ path_params['cid'] = params['cid'] # noqa: E501
984
+ if 'value' in params:
985
+ path_params['value'] = params['value'] # noqa: E501
986
+
987
+ query_params = []
988
+
989
+ header_params = {}
990
+
991
+ form_params = []
992
+ local_var_files = {}
993
+
994
+ body_params = None
995
+ # HTTP header `Accept`
996
+ header_params['Accept'] = self.api_client.select_header_accept(
997
+ ['application/json']) # noqa: E501
998
+
999
+ # Authentication setting
1000
+ auth_settings = ['ApiKey'] # noqa: E501
1001
+
1002
+ return self.api_client.call_api(
1003
+ '/collections/{cid}/tags/{value}', 'DELETE',
1004
+ path_params,
1005
+ query_params,
1006
+ header_params,
1007
+ body=body_params,
1008
+ post_params=form_params,
1009
+ files=local_var_files,
1010
+ response_type='DeletedResult', # noqa: E501
1011
+ auth_settings=auth_settings,
1012
+ async_=params.get('async_'),
1013
+ _return_http_data_only=params.get('_return_http_data_only'),
1014
+ _preload_content=params.get('_preload_content', True),
1015
+ _request_timeout=params.get('_request_timeout'),
1016
+ _request_out=params.get('_request_out'),
1017
+ collection_formats=collection_formats)
1018
+
1019
+ def delete_collection_tags(self, cid, body, **kwargs): # noqa: E501
1020
+ """Delete multiple tags from a(n) collection
1021
+
1022
+ Delete multiple tags from a(n) collection
1023
+ This method makes a synchronous HTTP request by default.
1024
+
1025
+ :param str cid: (required)
1026
+ :param list[str] body: (required)
1027
+ :param bool async_: Perform the request asynchronously
1028
+ :return: None
1029
+ """
1030
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1031
+ kwargs['_return_http_data_only'] = True
1032
+
1033
+ if kwargs.get('async_'):
1034
+ return self.delete_collection_tags_with_http_info(cid, body, **kwargs) # noqa: E501
1035
+ else:
1036
+ (data) = self.delete_collection_tags_with_http_info(cid, body, **kwargs) # noqa: E501
1037
+ if (
1038
+ data
1039
+ and hasattr(data, 'return_value')
1040
+ and not ignore_simplified_return_value
1041
+ ):
1042
+ return data.return_value()
1043
+ return data
1044
+
1045
+
1046
+ def delete_collection_tags_with_http_info(self, cid, body, **kwargs): # noqa: E501
1047
+ """Delete multiple tags from a(n) collection
1048
+
1049
+ Delete multiple tags from a(n) collection
1050
+ This method makes a synchronous HTTP request by default.
1051
+
1052
+ :param str cid: (required)
1053
+ :param list[str] body: (required)
1054
+ :param bool async_: Perform the request asynchronously
1055
+ :return: None
1056
+ """
1057
+
1058
+ all_params = ['cid','body',] # noqa: E501
1059
+ all_params.append('async_')
1060
+ all_params.append('_return_http_data_only')
1061
+ all_params.append('_preload_content')
1062
+ all_params.append('_request_timeout')
1063
+ all_params.append('_request_out')
1064
+
1065
+ params = locals()
1066
+ for key, val in six.iteritems(params['kwargs']):
1067
+ if key not in all_params:
1068
+ raise TypeError(
1069
+ "Got an unexpected keyword argument '%s'"
1070
+ " to method delete_collection_tags" % key
1071
+ )
1072
+ params[key] = val
1073
+ del params['kwargs']
1074
+ # verify the required parameter 'cid' is set
1075
+ if ('cid' not in params or
1076
+ params['cid'] is None):
1077
+ raise ValueError("Missing the required parameter `cid` when calling `delete_collection_tags`") # noqa: E501
1078
+ # verify the required parameter 'body' is set
1079
+ if ('body' not in params or
1080
+ params['body'] is None):
1081
+ raise ValueError("Missing the required parameter `body` when calling `delete_collection_tags`") # noqa: E501
1082
+ check_filename_params(params)
1083
+
1084
+ collection_formats = {}
1085
+
1086
+ path_params = {}
1087
+ if 'cid' in params:
1088
+ path_params['cid'] = params['cid'] # noqa: E501
1089
+
1090
+ query_params = []
1091
+
1092
+ header_params = {}
1093
+
1094
+ form_params = []
1095
+ local_var_files = {}
1096
+
1097
+ body_params = None
1098
+ if 'body' in params:
1099
+ body_params = params['body']
1100
+ # HTTP header `Accept`
1101
+ header_params['Accept'] = self.api_client.select_header_accept(
1102
+ ['application/json']) # noqa: E501
1103
+
1104
+ # HTTP header `Content-Type`
1105
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1106
+ ['application/json']) # noqa: E501
1107
+
1108
+ # Authentication setting
1109
+ auth_settings = ['ApiKey'] # noqa: E501
1110
+
1111
+ return self.api_client.call_api(
1112
+ '/collections/{cid}/tags', 'DELETE',
1113
+ path_params,
1114
+ query_params,
1115
+ header_params,
1116
+ body=body_params,
1117
+ post_params=form_params,
1118
+ files=local_var_files,
1119
+ response_type=None, # noqa: E501
1120
+ auth_settings=auth_settings,
1121
+ async_=params.get('async_'),
1122
+ _return_http_data_only=params.get('_return_http_data_only'),
1123
+ _preload_content=params.get('_preload_content', True),
1124
+ _request_timeout=params.get('_request_timeout'),
1125
+ _request_out=params.get('_request_out'),
1126
+ collection_formats=collection_formats)
1127
+
1128
+ def delete_collection_user_permission(self, collection_id, user_id, **kwargs): # noqa: E501
1129
+ """Delete a permission
1130
+
1131
+ Delete a permission
1132
+ This method makes a synchronous HTTP request by default.
1133
+
1134
+ :param str collection_id: (required)
1135
+ :param str user_id: (required)
1136
+ :param bool async_: Perform the request asynchronously
1137
+ :return: ModifiedResult
1138
+ """
1139
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1140
+ kwargs['_return_http_data_only'] = True
1141
+
1142
+ if kwargs.get('async_'):
1143
+ return self.delete_collection_user_permission_with_http_info(collection_id, user_id, **kwargs) # noqa: E501
1144
+ else:
1145
+ (data) = self.delete_collection_user_permission_with_http_info(collection_id, user_id, **kwargs) # noqa: E501
1146
+ if (
1147
+ data
1148
+ and hasattr(data, 'return_value')
1149
+ and not ignore_simplified_return_value
1150
+ ):
1151
+ return data.return_value()
1152
+ return data
1153
+
1154
+
1155
+ def delete_collection_user_permission_with_http_info(self, collection_id, user_id, **kwargs): # noqa: E501
1156
+ """Delete a permission
1157
+
1158
+ Delete a permission
1159
+ This method makes a synchronous HTTP request by default.
1160
+
1161
+ :param str collection_id: (required)
1162
+ :param str user_id: (required)
1163
+ :param bool async_: Perform the request asynchronously
1164
+ :return: ModifiedResult
1165
+ """
1166
+
1167
+ all_params = ['collection_id','user_id',] # noqa: E501
1168
+ all_params.append('async_')
1169
+ all_params.append('_return_http_data_only')
1170
+ all_params.append('_preload_content')
1171
+ all_params.append('_request_timeout')
1172
+ all_params.append('_request_out')
1173
+
1174
+ params = locals()
1175
+ for key, val in six.iteritems(params['kwargs']):
1176
+ if key not in all_params:
1177
+ raise TypeError(
1178
+ "Got an unexpected keyword argument '%s'"
1179
+ " to method delete_collection_user_permission" % key
1180
+ )
1181
+ params[key] = val
1182
+ del params['kwargs']
1183
+ # verify the required parameter 'collection_id' is set
1184
+ if ('collection_id' not in params or
1185
+ params['collection_id'] is None):
1186
+ raise ValueError("Missing the required parameter `collection_id` when calling `delete_collection_user_permission`") # noqa: E501
1187
+ # verify the required parameter 'user_id' is set
1188
+ if ('user_id' not in params or
1189
+ params['user_id'] is None):
1190
+ raise ValueError("Missing the required parameter `user_id` when calling `delete_collection_user_permission`") # noqa: E501
1191
+ check_filename_params(params)
1192
+
1193
+ collection_formats = {}
1194
+
1195
+ path_params = {}
1196
+ if 'collection_id' in params:
1197
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
1198
+ if 'user_id' in params:
1199
+ path_params['user_id'] = params['user_id'] # noqa: E501
1200
+
1201
+ query_params = []
1202
+
1203
+ header_params = {}
1204
+
1205
+ form_params = []
1206
+ local_var_files = {}
1207
+
1208
+ body_params = None
1209
+ # HTTP header `Accept`
1210
+ header_params['Accept'] = self.api_client.select_header_accept(
1211
+ ['application/json']) # noqa: E501
1212
+
1213
+ # Authentication setting
1214
+ auth_settings = ['ApiKey'] # noqa: E501
1215
+
1216
+ return self.api_client.call_api(
1217
+ '/collections/{collection_id}/permissions/{user_id}', 'DELETE',
1218
+ path_params,
1219
+ query_params,
1220
+ header_params,
1221
+ body=body_params,
1222
+ post_params=form_params,
1223
+ files=local_var_files,
1224
+ response_type='ModifiedResult', # noqa: E501
1225
+ auth_settings=auth_settings,
1226
+ async_=params.get('async_'),
1227
+ _return_http_data_only=params.get('_return_http_data_only'),
1228
+ _preload_content=params.get('_preload_content', True),
1229
+ _request_timeout=params.get('_request_timeout'),
1230
+ _request_out=params.get('_request_out'),
1231
+ collection_formats=collection_formats)
1232
+
1233
+ def delete_collections_by_ids(self, body, **kwargs): # noqa: E501
1234
+ """Delete multiple collections by ID list
1235
+
1236
+ Delete multiple collections by ID list
1237
+ This method makes a synchronous HTTP request by default.
1238
+
1239
+ :param list[str] body: List of IDs to delete (required)
1240
+ :param ContainerDeleteReason delete_reason:
1241
+ :param bool async_: Perform the request asynchronously
1242
+ :return: DeletedResult
1243
+ """
1244
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1245
+ kwargs['_return_http_data_only'] = True
1246
+
1247
+ if kwargs.get('async_'):
1248
+ return self.delete_collections_by_ids_with_http_info(body, **kwargs) # noqa: E501
1249
+ else:
1250
+ (data) = self.delete_collections_by_ids_with_http_info(body, **kwargs) # noqa: E501
1251
+ if (
1252
+ data
1253
+ and hasattr(data, 'return_value')
1254
+ and not ignore_simplified_return_value
1255
+ ):
1256
+ return data.return_value()
1257
+ return data
1258
+
1259
+
1260
+ def delete_collections_by_ids_with_http_info(self, body, **kwargs): # noqa: E501
1261
+ """Delete multiple collections by ID list
1262
+
1263
+ Delete multiple collections by ID list
1264
+ This method makes a synchronous HTTP request by default.
1265
+
1266
+ :param list[str] body: List of IDs to delete (required)
1267
+ :param ContainerDeleteReason delete_reason:
1268
+ :param bool async_: Perform the request asynchronously
1269
+ :return: DeletedResult
1270
+ """
1271
+
1272
+ all_params = ['body','delete_reason',] # noqa: E501
1273
+ all_params.append('async_')
1274
+ all_params.append('_return_http_data_only')
1275
+ all_params.append('_preload_content')
1276
+ all_params.append('_request_timeout')
1277
+ all_params.append('_request_out')
1278
+
1279
+ params = locals()
1280
+ for key, val in six.iteritems(params['kwargs']):
1281
+ if key not in all_params:
1282
+ raise TypeError(
1283
+ "Got an unexpected keyword argument '%s'"
1284
+ " to method delete_collections_by_ids" % key
1285
+ )
1286
+ params[key] = val
1287
+ del params['kwargs']
1288
+ # verify the required parameter 'body' is set
1289
+ if ('body' not in params or
1290
+ params['body'] is None):
1291
+ raise ValueError("Missing the required parameter `body` when calling `delete_collections_by_ids`") # noqa: E501
1292
+ check_filename_params(params)
1293
+
1294
+ collection_formats = {}
1295
+
1296
+ path_params = {}
1297
+
1298
+ query_params = []
1299
+ if 'delete_reason' in params:
1300
+ query_params.append(('delete_reason', params['delete_reason'])) # noqa: E501
1301
+
1302
+ header_params = {}
1303
+
1304
+ form_params = []
1305
+ local_var_files = {}
1306
+
1307
+ body_params = None
1308
+ if 'body' in params:
1309
+ body_params = params['body']
1310
+ # HTTP header `Accept`
1311
+ header_params['Accept'] = self.api_client.select_header_accept(
1312
+ ['application/json']) # noqa: E501
1313
+
1314
+ # HTTP header `Content-Type`
1315
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
1316
+ ['application/json']) # noqa: E501
1317
+
1318
+ # Authentication setting
1319
+ auth_settings = ['ApiKey'] # noqa: E501
1320
+
1321
+ return self.api_client.call_api(
1322
+ '/collections', 'DELETE',
1323
+ path_params,
1324
+ query_params,
1325
+ header_params,
1326
+ body=body_params,
1327
+ post_params=form_params,
1328
+ files=local_var_files,
1329
+ response_type='DeletedResult', # noqa: E501
1330
+ auth_settings=auth_settings,
1331
+ async_=params.get('async_'),
1332
+ _return_http_data_only=params.get('_return_http_data_only'),
1333
+ _preload_content=params.get('_preload_content', True),
1334
+ _request_timeout=params.get('_request_timeout'),
1335
+ _request_out=params.get('_request_out'),
1336
+ collection_formats=collection_formats)
1337
+
1338
+ def download_file_from_collection(self, collection_id, file_name, dest_file, **kwargs): # noqa: E501
1339
+ """Download a file.
1340
+
1341
+ 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.
1342
+ This method makes a synchronous HTTP request by default.
1343
+
1344
+ :param str collection_id: 24-character hex ID (required)
1345
+ :param str file_name: output file name (required)
1346
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1347
+ :param str member: The filename of a zipfile member to download rather than the entire file
1348
+ :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\"
1349
+ :param int version: version of the file to download
1350
+ :param str hash: file hash for comparison
1351
+ :param str range: byte ranges to return
1352
+ :param list[str] x_accept_feature: redirect header
1353
+ :param str dest_file: Destination file path
1354
+ :param bool async_: Perform the request asynchronously
1355
+ :return: union[DownloadTicketStub,ZipfileInfo]
1356
+ """
1357
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1358
+ kwargs['_return_http_data_only'] = True
1359
+
1360
+ kwargs['_preload_content'] = False
1361
+ # Stream response to file
1362
+ with open(dest_file, 'wb') as out_file:
1363
+ (resp) = self.download_file_from_collection_with_http_info(collection_id, file_name, **kwargs) # noqa: E501
1364
+ if resp:
1365
+ try:
1366
+ for chunk in resp.iter_content(chunk_size=65536):
1367
+ out_file.write(chunk)
1368
+ finally:
1369
+ resp.close()
1370
+
1371
+
1372
+ def download_file_from_collection_with_http_info(self, collection_id, file_name, **kwargs): # noqa: E501
1373
+ """Download a file.
1374
+
1375
+ 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.
1376
+ This method makes a synchronous HTTP request by default.
1377
+
1378
+ :param str collection_id: 24-character hex ID (required)
1379
+ :param str file_name: output file name (required)
1380
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1381
+ :param str member: The filename of a zipfile member to download rather than the entire file
1382
+ :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\"
1383
+ :param int version: version of the file to download
1384
+ :param str hash: file hash for comparison
1385
+ :param str range: byte ranges to return
1386
+ :param list[str] x_accept_feature: redirect header
1387
+ :param bool async_: Perform the request asynchronously
1388
+ :return: union[DownloadTicketStub,ZipfileInfo]
1389
+ """
1390
+
1391
+ all_params = ['collection_id','file_name','info','member','view','version','hash','range','x_accept_feature',] # noqa: E501
1392
+ all_params.append('async_')
1393
+ all_params.append('_return_http_data_only')
1394
+ all_params.append('_preload_content')
1395
+ all_params.append('_request_timeout')
1396
+ all_params.append('_request_out')
1397
+
1398
+ params = locals()
1399
+ for key, val in six.iteritems(params['kwargs']):
1400
+ if key not in all_params:
1401
+ raise TypeError(
1402
+ "Got an unexpected keyword argument '%s'"
1403
+ " to method download_file_from_collection" % key
1404
+ )
1405
+ params[key] = val
1406
+ del params['kwargs']
1407
+ # verify the required parameter 'collection_id' is set
1408
+ if ('collection_id' not in params or
1409
+ params['collection_id'] is None):
1410
+ raise ValueError("Missing the required parameter `collection_id` when calling `download_file_from_collection`") # noqa: E501
1411
+ # verify the required parameter 'file_name' is set
1412
+ if ('file_name' not in params or
1413
+ params['file_name'] is None):
1414
+ raise ValueError("Missing the required parameter `file_name` when calling `download_file_from_collection`") # noqa: E501
1415
+ check_filename_params(params)
1416
+
1417
+ collection_formats = {}
1418
+
1419
+ path_params = {}
1420
+ if 'collection_id' in params:
1421
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
1422
+ if 'file_name' in params:
1423
+ path_params['file_name'] = params['file_name'] # noqa: E501
1424
+
1425
+ query_params = []
1426
+ if 'info' in params:
1427
+ query_params.append(('info', params['info'])) # noqa: E501
1428
+ if 'member' in params:
1429
+ query_params.append(('member', params['member'])) # noqa: E501
1430
+ if 'view' in params:
1431
+ query_params.append(('view', params['view'])) # noqa: E501
1432
+ if 'version' in params:
1433
+ query_params.append(('version', params['version'])) # noqa: E501
1434
+ if 'hash' in params:
1435
+ query_params.append(('hash', params['hash'])) # noqa: E501
1436
+
1437
+ header_params = {}
1438
+ if 'range' in params:
1439
+ header_params['range'] = params['range'] # noqa: E501
1440
+ if 'x_accept_feature' in params:
1441
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1442
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1443
+
1444
+ form_params = []
1445
+ local_var_files = {}
1446
+
1447
+ body_params = None
1448
+ # HTTP header `Accept`
1449
+ header_params['Accept'] = self.api_client.select_header_accept(
1450
+ ['application/octet-stream']) # noqa: E501
1451
+
1452
+ # Authentication setting
1453
+ auth_settings = ['ApiKey'] # noqa: E501
1454
+
1455
+ return self.api_client.call_api(
1456
+ '/collections/{collection_id}/files/{file_name}', 'GET',
1457
+ path_params,
1458
+ query_params,
1459
+ header_params,
1460
+ body=body_params,
1461
+ post_params=form_params,
1462
+ files=local_var_files,
1463
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1464
+ auth_settings=auth_settings,
1465
+ async_=params.get('async_'),
1466
+ _return_http_data_only=params.get('_return_http_data_only'),
1467
+ _preload_content=params.get('_preload_content', True),
1468
+ _request_timeout=params.get('_request_timeout'),
1469
+ _request_out=params.get('_request_out'),
1470
+ collection_formats=collection_formats)
1471
+
1472
+ def get_collection_file_zip_info(self, collection_id, file_name, **kwargs): # noqa: E501
1473
+ """Retrieve the zip info of a child file by name.
1474
+
1475
+ Does not work on files whose names contain a forward slash.
1476
+ This method makes a synchronous HTTP request by default.
1477
+
1478
+ :param str collection_id: 24-character hex ID (required)
1479
+ :param str file_name: output file name (required)
1480
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
1481
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1482
+ :param str member: The filename of a zipfile member to download rather than the entire file
1483
+ :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\"
1484
+ :param int version: version of the file to download
1485
+ :param str hash: file hash for comparison
1486
+ :param str range: byte ranges to return
1487
+ :param list[str] x_accept_feature: redirect header
1488
+ :param bool async_: Perform the request asynchronously
1489
+ :return: FileZipInfo
1490
+ """
1491
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1492
+ kwargs['_return_http_data_only'] = True
1493
+
1494
+ if kwargs.get('async_'):
1495
+ return self.get_collection_file_zip_info_with_http_info(collection_id, file_name, **kwargs) # noqa: E501
1496
+ else:
1497
+ (data) = self.get_collection_file_zip_info_with_http_info(collection_id, file_name, **kwargs) # noqa: E501
1498
+ if (
1499
+ data
1500
+ and hasattr(data, 'return_value')
1501
+ and not ignore_simplified_return_value
1502
+ ):
1503
+ return data.return_value()
1504
+ return data
1505
+
1506
+
1507
+ def get_collection_file_zip_info_with_http_info(self, collection_id, file_name, **kwargs): # noqa: E501
1508
+ """Retrieve the zip info of a child file by name.
1509
+
1510
+ Does not work on files whose names contain a forward slash.
1511
+ This method makes a synchronous HTTP request by default.
1512
+
1513
+ :param str collection_id: 24-character hex ID (required)
1514
+ :param str file_name: output file name (required)
1515
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
1516
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1517
+ :param str member: The filename of a zipfile member to download rather than the entire file
1518
+ :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\"
1519
+ :param int version: version of the file to download
1520
+ :param str hash: file hash for comparison
1521
+ :param str range: byte ranges to return
1522
+ :param list[str] x_accept_feature: redirect header
1523
+ :param bool async_: Perform the request asynchronously
1524
+ :return: FileZipInfo
1525
+ """
1526
+
1527
+ all_params = ['collection_id','file_name','ticket','info','member','view','version','hash','range','x_accept_feature',] # noqa: E501
1528
+ all_params.append('async_')
1529
+ all_params.append('_return_http_data_only')
1530
+ all_params.append('_preload_content')
1531
+ all_params.append('_request_timeout')
1532
+ all_params.append('_request_out')
1533
+
1534
+ params = locals()
1535
+ for key, val in six.iteritems(params['kwargs']):
1536
+ if key not in all_params:
1537
+ raise TypeError(
1538
+ "Got an unexpected keyword argument '%s'"
1539
+ " to method get_collection_file_zip_info" % key
1540
+ )
1541
+ params[key] = val
1542
+ del params['kwargs']
1543
+ # verify the required parameter 'collection_id' is set
1544
+ if ('collection_id' not in params or
1545
+ params['collection_id'] is None):
1546
+ raise ValueError("Missing the required parameter `collection_id` when calling `get_collection_file_zip_info`") # noqa: E501
1547
+ # verify the required parameter 'file_name' is set
1548
+ if ('file_name' not in params or
1549
+ params['file_name'] is None):
1550
+ raise ValueError("Missing the required parameter `file_name` when calling `get_collection_file_zip_info`") # noqa: E501
1551
+ check_filename_params(params)
1552
+
1553
+ collection_formats = {}
1554
+
1555
+ path_params = {}
1556
+ if 'collection_id' in params:
1557
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
1558
+ if 'file_name' in params:
1559
+ path_params['file_name'] = params['file_name'] # noqa: E501
1560
+
1561
+ query_params = []
1562
+ if 'ticket' in params:
1563
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1564
+ if 'info' in params:
1565
+ query_params.append(('info', params['info'])) # noqa: E501
1566
+ else:
1567
+ query_params.append(('info', 'true'))
1568
+ if 'member' in params:
1569
+ query_params.append(('member', params['member'])) # noqa: E501
1570
+ if 'view' in params:
1571
+ query_params.append(('view', params['view'])) # noqa: E501
1572
+ if 'version' in params:
1573
+ query_params.append(('version', params['version'])) # noqa: E501
1574
+ if 'hash' in params:
1575
+ query_params.append(('hash', params['hash'])) # noqa: E501
1576
+
1577
+ header_params = {}
1578
+ if 'range' in params:
1579
+ header_params['range'] = params['range'] # noqa: E501
1580
+ if 'x_accept_feature' in params:
1581
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1582
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1583
+
1584
+ form_params = []
1585
+ local_var_files = {}
1586
+
1587
+ body_params = None
1588
+ # HTTP header `Accept`
1589
+ header_params['Accept'] = self.api_client.select_header_accept(
1590
+ ['application/json']) # noqa: E501
1591
+
1592
+ # Authentication setting
1593
+ auth_settings = ['ApiKey'] # noqa: E501
1594
+
1595
+ return self.api_client.call_api(
1596
+ '/collections/{collection_id}/files/{file_name}', 'GET',
1597
+ path_params,
1598
+ query_params,
1599
+ header_params,
1600
+ body=body_params,
1601
+ post_params=form_params,
1602
+ files=local_var_files,
1603
+ response_type='FileZipInfo', # noqa: E501
1604
+ auth_settings=auth_settings,
1605
+ async_=params.get('async_'),
1606
+ _return_http_data_only=params.get('_return_http_data_only'),
1607
+ _preload_content=params.get('_preload_content', True),
1608
+ _request_timeout=params.get('_request_timeout'),
1609
+ _request_out=params.get('_request_out'),
1610
+ collection_formats=collection_formats)
1611
+
1612
+ def get_collection_download_ticket(self, collection_id, file_name, **kwargs): # noqa: E501
1613
+ """Get a signed URL to download a named child file.
1614
+
1615
+ This method makes a synchronous HTTP request by default.
1616
+
1617
+ :param str collection_id: 24-character hex ID (required)
1618
+ :param str file_name: output file name (required)
1619
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
1620
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1621
+ :param str member: The filename of a zipfile member to download rather than the entire file
1622
+ :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\"
1623
+ :param int version: version of the file to download
1624
+ :param str hash: file hash for comparison
1625
+ :param str range: byte ranges to return
1626
+ :param list[str] x_accept_feature: redirect header
1627
+ :param bool async_: Perform the request asynchronously
1628
+ :return: union[DownloadTicketStub,ZipfileInfo]
1629
+ """
1630
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1631
+ kwargs['_return_http_data_only'] = True
1632
+
1633
+ if kwargs.get('async_'):
1634
+ return self.get_collection_download_ticket_with_http_info(collection_id, file_name, **kwargs) # noqa: E501
1635
+ else:
1636
+ (data) = self.get_collection_download_ticket_with_http_info(collection_id, file_name, **kwargs) # noqa: E501
1637
+ if (
1638
+ data
1639
+ and hasattr(data, 'return_value')
1640
+ and not ignore_simplified_return_value
1641
+ ):
1642
+ return data.return_value()
1643
+ return data
1644
+
1645
+
1646
+ def get_collection_download_ticket_with_http_info(self, collection_id, file_name, **kwargs): # noqa: E501
1647
+ """Get a signed URL to download a named child file.
1648
+
1649
+ This method makes a synchronous HTTP request by default.
1650
+
1651
+ :param str collection_id: 24-character hex ID (required)
1652
+ :param str file_name: output file name (required)
1653
+ :param str ticket: The generated ticket id for the download, or present but empty to generate a ticket id
1654
+ :param bool info: If the file is a zipfile, return a json response of zipfile member information
1655
+ :param str member: The filename of a zipfile member to download rather than the entire file
1656
+ :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\"
1657
+ :param int version: version of the file to download
1658
+ :param str hash: file hash for comparison
1659
+ :param str range: byte ranges to return
1660
+ :param list[str] x_accept_feature: redirect header
1661
+ :param bool async_: Perform the request asynchronously
1662
+ :return: union[DownloadTicketStub,ZipfileInfo]
1663
+ """
1664
+
1665
+ all_params = ['collection_id','file_name','ticket','info','member','view','version','hash','range','x_accept_feature',] # noqa: E501
1666
+ all_params.append('async_')
1667
+ all_params.append('_return_http_data_only')
1668
+ all_params.append('_preload_content')
1669
+ all_params.append('_request_timeout')
1670
+ all_params.append('_request_out')
1671
+
1672
+ params = locals()
1673
+ for key, val in six.iteritems(params['kwargs']):
1674
+ if key not in all_params:
1675
+ raise TypeError(
1676
+ "Got an unexpected keyword argument '%s'"
1677
+ " to method get_collection_download_ticket" % key
1678
+ )
1679
+ params[key] = val
1680
+ del params['kwargs']
1681
+ # verify the required parameter 'collection_id' is set
1682
+ if ('collection_id' not in params or
1683
+ params['collection_id'] is None):
1684
+ raise ValueError("Missing the required parameter `collection_id` when calling `get_collection_download_ticket`") # noqa: E501
1685
+ # verify the required parameter 'file_name' is set
1686
+ if ('file_name' not in params or
1687
+ params['file_name'] is None):
1688
+ raise ValueError("Missing the required parameter `file_name` when calling `get_collection_download_ticket`") # noqa: E501
1689
+ check_filename_params(params)
1690
+
1691
+ collection_formats = {}
1692
+
1693
+ path_params = {}
1694
+ if 'collection_id' in params:
1695
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
1696
+ if 'file_name' in params:
1697
+ path_params['file_name'] = params['file_name'] # noqa: E501
1698
+
1699
+ query_params = []
1700
+ if 'ticket' in params:
1701
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
1702
+ if 'info' in params:
1703
+ query_params.append(('info', params['info'])) # noqa: E501
1704
+ if 'member' in params:
1705
+ query_params.append(('member', params['member'])) # noqa: E501
1706
+ if 'view' in params:
1707
+ query_params.append(('view', params['view'])) # noqa: E501
1708
+ if 'version' in params:
1709
+ query_params.append(('version', params['version'])) # noqa: E501
1710
+ if 'hash' in params:
1711
+ query_params.append(('hash', params['hash'])) # noqa: E501
1712
+
1713
+ header_params = {}
1714
+ if 'range' in params:
1715
+ header_params['range'] = params['range'] # noqa: E501
1716
+ if 'x_accept_feature' in params:
1717
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1718
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1719
+
1720
+ form_params = []
1721
+ local_var_files = {}
1722
+
1723
+ body_params = None
1724
+ # HTTP header `Accept`
1725
+ header_params['Accept'] = self.api_client.select_header_accept(
1726
+ ['application/json']) # noqa: E501
1727
+
1728
+ # Authentication setting
1729
+ auth_settings = ['ApiKey'] # noqa: E501
1730
+
1731
+ return self.api_client.call_api(
1732
+ '/collections/{collection_id}/files/{file_name}', 'GET',
1733
+ path_params,
1734
+ query_params,
1735
+ header_params,
1736
+ body=body_params,
1737
+ post_params=form_params,
1738
+ files=local_var_files,
1739
+ response_type='union[DownloadTicketStub,ZipfileInfo]', # noqa: E501
1740
+ auth_settings=auth_settings,
1741
+ async_=params.get('async_'),
1742
+ _return_http_data_only=params.get('_return_http_data_only'),
1743
+ _preload_content=params.get('_preload_content', True),
1744
+ _request_timeout=params.get('_request_timeout'),
1745
+ _request_out=params.get('_request_out'),
1746
+ collection_formats=collection_formats)
1747
+
1748
+ def get_all_collections(self, **kwargs): # noqa: E501
1749
+ """List all collections.
1750
+
1751
+ List all collections.
1752
+ This method makes a synchronous HTTP request by default.
1753
+
1754
+ :param bool exhaustive:
1755
+ :param bool join_avatars: add name and avatar to notes
1756
+ :param bool join_files:
1757
+ :param JoinType join:
1758
+ :param bool stats:
1759
+ :param bool include_all_info: Include all info in returned objects
1760
+ :param str user_id:
1761
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
1762
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
1763
+ :param int limit: The maximum number of entries to return.
1764
+ :param int skip: The number of entries to skip.
1765
+ :param int page: The page number (i.e. skip limit*page entries)
1766
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
1767
+ :param list[union[HeaderFeature,str]] x_accept_feature:
1768
+ :param bool async_: Perform the request asynchronously
1769
+ :return: union[Page,list[CollectionWithStats],list[CollectionOutput]]
1770
+ """
1771
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1772
+ kwargs['_return_http_data_only'] = True
1773
+
1774
+ if kwargs.get('async_'):
1775
+ return self.get_all_collections_with_http_info(**kwargs) # noqa: E501
1776
+ else:
1777
+ (data) = self.get_all_collections_with_http_info(**kwargs) # noqa: E501
1778
+ if (
1779
+ data
1780
+ and hasattr(data, 'return_value')
1781
+ and not ignore_simplified_return_value
1782
+ ):
1783
+ return data.return_value()
1784
+ return data
1785
+
1786
+
1787
+ def get_all_collections_with_http_info(self, **kwargs): # noqa: E501
1788
+ """List all collections.
1789
+
1790
+ List all collections.
1791
+ This method makes a synchronous HTTP request by default.
1792
+
1793
+ :param bool exhaustive:
1794
+ :param bool join_avatars: add name and avatar to notes
1795
+ :param bool join_files:
1796
+ :param JoinType join:
1797
+ :param bool stats:
1798
+ :param bool include_all_info: Include all info in returned objects
1799
+ :param str user_id:
1800
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
1801
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
1802
+ :param int limit: The maximum number of entries to return.
1803
+ :param int skip: The number of entries to skip.
1804
+ :param int page: The page number (i.e. skip limit*page entries)
1805
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
1806
+ :param list[union[HeaderFeature,str]] x_accept_feature:
1807
+ :param bool async_: Perform the request asynchronously
1808
+ :return: union[Page,list[CollectionWithStats],list[CollectionOutput]]
1809
+ """
1810
+
1811
+ all_params = ['exhaustive','join_avatars','join_files','join','stats','include_all_info','user_id','filter','sort','limit','skip','page','after_id','x_accept_feature',] # noqa: E501
1812
+ all_params.append('async_')
1813
+ all_params.append('_return_http_data_only')
1814
+ all_params.append('_preload_content')
1815
+ all_params.append('_request_timeout')
1816
+ all_params.append('_request_out')
1817
+
1818
+ params = locals()
1819
+ for key, val in six.iteritems(params['kwargs']):
1820
+ if key not in all_params:
1821
+ raise TypeError(
1822
+ "Got an unexpected keyword argument '%s'"
1823
+ " to method get_all_collections" % key
1824
+ )
1825
+ params[key] = val
1826
+ del params['kwargs']
1827
+ check_filename_params(params)
1828
+
1829
+ collection_formats = {}
1830
+
1831
+ path_params = {}
1832
+
1833
+ query_params = []
1834
+ if 'exhaustive' in params:
1835
+ query_params.append(('exhaustive', params['exhaustive'])) # noqa: E501
1836
+ if 'join_avatars' in params:
1837
+ query_params.append(('join_avatars', params['join_avatars'])) # noqa: E501
1838
+ if 'join_files' in params:
1839
+ query_params.append(('join_files', params['join_files'])) # noqa: E501
1840
+ if 'join' in params:
1841
+ query_params.append(('join', params['join'])) # noqa: E501
1842
+ if 'stats' in params:
1843
+ query_params.append(('stats', params['stats'])) # noqa: E501
1844
+ if 'include_all_info' in params:
1845
+ query_params.append(('include_all_info', params['include_all_info'])) # noqa: E501
1846
+ if 'user_id' in params:
1847
+ query_params.append(('user_id', params['user_id'])) # noqa: E501
1848
+ if 'filter' in params:
1849
+ query_params.append(('filter', params['filter'])) # noqa: E501
1850
+ if 'sort' in params:
1851
+ query_params.append(('sort', params['sort'])) # noqa: E501
1852
+ if 'limit' in params:
1853
+ query_params.append(('limit', params['limit'])) # noqa: E501
1854
+ if 'skip' in params:
1855
+ query_params.append(('skip', params['skip'])) # noqa: E501
1856
+ if 'page' in params:
1857
+ query_params.append(('page', params['page'])) # noqa: E501
1858
+ if 'after_id' in params:
1859
+ query_params.append(('after_id', params['after_id'])) # noqa: E501
1860
+
1861
+ header_params = {}
1862
+ if 'x_accept_feature' in params:
1863
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
1864
+ collection_formats['x-accept-feature'] = '' # noqa: E501
1865
+
1866
+ form_params = []
1867
+ local_var_files = {}
1868
+
1869
+ body_params = None
1870
+ # HTTP header `Accept`
1871
+ header_params['Accept'] = self.api_client.select_header_accept(
1872
+ ['application/json']) # noqa: E501
1873
+
1874
+ # Authentication setting
1875
+ auth_settings = ['ApiKey'] # noqa: E501
1876
+
1877
+ return self.api_client.call_api(
1878
+ '/collections', 'GET',
1879
+ path_params,
1880
+ query_params,
1881
+ header_params,
1882
+ body=body_params,
1883
+ post_params=form_params,
1884
+ files=local_var_files,
1885
+ response_type='union[Page,list[CollectionWithStats],list[CollectionOutput]]', # noqa: E501
1886
+ auth_settings=auth_settings,
1887
+ async_=params.get('async_'),
1888
+ _return_http_data_only=params.get('_return_http_data_only'),
1889
+ _preload_content=params.get('_preload_content', True),
1890
+ _request_timeout=params.get('_request_timeout'),
1891
+ _request_out=params.get('_request_out'),
1892
+ collection_formats=collection_formats)
1893
+
1894
+ def get_all_collections_curators(self, **kwargs): # noqa: E501
1895
+ """List all curators of collections
1896
+
1897
+ List all curators of collections
1898
+ This method makes a synchronous HTTP request by default.
1899
+
1900
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
1901
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
1902
+ :param int limit: The maximum number of entries to return.
1903
+ :param int skip: The number of entries to skip.
1904
+ :param int page: The page number (i.e. skip limit*page entries)
1905
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
1906
+ :param bool async_: Perform the request asynchronously
1907
+ :return: list[Curator]
1908
+ """
1909
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
1910
+ kwargs['_return_http_data_only'] = True
1911
+
1912
+ if kwargs.get('async_'):
1913
+ return self.get_all_collections_curators_with_http_info(**kwargs) # noqa: E501
1914
+ else:
1915
+ (data) = self.get_all_collections_curators_with_http_info(**kwargs) # noqa: E501
1916
+ if (
1917
+ data
1918
+ and hasattr(data, 'return_value')
1919
+ and not ignore_simplified_return_value
1920
+ ):
1921
+ return data.return_value()
1922
+ return data
1923
+
1924
+
1925
+ def get_all_collections_curators_with_http_info(self, **kwargs): # noqa: E501
1926
+ """List all curators of collections
1927
+
1928
+ List all curators of collections
1929
+ This method makes a synchronous HTTP request by default.
1930
+
1931
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
1932
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
1933
+ :param int limit: The maximum number of entries to return.
1934
+ :param int skip: The number of entries to skip.
1935
+ :param int page: The page number (i.e. skip limit*page entries)
1936
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
1937
+ :param bool async_: Perform the request asynchronously
1938
+ :return: list[Curator]
1939
+ """
1940
+
1941
+ all_params = ['filter','sort','limit','skip','page','after_id',] # noqa: E501
1942
+ all_params.append('async_')
1943
+ all_params.append('_return_http_data_only')
1944
+ all_params.append('_preload_content')
1945
+ all_params.append('_request_timeout')
1946
+ all_params.append('_request_out')
1947
+
1948
+ params = locals()
1949
+ for key, val in six.iteritems(params['kwargs']):
1950
+ if key not in all_params:
1951
+ raise TypeError(
1952
+ "Got an unexpected keyword argument '%s'"
1953
+ " to method get_all_collections_curators" % key
1954
+ )
1955
+ params[key] = val
1956
+ del params['kwargs']
1957
+ check_filename_params(params)
1958
+
1959
+ collection_formats = {}
1960
+
1961
+ path_params = {}
1962
+
1963
+ query_params = []
1964
+ if 'filter' in params:
1965
+ query_params.append(('filter', params['filter'])) # noqa: E501
1966
+ if 'sort' in params:
1967
+ query_params.append(('sort', params['sort'])) # noqa: E501
1968
+ if 'limit' in params:
1969
+ query_params.append(('limit', params['limit'])) # noqa: E501
1970
+ if 'skip' in params:
1971
+ query_params.append(('skip', params['skip'])) # noqa: E501
1972
+ if 'page' in params:
1973
+ query_params.append(('page', params['page'])) # noqa: E501
1974
+ if 'after_id' in params:
1975
+ query_params.append(('after_id', params['after_id'])) # noqa: E501
1976
+
1977
+ header_params = {}
1978
+
1979
+ form_params = []
1980
+ local_var_files = {}
1981
+
1982
+ body_params = None
1983
+ # HTTP header `Accept`
1984
+ header_params['Accept'] = self.api_client.select_header_accept(
1985
+ ['application/json']) # noqa: E501
1986
+
1987
+ # Authentication setting
1988
+ auth_settings = ['ApiKey'] # noqa: E501
1989
+
1990
+ return self.api_client.call_api(
1991
+ '/collections/curators', 'GET',
1992
+ path_params,
1993
+ query_params,
1994
+ header_params,
1995
+ body=body_params,
1996
+ post_params=form_params,
1997
+ files=local_var_files,
1998
+ response_type='list[Curator]', # noqa: E501
1999
+ auth_settings=auth_settings,
2000
+ async_=params.get('async_'),
2001
+ _return_http_data_only=params.get('_return_http_data_only'),
2002
+ _preload_content=params.get('_preload_content', True),
2003
+ _request_timeout=params.get('_request_timeout'),
2004
+ _request_out=params.get('_request_out'),
2005
+ collection_formats=collection_formats)
2006
+
2007
+ def get_collection(self, collection_id, **kwargs): # noqa: E501
2008
+ """Retrieve a single collection
2009
+
2010
+ Retrieve a single collection
2011
+ This method makes a synchronous HTTP request by default.
2012
+
2013
+ :param str collection_id: (required)
2014
+ :param bool join_avatars: add name and avatar to notes
2015
+ :param JoinType join:
2016
+ :param list[union[HeaderFeature,str]] x_accept_feature:
2017
+ :param bool async_: Perform the request asynchronously
2018
+ :return: CollectionOutput
2019
+ """
2020
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2021
+ kwargs['_return_http_data_only'] = True
2022
+
2023
+ if kwargs.get('async_'):
2024
+ return self.get_collection_with_http_info(collection_id, **kwargs) # noqa: E501
2025
+ else:
2026
+ (data) = self.get_collection_with_http_info(collection_id, **kwargs) # noqa: E501
2027
+ if (
2028
+ data
2029
+ and hasattr(data, 'return_value')
2030
+ and not ignore_simplified_return_value
2031
+ ):
2032
+ return data.return_value()
2033
+ return data
2034
+
2035
+
2036
+ def get_collection_with_http_info(self, collection_id, **kwargs): # noqa: E501
2037
+ """Retrieve a single collection
2038
+
2039
+ Retrieve a single collection
2040
+ This method makes a synchronous HTTP request by default.
2041
+
2042
+ :param str collection_id: (required)
2043
+ :param bool join_avatars: add name and avatar to notes
2044
+ :param JoinType join:
2045
+ :param list[union[HeaderFeature,str]] x_accept_feature:
2046
+ :param bool async_: Perform the request asynchronously
2047
+ :return: CollectionOutput
2048
+ """
2049
+
2050
+ all_params = ['collection_id','join_avatars','join','x_accept_feature',] # noqa: E501
2051
+ all_params.append('async_')
2052
+ all_params.append('_return_http_data_only')
2053
+ all_params.append('_preload_content')
2054
+ all_params.append('_request_timeout')
2055
+ all_params.append('_request_out')
2056
+
2057
+ params = locals()
2058
+ for key, val in six.iteritems(params['kwargs']):
2059
+ if key not in all_params:
2060
+ raise TypeError(
2061
+ "Got an unexpected keyword argument '%s'"
2062
+ " to method get_collection" % key
2063
+ )
2064
+ params[key] = val
2065
+ del params['kwargs']
2066
+ # verify the required parameter 'collection_id' is set
2067
+ if ('collection_id' not in params or
2068
+ params['collection_id'] is None):
2069
+ raise ValueError("Missing the required parameter `collection_id` when calling `get_collection`") # noqa: E501
2070
+ check_filename_params(params)
2071
+
2072
+ collection_formats = {}
2073
+
2074
+ path_params = {}
2075
+ if 'collection_id' in params:
2076
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
2077
+
2078
+ query_params = []
2079
+ if 'join_avatars' in params:
2080
+ query_params.append(('join_avatars', params['join_avatars'])) # noqa: E501
2081
+ if 'join' in params:
2082
+ query_params.append(('join', params['join'])) # noqa: E501
2083
+
2084
+ header_params = {}
2085
+ if 'x_accept_feature' in params:
2086
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
2087
+ collection_formats['x-accept-feature'] = '' # noqa: E501
2088
+
2089
+ form_params = []
2090
+ local_var_files = {}
2091
+
2092
+ body_params = None
2093
+ # HTTP header `Accept`
2094
+ header_params['Accept'] = self.api_client.select_header_accept(
2095
+ ['application/json']) # noqa: E501
2096
+
2097
+ # Authentication setting
2098
+ auth_settings = ['ApiKey'] # noqa: E501
2099
+
2100
+ return self.api_client.call_api(
2101
+ '/collections/{collection_id}', 'GET',
2102
+ path_params,
2103
+ query_params,
2104
+ header_params,
2105
+ body=body_params,
2106
+ post_params=form_params,
2107
+ files=local_var_files,
2108
+ response_type='CollectionOutput', # noqa: E501
2109
+ auth_settings=auth_settings,
2110
+ async_=params.get('async_'),
2111
+ _return_http_data_only=params.get('_return_http_data_only'),
2112
+ _preload_content=params.get('_preload_content', True),
2113
+ _request_timeout=params.get('_request_timeout'),
2114
+ _request_out=params.get('_request_out'),
2115
+ collection_formats=collection_formats)
2116
+
2117
+ def get_collection_acquisitions(self, collection_id, **kwargs): # noqa: E501
2118
+ """List acquisitions in a collection
2119
+
2120
+ List acquisitions in a collection
2121
+ This method makes a synchronous HTTP request by default.
2122
+
2123
+ :param str collection_id: (required)
2124
+ :param str session: The id of a session, to which the acquisitions returned will be restricted
2125
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
2126
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
2127
+ :param int limit: The maximum number of entries to return.
2128
+ :param int skip: The number of entries to skip.
2129
+ :param int page: The page number (i.e. skip limit*page entries)
2130
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
2131
+ :param list[str] x_accept_feature:
2132
+ :param bool async_: Perform the request asynchronously
2133
+ :return: union[list[AcquisitionListOutput],Page]
2134
+ """
2135
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2136
+ kwargs['_return_http_data_only'] = True
2137
+
2138
+ if kwargs.get('async_'):
2139
+ return self.get_collection_acquisitions_with_http_info(collection_id, **kwargs) # noqa: E501
2140
+ else:
2141
+ (data) = self.get_collection_acquisitions_with_http_info(collection_id, **kwargs) # noqa: E501
2142
+ if (
2143
+ data
2144
+ and hasattr(data, 'return_value')
2145
+ and not ignore_simplified_return_value
2146
+ ):
2147
+ return data.return_value()
2148
+ return data
2149
+
2150
+
2151
+ def get_collection_acquisitions_with_http_info(self, collection_id, **kwargs): # noqa: E501
2152
+ """List acquisitions in a collection
2153
+
2154
+ List acquisitions in a collection
2155
+ This method makes a synchronous HTTP request by default.
2156
+
2157
+ :param str collection_id: (required)
2158
+ :param str session: The id of a session, to which the acquisitions returned will be restricted
2159
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
2160
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
2161
+ :param int limit: The maximum number of entries to return.
2162
+ :param int skip: The number of entries to skip.
2163
+ :param int page: The page number (i.e. skip limit*page entries)
2164
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
2165
+ :param list[str] x_accept_feature:
2166
+ :param bool async_: Perform the request asynchronously
2167
+ :return: union[list[AcquisitionListOutput],Page]
2168
+ """
2169
+
2170
+ all_params = ['collection_id','session','filter','sort','limit','skip','page','after_id','x_accept_feature',] # noqa: E501
2171
+ all_params.append('async_')
2172
+ all_params.append('_return_http_data_only')
2173
+ all_params.append('_preload_content')
2174
+ all_params.append('_request_timeout')
2175
+ all_params.append('_request_out')
2176
+
2177
+ params = locals()
2178
+ for key, val in six.iteritems(params['kwargs']):
2179
+ if key not in all_params:
2180
+ raise TypeError(
2181
+ "Got an unexpected keyword argument '%s'"
2182
+ " to method get_collection_acquisitions" % key
2183
+ )
2184
+ params[key] = val
2185
+ del params['kwargs']
2186
+ # verify the required parameter 'collection_id' is set
2187
+ if ('collection_id' not in params or
2188
+ params['collection_id'] is None):
2189
+ raise ValueError("Missing the required parameter `collection_id` when calling `get_collection_acquisitions`") # noqa: E501
2190
+ check_filename_params(params)
2191
+
2192
+ collection_formats = {}
2193
+
2194
+ path_params = {}
2195
+ if 'collection_id' in params:
2196
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
2197
+
2198
+ query_params = []
2199
+ if 'session' in params:
2200
+ query_params.append(('session', params['session'])) # noqa: E501
2201
+ if 'filter' in params:
2202
+ query_params.append(('filter', params['filter'])) # noqa: E501
2203
+ if 'sort' in params:
2204
+ query_params.append(('sort', params['sort'])) # noqa: E501
2205
+ if 'limit' in params:
2206
+ query_params.append(('limit', params['limit'])) # noqa: E501
2207
+ if 'skip' in params:
2208
+ query_params.append(('skip', params['skip'])) # noqa: E501
2209
+ if 'page' in params:
2210
+ query_params.append(('page', params['page'])) # noqa: E501
2211
+ if 'after_id' in params:
2212
+ query_params.append(('after_id', params['after_id'])) # noqa: E501
2213
+
2214
+ header_params = {}
2215
+ if 'x_accept_feature' in params:
2216
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
2217
+ collection_formats['x-accept-feature'] = '' # noqa: E501
2218
+
2219
+ form_params = []
2220
+ local_var_files = {}
2221
+
2222
+ body_params = None
2223
+ # HTTP header `Accept`
2224
+ header_params['Accept'] = self.api_client.select_header_accept(
2225
+ ['application/json']) # noqa: E501
2226
+
2227
+ # Authentication setting
2228
+ auth_settings = ['ApiKey'] # noqa: E501
2229
+
2230
+ return self.api_client.call_api(
2231
+ '/collections/{collection_id}/acquisitions', 'GET',
2232
+ path_params,
2233
+ query_params,
2234
+ header_params,
2235
+ body=body_params,
2236
+ post_params=form_params,
2237
+ files=local_var_files,
2238
+ response_type='union[list[AcquisitionListOutput],Page]', # noqa: E501
2239
+ auth_settings=auth_settings,
2240
+ async_=params.get('async_'),
2241
+ _return_http_data_only=params.get('_return_http_data_only'),
2242
+ _preload_content=params.get('_preload_content', True),
2243
+ _request_timeout=params.get('_request_timeout'),
2244
+ _request_out=params.get('_request_out'),
2245
+ collection_formats=collection_formats)
2246
+
2247
+ def get_collection_file_info(self, cid, filename, **kwargs): # noqa: E501
2248
+ """Get info for a particular file.
2249
+
2250
+ Get info for a particular file.
2251
+ This method makes a synchronous HTTP request by default.
2252
+
2253
+ :param str cid: Container Id (required)
2254
+ :param str filename: (required)
2255
+ :param bool async_: Perform the request asynchronously
2256
+ :return: FileOutput
2257
+ """
2258
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2259
+ kwargs['_return_http_data_only'] = True
2260
+
2261
+ if kwargs.get('async_'):
2262
+ return self.get_collection_file_info_with_http_info(cid, filename, **kwargs) # noqa: E501
2263
+ else:
2264
+ (data) = self.get_collection_file_info_with_http_info(cid, filename, **kwargs) # noqa: E501
2265
+ if (
2266
+ data
2267
+ and hasattr(data, 'return_value')
2268
+ and not ignore_simplified_return_value
2269
+ ):
2270
+ return data.return_value()
2271
+ return data
2272
+
2273
+
2274
+ def get_collection_file_info_with_http_info(self, cid, filename, **kwargs): # noqa: E501
2275
+ """Get info for a particular file.
2276
+
2277
+ Get info for a particular file.
2278
+ This method makes a synchronous HTTP request by default.
2279
+
2280
+ :param str cid: Container Id (required)
2281
+ :param str filename: (required)
2282
+ :param bool async_: Perform the request asynchronously
2283
+ :return: FileOutput
2284
+ """
2285
+
2286
+ all_params = ['cid','filename',] # noqa: E501
2287
+ all_params.append('async_')
2288
+ all_params.append('_return_http_data_only')
2289
+ all_params.append('_preload_content')
2290
+ all_params.append('_request_timeout')
2291
+ all_params.append('_request_out')
2292
+
2293
+ params = locals()
2294
+ for key, val in six.iteritems(params['kwargs']):
2295
+ if key not in all_params:
2296
+ raise TypeError(
2297
+ "Got an unexpected keyword argument '%s'"
2298
+ " to method get_collection_file_info" % key
2299
+ )
2300
+ params[key] = val
2301
+ del params['kwargs']
2302
+ # verify the required parameter 'cid' is set
2303
+ if ('cid' not in params or
2304
+ params['cid'] is None):
2305
+ raise ValueError("Missing the required parameter `cid` when calling `get_collection_file_info`") # noqa: E501
2306
+ # verify the required parameter 'filename' is set
2307
+ if ('filename' not in params or
2308
+ params['filename'] is None):
2309
+ raise ValueError("Missing the required parameter `filename` when calling `get_collection_file_info`") # noqa: E501
2310
+ check_filename_params(params)
2311
+
2312
+ collection_formats = {}
2313
+
2314
+ path_params = {}
2315
+ if 'cid' in params:
2316
+ path_params['cid'] = params['cid'] # noqa: E501
2317
+ if 'filename' in params:
2318
+ path_params['filename'] = params['filename'] # noqa: E501
2319
+
2320
+ query_params = []
2321
+
2322
+ header_params = {}
2323
+
2324
+ form_params = []
2325
+ local_var_files = {}
2326
+
2327
+ body_params = None
2328
+ # HTTP header `Accept`
2329
+ header_params['Accept'] = self.api_client.select_header_accept(
2330
+ ['application/json']) # noqa: E501
2331
+
2332
+ # Authentication setting
2333
+ auth_settings = ['ApiKey'] # noqa: E501
2334
+
2335
+ return self.api_client.call_api(
2336
+ '/collections/{cid}/files/{filename}/info', 'GET',
2337
+ path_params,
2338
+ query_params,
2339
+ header_params,
2340
+ body=body_params,
2341
+ post_params=form_params,
2342
+ files=local_var_files,
2343
+ response_type='FileOutput', # noqa: E501
2344
+ auth_settings=auth_settings,
2345
+ async_=params.get('async_'),
2346
+ _return_http_data_only=params.get('_return_http_data_only'),
2347
+ _preload_content=params.get('_preload_content', True),
2348
+ _request_timeout=params.get('_request_timeout'),
2349
+ _request_out=params.get('_request_out'),
2350
+ collection_formats=collection_formats)
2351
+
2352
+ def get_collection_note(self, cid, note_id, **kwargs): # noqa: E501
2353
+ """Get a note of a(n) collection.
2354
+
2355
+ Get a note of a(n) collection
2356
+ This method makes a synchronous HTTP request by default.
2357
+
2358
+ :param str cid: (required)
2359
+ :param str note_id: (required)
2360
+ :param bool async_: Perform the request asynchronously
2361
+ :return: Note
2362
+ """
2363
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2364
+ kwargs['_return_http_data_only'] = True
2365
+
2366
+ if kwargs.get('async_'):
2367
+ return self.get_collection_note_with_http_info(cid, note_id, **kwargs) # noqa: E501
2368
+ else:
2369
+ (data) = self.get_collection_note_with_http_info(cid, note_id, **kwargs) # noqa: E501
2370
+ if (
2371
+ data
2372
+ and hasattr(data, 'return_value')
2373
+ and not ignore_simplified_return_value
2374
+ ):
2375
+ return data.return_value()
2376
+ return data
2377
+
2378
+
2379
+ def get_collection_note_with_http_info(self, cid, note_id, **kwargs): # noqa: E501
2380
+ """Get a note of a(n) collection.
2381
+
2382
+ Get a note of a(n) collection
2383
+ This method makes a synchronous HTTP request by default.
2384
+
2385
+ :param str cid: (required)
2386
+ :param str note_id: (required)
2387
+ :param bool async_: Perform the request asynchronously
2388
+ :return: Note
2389
+ """
2390
+
2391
+ all_params = ['cid','note_id',] # noqa: E501
2392
+ all_params.append('async_')
2393
+ all_params.append('_return_http_data_only')
2394
+ all_params.append('_preload_content')
2395
+ all_params.append('_request_timeout')
2396
+ all_params.append('_request_out')
2397
+
2398
+ params = locals()
2399
+ for key, val in six.iteritems(params['kwargs']):
2400
+ if key not in all_params:
2401
+ raise TypeError(
2402
+ "Got an unexpected keyword argument '%s'"
2403
+ " to method get_collection_note" % key
2404
+ )
2405
+ params[key] = val
2406
+ del params['kwargs']
2407
+ # verify the required parameter 'cid' is set
2408
+ if ('cid' not in params or
2409
+ params['cid'] is None):
2410
+ raise ValueError("Missing the required parameter `cid` when calling `get_collection_note`") # noqa: E501
2411
+ # verify the required parameter 'note_id' is set
2412
+ if ('note_id' not in params or
2413
+ params['note_id'] is None):
2414
+ raise ValueError("Missing the required parameter `note_id` when calling `get_collection_note`") # noqa: E501
2415
+ check_filename_params(params)
2416
+
2417
+ collection_formats = {}
2418
+
2419
+ path_params = {}
2420
+ if 'cid' in params:
2421
+ path_params['cid'] = params['cid'] # noqa: E501
2422
+ if 'note_id' in params:
2423
+ path_params['note_id'] = params['note_id'] # noqa: E501
2424
+
2425
+ query_params = []
2426
+
2427
+ header_params = {}
2428
+
2429
+ form_params = []
2430
+ local_var_files = {}
2431
+
2432
+ body_params = None
2433
+ # HTTP header `Accept`
2434
+ header_params['Accept'] = self.api_client.select_header_accept(
2435
+ ['application/json']) # noqa: E501
2436
+
2437
+ # Authentication setting
2438
+ auth_settings = ['ApiKey'] # noqa: E501
2439
+
2440
+ return self.api_client.call_api(
2441
+ '/collections/{cid}/notes/{note_id}', 'GET',
2442
+ path_params,
2443
+ query_params,
2444
+ header_params,
2445
+ body=body_params,
2446
+ post_params=form_params,
2447
+ files=local_var_files,
2448
+ response_type='Note', # noqa: E501
2449
+ auth_settings=auth_settings,
2450
+ async_=params.get('async_'),
2451
+ _return_http_data_only=params.get('_return_http_data_only'),
2452
+ _preload_content=params.get('_preload_content', True),
2453
+ _request_timeout=params.get('_request_timeout'),
2454
+ _request_out=params.get('_request_out'),
2455
+ collection_formats=collection_formats)
2456
+
2457
+ def get_collection_sessions(self, collection_id, **kwargs): # noqa: E501
2458
+ """List sessions in a collection
2459
+
2460
+ List sessions in a collection.
2461
+ This method makes a synchronous HTTP request by default.
2462
+
2463
+ :param str collection_id: (required)
2464
+ :param bool include_all_info: Include all info in returned objects
2465
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
2466
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
2467
+ :param int limit: The maximum number of entries to return.
2468
+ :param int skip: The number of entries to skip.
2469
+ :param int page: The page number (i.e. skip limit*page entries)
2470
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
2471
+ :param list[str] x_accept_feature:
2472
+ :param bool async_: Perform the request asynchronously
2473
+ :return: union[list[SessionListOutput],Page]
2474
+ """
2475
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2476
+ kwargs['_return_http_data_only'] = True
2477
+
2478
+ if kwargs.get('async_'):
2479
+ return self.get_collection_sessions_with_http_info(collection_id, **kwargs) # noqa: E501
2480
+ else:
2481
+ (data) = self.get_collection_sessions_with_http_info(collection_id, **kwargs) # noqa: E501
2482
+ if (
2483
+ data
2484
+ and hasattr(data, 'return_value')
2485
+ and not ignore_simplified_return_value
2486
+ ):
2487
+ return data.return_value()
2488
+ return data
2489
+
2490
+
2491
+ def get_collection_sessions_with_http_info(self, collection_id, **kwargs): # noqa: E501
2492
+ """List sessions in a collection
2493
+
2494
+ List sessions in a collection.
2495
+ This method makes a synchronous HTTP request by default.
2496
+
2497
+ :param str collection_id: (required)
2498
+ :param bool include_all_info: Include all info in returned objects
2499
+ :param str filter: The filter to apply. (e.g. label=my-label,created>2018-09-22)
2500
+ :param str sort: The sort fields and order. (e.g. label:asc,created:desc)
2501
+ :param int limit: The maximum number of entries to return.
2502
+ :param int skip: The number of entries to skip.
2503
+ :param int page: The page number (i.e. skip limit*page entries)
2504
+ :param str after_id: Paginate after the given id. (Cannot be used with sort, page or skip)
2505
+ :param list[str] x_accept_feature:
2506
+ :param bool async_: Perform the request asynchronously
2507
+ :return: union[list[SessionListOutput],Page]
2508
+ """
2509
+
2510
+ all_params = ['collection_id','include_all_info','filter','sort','limit','skip','page','after_id','x_accept_feature',] # noqa: E501
2511
+ all_params.append('async_')
2512
+ all_params.append('_return_http_data_only')
2513
+ all_params.append('_preload_content')
2514
+ all_params.append('_request_timeout')
2515
+ all_params.append('_request_out')
2516
+
2517
+ params = locals()
2518
+ for key, val in six.iteritems(params['kwargs']):
2519
+ if key not in all_params:
2520
+ raise TypeError(
2521
+ "Got an unexpected keyword argument '%s'"
2522
+ " to method get_collection_sessions" % key
2523
+ )
2524
+ params[key] = val
2525
+ del params['kwargs']
2526
+ # verify the required parameter 'collection_id' is set
2527
+ if ('collection_id' not in params or
2528
+ params['collection_id'] is None):
2529
+ raise ValueError("Missing the required parameter `collection_id` when calling `get_collection_sessions`") # noqa: E501
2530
+ check_filename_params(params)
2531
+
2532
+ collection_formats = {}
2533
+
2534
+ path_params = {}
2535
+ if 'collection_id' in params:
2536
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
2537
+
2538
+ query_params = []
2539
+ if 'include_all_info' in params:
2540
+ query_params.append(('include_all_info', params['include_all_info'])) # noqa: E501
2541
+ if 'filter' in params:
2542
+ query_params.append(('filter', params['filter'])) # noqa: E501
2543
+ if 'sort' in params:
2544
+ query_params.append(('sort', params['sort'])) # noqa: E501
2545
+ if 'limit' in params:
2546
+ query_params.append(('limit', params['limit'])) # noqa: E501
2547
+ if 'skip' in params:
2548
+ query_params.append(('skip', params['skip'])) # noqa: E501
2549
+ if 'page' in params:
2550
+ query_params.append(('page', params['page'])) # noqa: E501
2551
+ if 'after_id' in params:
2552
+ query_params.append(('after_id', params['after_id'])) # noqa: E501
2553
+
2554
+ header_params = {}
2555
+ if 'x_accept_feature' in params:
2556
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
2557
+ collection_formats['x-accept-feature'] = '' # noqa: E501
2558
+
2559
+ form_params = []
2560
+ local_var_files = {}
2561
+
2562
+ body_params = None
2563
+ # HTTP header `Accept`
2564
+ header_params['Accept'] = self.api_client.select_header_accept(
2565
+ ['application/json']) # noqa: E501
2566
+
2567
+ # Authentication setting
2568
+ auth_settings = ['ApiKey'] # noqa: E501
2569
+
2570
+ return self.api_client.call_api(
2571
+ '/collections/{collection_id}/sessions', 'GET',
2572
+ path_params,
2573
+ query_params,
2574
+ header_params,
2575
+ body=body_params,
2576
+ post_params=form_params,
2577
+ files=local_var_files,
2578
+ response_type='union[list[SessionListOutput],Page]', # noqa: E501
2579
+ auth_settings=auth_settings,
2580
+ async_=params.get('async_'),
2581
+ _return_http_data_only=params.get('_return_http_data_only'),
2582
+ _preload_content=params.get('_preload_content', True),
2583
+ _request_timeout=params.get('_request_timeout'),
2584
+ _request_out=params.get('_request_out'),
2585
+ collection_formats=collection_formats)
2586
+
2587
+ def get_collection_tag(self, cid, value, **kwargs): # noqa: E501
2588
+ """Get the value of a tag, by name.
2589
+
2590
+ Get the value of a tag, by name
2591
+ This method makes a synchronous HTTP request by default.
2592
+
2593
+ :param str cid: (required)
2594
+ :param str value: The tag to interact with (required)
2595
+ :param bool async_: Perform the request asynchronously
2596
+ :return: str
2597
+ """
2598
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2599
+ kwargs['_return_http_data_only'] = True
2600
+
2601
+ if kwargs.get('async_'):
2602
+ return self.get_collection_tag_with_http_info(cid, value, **kwargs) # noqa: E501
2603
+ else:
2604
+ (data) = self.get_collection_tag_with_http_info(cid, value, **kwargs) # noqa: E501
2605
+ if (
2606
+ data
2607
+ and hasattr(data, 'return_value')
2608
+ and not ignore_simplified_return_value
2609
+ ):
2610
+ return data.return_value()
2611
+ return data
2612
+
2613
+
2614
+ def get_collection_tag_with_http_info(self, cid, value, **kwargs): # noqa: E501
2615
+ """Get the value of a tag, by name.
2616
+
2617
+ Get the value of a tag, by name
2618
+ This method makes a synchronous HTTP request by default.
2619
+
2620
+ :param str cid: (required)
2621
+ :param str value: The tag to interact with (required)
2622
+ :param bool async_: Perform the request asynchronously
2623
+ :return: str
2624
+ """
2625
+
2626
+ all_params = ['cid','value',] # noqa: E501
2627
+ all_params.append('async_')
2628
+ all_params.append('_return_http_data_only')
2629
+ all_params.append('_preload_content')
2630
+ all_params.append('_request_timeout')
2631
+ all_params.append('_request_out')
2632
+
2633
+ params = locals()
2634
+ for key, val in six.iteritems(params['kwargs']):
2635
+ if key not in all_params:
2636
+ raise TypeError(
2637
+ "Got an unexpected keyword argument '%s'"
2638
+ " to method get_collection_tag" % key
2639
+ )
2640
+ params[key] = val
2641
+ del params['kwargs']
2642
+ # verify the required parameter 'cid' is set
2643
+ if ('cid' not in params or
2644
+ params['cid'] is None):
2645
+ raise ValueError("Missing the required parameter `cid` when calling `get_collection_tag`") # noqa: E501
2646
+ # verify the required parameter 'value' is set
2647
+ if ('value' not in params or
2648
+ params['value'] is None):
2649
+ raise ValueError("Missing the required parameter `value` when calling `get_collection_tag`") # noqa: E501
2650
+ check_filename_params(params)
2651
+
2652
+ collection_formats = {}
2653
+
2654
+ path_params = {}
2655
+ if 'cid' in params:
2656
+ path_params['cid'] = params['cid'] # noqa: E501
2657
+ if 'value' in params:
2658
+ path_params['value'] = params['value'] # noqa: E501
2659
+
2660
+ query_params = []
2661
+
2662
+ header_params = {}
2663
+
2664
+ form_params = []
2665
+ local_var_files = {}
2666
+
2667
+ body_params = None
2668
+ # HTTP header `Accept`
2669
+ header_params['Accept'] = self.api_client.select_header_accept(
2670
+ ['application/json']) # noqa: E501
2671
+
2672
+ # Authentication setting
2673
+ auth_settings = ['ApiKey'] # noqa: E501
2674
+
2675
+ return self.api_client.call_api(
2676
+ '/collections/{cid}/tags/{value}', 'GET',
2677
+ path_params,
2678
+ query_params,
2679
+ header_params,
2680
+ body=body_params,
2681
+ post_params=form_params,
2682
+ files=local_var_files,
2683
+ response_type='str', # noqa: E501
2684
+ auth_settings=auth_settings,
2685
+ async_=params.get('async_'),
2686
+ _return_http_data_only=params.get('_return_http_data_only'),
2687
+ _preload_content=params.get('_preload_content', True),
2688
+ _request_timeout=params.get('_request_timeout'),
2689
+ _request_out=params.get('_request_out'),
2690
+ collection_formats=collection_formats)
2691
+
2692
+ def get_collection_user_permission(self, collection_id, user_id, **kwargs): # noqa: E501
2693
+ """List a user&#x27;s permissions for this group.
2694
+
2695
+ List a user's permissions for this group
2696
+ This method makes a synchronous HTTP request by default.
2697
+
2698
+ :param str collection_id: (required)
2699
+ :param str user_id: (required)
2700
+ :param bool async_: Perform the request asynchronously
2701
+ :return: AccessPermissionOutput
2702
+ """
2703
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2704
+ kwargs['_return_http_data_only'] = True
2705
+
2706
+ if kwargs.get('async_'):
2707
+ return self.get_collection_user_permission_with_http_info(collection_id, user_id, **kwargs) # noqa: E501
2708
+ else:
2709
+ (data) = self.get_collection_user_permission_with_http_info(collection_id, user_id, **kwargs) # noqa: E501
2710
+ if (
2711
+ data
2712
+ and hasattr(data, 'return_value')
2713
+ and not ignore_simplified_return_value
2714
+ ):
2715
+ return data.return_value()
2716
+ return data
2717
+
2718
+
2719
+ def get_collection_user_permission_with_http_info(self, collection_id, user_id, **kwargs): # noqa: E501
2720
+ """List a user&#x27;s permissions for this group.
2721
+
2722
+ List a user's permissions for this group
2723
+ This method makes a synchronous HTTP request by default.
2724
+
2725
+ :param str collection_id: (required)
2726
+ :param str user_id: (required)
2727
+ :param bool async_: Perform the request asynchronously
2728
+ :return: AccessPermissionOutput
2729
+ """
2730
+
2731
+ all_params = ['collection_id','user_id',] # noqa: E501
2732
+ all_params.append('async_')
2733
+ all_params.append('_return_http_data_only')
2734
+ all_params.append('_preload_content')
2735
+ all_params.append('_request_timeout')
2736
+ all_params.append('_request_out')
2737
+
2738
+ params = locals()
2739
+ for key, val in six.iteritems(params['kwargs']):
2740
+ if key not in all_params:
2741
+ raise TypeError(
2742
+ "Got an unexpected keyword argument '%s'"
2743
+ " to method get_collection_user_permission" % key
2744
+ )
2745
+ params[key] = val
2746
+ del params['kwargs']
2747
+ # verify the required parameter 'collection_id' is set
2748
+ if ('collection_id' not in params or
2749
+ params['collection_id'] is None):
2750
+ raise ValueError("Missing the required parameter `collection_id` when calling `get_collection_user_permission`") # noqa: E501
2751
+ # verify the required parameter 'user_id' is set
2752
+ if ('user_id' not in params or
2753
+ params['user_id'] is None):
2754
+ raise ValueError("Missing the required parameter `user_id` when calling `get_collection_user_permission`") # noqa: E501
2755
+ check_filename_params(params)
2756
+
2757
+ collection_formats = {}
2758
+
2759
+ path_params = {}
2760
+ if 'collection_id' in params:
2761
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
2762
+ if 'user_id' in params:
2763
+ path_params['user_id'] = params['user_id'] # noqa: E501
2764
+
2765
+ query_params = []
2766
+
2767
+ header_params = {}
2768
+
2769
+ form_params = []
2770
+ local_var_files = {}
2771
+
2772
+ body_params = None
2773
+ # HTTP header `Accept`
2774
+ header_params['Accept'] = self.api_client.select_header_accept(
2775
+ ['application/json']) # noqa: E501
2776
+
2777
+ # Authentication setting
2778
+ auth_settings = ['ApiKey'] # noqa: E501
2779
+
2780
+ return self.api_client.call_api(
2781
+ '/collections/{collection_id}/permissions/{user_id}', 'GET',
2782
+ path_params,
2783
+ query_params,
2784
+ header_params,
2785
+ body=body_params,
2786
+ post_params=form_params,
2787
+ files=local_var_files,
2788
+ response_type='AccessPermissionOutput', # noqa: E501
2789
+ auth_settings=auth_settings,
2790
+ async_=params.get('async_'),
2791
+ _return_http_data_only=params.get('_return_http_data_only'),
2792
+ _preload_content=params.get('_preload_content', True),
2793
+ _request_timeout=params.get('_request_timeout'),
2794
+ _request_out=params.get('_request_out'),
2795
+ collection_formats=collection_formats)
2796
+
2797
+ def modify_collection(self, collection_id, body, **kwargs): # noqa: E501
2798
+ """Update a collection and its contents
2799
+
2800
+ Update a collection and its contents
2801
+ This method makes a synchronous HTTP request by default.
2802
+
2803
+ :param str collection_id: (required)
2804
+ :param CollectionInputWithContents body: (required)
2805
+ :param bool async_: Perform the request asynchronously
2806
+ :return: ModifiedResult
2807
+ """
2808
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2809
+ kwargs['_return_http_data_only'] = True
2810
+
2811
+ if kwargs.get('async_'):
2812
+ return self.modify_collection_with_http_info(collection_id, body, **kwargs) # noqa: E501
2813
+ else:
2814
+ (data) = self.modify_collection_with_http_info(collection_id, body, **kwargs) # noqa: E501
2815
+ if (
2816
+ data
2817
+ and hasattr(data, 'return_value')
2818
+ and not ignore_simplified_return_value
2819
+ ):
2820
+ return data.return_value()
2821
+ return data
2822
+
2823
+
2824
+ def modify_collection_with_http_info(self, collection_id, body, **kwargs): # noqa: E501
2825
+ """Update a collection and its contents
2826
+
2827
+ Update a collection and its contents
2828
+ This method makes a synchronous HTTP request by default.
2829
+
2830
+ :param str collection_id: (required)
2831
+ :param CollectionInputWithContents body: (required)
2832
+ :param bool async_: Perform the request asynchronously
2833
+ :return: ModifiedResult
2834
+ """
2835
+
2836
+ all_params = ['collection_id','body',] # noqa: E501
2837
+ all_params.append('async_')
2838
+ all_params.append('_return_http_data_only')
2839
+ all_params.append('_preload_content')
2840
+ all_params.append('_request_timeout')
2841
+ all_params.append('_request_out')
2842
+
2843
+ params = locals()
2844
+ for key, val in six.iteritems(params['kwargs']):
2845
+ if key not in all_params:
2846
+ raise TypeError(
2847
+ "Got an unexpected keyword argument '%s'"
2848
+ " to method modify_collection" % key
2849
+ )
2850
+ params[key] = val
2851
+ del params['kwargs']
2852
+ # verify the required parameter 'collection_id' is set
2853
+ if ('collection_id' not in params or
2854
+ params['collection_id'] is None):
2855
+ raise ValueError("Missing the required parameter `collection_id` when calling `modify_collection`") # noqa: E501
2856
+ # verify the required parameter 'body' is set
2857
+ if ('body' not in params or
2858
+ params['body'] is None):
2859
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection`") # noqa: E501
2860
+ check_filename_params(params)
2861
+
2862
+ collection_formats = {}
2863
+
2864
+ path_params = {}
2865
+ if 'collection_id' in params:
2866
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
2867
+
2868
+ query_params = []
2869
+
2870
+ header_params = {}
2871
+
2872
+ form_params = []
2873
+ local_var_files = {}
2874
+
2875
+ body_params = None
2876
+ if 'body' in params:
2877
+ if 'CollectionInputWithContents'.startswith('union'):
2878
+ body_type = type(params['body'])
2879
+ if getattr(body_type, 'positional_to_model', None):
2880
+ body_params = body_type.positional_to_model(params['body'])
2881
+ else:
2882
+ body_params = params['body']
2883
+ else:
2884
+ body_params = flywheel.models.CollectionInputWithContents.positional_to_model(params['body'])
2885
+ # HTTP header `Accept`
2886
+ header_params['Accept'] = self.api_client.select_header_accept(
2887
+ ['application/json']) # noqa: E501
2888
+
2889
+ # HTTP header `Content-Type`
2890
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
2891
+ ['application/json']) # noqa: E501
2892
+
2893
+ # Authentication setting
2894
+ auth_settings = ['ApiKey'] # noqa: E501
2895
+
2896
+ return self.api_client.call_api(
2897
+ '/collections/{collection_id}', 'PUT',
2898
+ path_params,
2899
+ query_params,
2900
+ header_params,
2901
+ body=body_params,
2902
+ post_params=form_params,
2903
+ files=local_var_files,
2904
+ response_type='ModifiedResult', # noqa: E501
2905
+ auth_settings=auth_settings,
2906
+ async_=params.get('async_'),
2907
+ _return_http_data_only=params.get('_return_http_data_only'),
2908
+ _preload_content=params.get('_preload_content', True),
2909
+ _request_timeout=params.get('_request_timeout'),
2910
+ _request_out=params.get('_request_out'),
2911
+ collection_formats=collection_formats)
2912
+
2913
+ def modify_collection_file(self, cid, filename, body, **kwargs): # noqa: E501
2914
+ """Modify a file&#x27;s attributes
2915
+
2916
+ Note: If modifying a file's modality, the current classification will be cleared (except for items in the \"Custom\" list)
2917
+ This method makes a synchronous HTTP request by default.
2918
+
2919
+ :param str cid: (required)
2920
+ :param str filename: (required)
2921
+ :param FileModifyInput body: (required)
2922
+ :param bool async_: Perform the request asynchronously
2923
+ :return: ModifiedResult
2924
+ """
2925
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
2926
+ kwargs['_return_http_data_only'] = True
2927
+
2928
+ if kwargs.get('async_'):
2929
+ return self.modify_collection_file_with_http_info(cid, filename, body, **kwargs) # noqa: E501
2930
+ else:
2931
+ (data) = self.modify_collection_file_with_http_info(cid, filename, body, **kwargs) # noqa: E501
2932
+ if (
2933
+ data
2934
+ and hasattr(data, 'return_value')
2935
+ and not ignore_simplified_return_value
2936
+ ):
2937
+ return data.return_value()
2938
+ return data
2939
+
2940
+
2941
+ def modify_collection_file_with_http_info(self, cid, filename, body, **kwargs): # noqa: E501
2942
+ """Modify a file&#x27;s attributes
2943
+
2944
+ Note: If modifying a file's modality, the current classification will be cleared (except for items in the \"Custom\" list)
2945
+ This method makes a synchronous HTTP request by default.
2946
+
2947
+ :param str cid: (required)
2948
+ :param str filename: (required)
2949
+ :param FileModifyInput body: (required)
2950
+ :param bool async_: Perform the request asynchronously
2951
+ :return: ModifiedResult
2952
+ """
2953
+
2954
+ all_params = ['cid','filename','body',] # noqa: E501
2955
+ all_params.append('async_')
2956
+ all_params.append('_return_http_data_only')
2957
+ all_params.append('_preload_content')
2958
+ all_params.append('_request_timeout')
2959
+ all_params.append('_request_out')
2960
+
2961
+ params = locals()
2962
+ for key, val in six.iteritems(params['kwargs']):
2963
+ if key not in all_params:
2964
+ raise TypeError(
2965
+ "Got an unexpected keyword argument '%s'"
2966
+ " to method modify_collection_file" % key
2967
+ )
2968
+ params[key] = val
2969
+ del params['kwargs']
2970
+ # verify the required parameter 'cid' is set
2971
+ if ('cid' not in params or
2972
+ params['cid'] is None):
2973
+ raise ValueError("Missing the required parameter `cid` when calling `modify_collection_file`") # noqa: E501
2974
+ # verify the required parameter 'filename' is set
2975
+ if ('filename' not in params or
2976
+ params['filename'] is None):
2977
+ raise ValueError("Missing the required parameter `filename` when calling `modify_collection_file`") # noqa: E501
2978
+ # verify the required parameter 'body' is set
2979
+ if ('body' not in params or
2980
+ params['body'] is None):
2981
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection_file`") # noqa: E501
2982
+ check_filename_params(params)
2983
+
2984
+ collection_formats = {}
2985
+
2986
+ path_params = {}
2987
+ if 'cid' in params:
2988
+ path_params['cid'] = params['cid'] # noqa: E501
2989
+ if 'filename' in params:
2990
+ path_params['filename'] = params['filename'] # noqa: E501
2991
+
2992
+ query_params = []
2993
+
2994
+ header_params = {}
2995
+
2996
+ form_params = []
2997
+ local_var_files = {}
2998
+
2999
+ body_params = None
3000
+ if 'body' in params:
3001
+ if 'FileModifyInput'.startswith('union'):
3002
+ body_type = type(params['body'])
3003
+ if getattr(body_type, 'positional_to_model', None):
3004
+ body_params = body_type.positional_to_model(params['body'])
3005
+ else:
3006
+ body_params = params['body']
3007
+ else:
3008
+ body_params = flywheel.models.FileModifyInput.positional_to_model(params['body'])
3009
+ # HTTP header `Accept`
3010
+ header_params['Accept'] = self.api_client.select_header_accept(
3011
+ ['application/json']) # noqa: E501
3012
+
3013
+ # HTTP header `Content-Type`
3014
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3015
+ ['application/json']) # noqa: E501
3016
+
3017
+ # Authentication setting
3018
+ auth_settings = ['ApiKey'] # noqa: E501
3019
+
3020
+ return self.api_client.call_api(
3021
+ '/collections/{cid}/files/{filename}', 'PUT',
3022
+ path_params,
3023
+ query_params,
3024
+ header_params,
3025
+ body=body_params,
3026
+ post_params=form_params,
3027
+ files=local_var_files,
3028
+ response_type='ModifiedResult', # noqa: E501
3029
+ auth_settings=auth_settings,
3030
+ async_=params.get('async_'),
3031
+ _return_http_data_only=params.get('_return_http_data_only'),
3032
+ _preload_content=params.get('_preload_content', True),
3033
+ _request_timeout=params.get('_request_timeout'),
3034
+ _request_out=params.get('_request_out'),
3035
+ collection_formats=collection_formats)
3036
+
3037
+ def modify_collection_file_classification(self, cid, filename, body, **kwargs): # noqa: E501
3038
+ """Update classification for a particular file.
3039
+
3040
+ If replacing a file's classification, the modality can optionally be modified as well.
3041
+ This method makes a synchronous HTTP request by default.
3042
+
3043
+ :param str cid: (required)
3044
+ :param str filename: (required)
3045
+ :param FileClassificationDelta body: (required)
3046
+ :param bool async_: Perform the request asynchronously
3047
+ :return: ModifiedResult
3048
+ """
3049
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3050
+ kwargs['_return_http_data_only'] = True
3051
+
3052
+ if kwargs.get('async_'):
3053
+ return self.modify_collection_file_classification_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3054
+ else:
3055
+ (data) = self.modify_collection_file_classification_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3056
+ if (
3057
+ data
3058
+ and hasattr(data, 'return_value')
3059
+ and not ignore_simplified_return_value
3060
+ ):
3061
+ return data.return_value()
3062
+ return data
3063
+
3064
+
3065
+ def modify_collection_file_classification_with_http_info(self, cid, filename, body, **kwargs): # noqa: E501
3066
+ """Update classification for a particular file.
3067
+
3068
+ If replacing a file's classification, the modality can optionally be modified as well.
3069
+ This method makes a synchronous HTTP request by default.
3070
+
3071
+ :param str cid: (required)
3072
+ :param str filename: (required)
3073
+ :param FileClassificationDelta body: (required)
3074
+ :param bool async_: Perform the request asynchronously
3075
+ :return: ModifiedResult
3076
+ """
3077
+
3078
+ all_params = ['cid','filename','body',] # noqa: E501
3079
+ all_params.append('async_')
3080
+ all_params.append('_return_http_data_only')
3081
+ all_params.append('_preload_content')
3082
+ all_params.append('_request_timeout')
3083
+ all_params.append('_request_out')
3084
+
3085
+ params = locals()
3086
+ for key, val in six.iteritems(params['kwargs']):
3087
+ if key not in all_params:
3088
+ raise TypeError(
3089
+ "Got an unexpected keyword argument '%s'"
3090
+ " to method modify_collection_file_classification" % key
3091
+ )
3092
+ params[key] = val
3093
+ del params['kwargs']
3094
+ # verify the required parameter 'cid' is set
3095
+ if ('cid' not in params or
3096
+ params['cid'] is None):
3097
+ raise ValueError("Missing the required parameter `cid` when calling `modify_collection_file_classification`") # noqa: E501
3098
+ # verify the required parameter 'filename' is set
3099
+ if ('filename' not in params or
3100
+ params['filename'] is None):
3101
+ raise ValueError("Missing the required parameter `filename` when calling `modify_collection_file_classification`") # noqa: E501
3102
+ # verify the required parameter 'body' is set
3103
+ if ('body' not in params or
3104
+ params['body'] is None):
3105
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection_file_classification`") # noqa: E501
3106
+ check_filename_params(params)
3107
+
3108
+ collection_formats = {}
3109
+
3110
+ path_params = {}
3111
+ if 'cid' in params:
3112
+ path_params['cid'] = params['cid'] # noqa: E501
3113
+ if 'filename' in params:
3114
+ path_params['filename'] = params['filename'] # noqa: E501
3115
+
3116
+ query_params = []
3117
+
3118
+ header_params = {}
3119
+
3120
+ form_params = []
3121
+ local_var_files = {}
3122
+
3123
+ body_params = None
3124
+ if 'body' in params:
3125
+ if 'FileClassificationDelta'.startswith('union'):
3126
+ body_type = type(params['body'])
3127
+ if getattr(body_type, 'positional_to_model', None):
3128
+ body_params = body_type.positional_to_model(params['body'])
3129
+ else:
3130
+ body_params = params['body']
3131
+ else:
3132
+ body_params = flywheel.models.FileClassificationDelta.positional_to_model(params['body'])
3133
+ # HTTP header `Accept`
3134
+ header_params['Accept'] = self.api_client.select_header_accept(
3135
+ ['application/json']) # noqa: E501
3136
+
3137
+ # HTTP header `Content-Type`
3138
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3139
+ ['application/json']) # noqa: E501
3140
+
3141
+ # Authentication setting
3142
+ auth_settings = ['ApiKey'] # noqa: E501
3143
+
3144
+ return self.api_client.call_api(
3145
+ '/collections/{cid}/files/{filename}/classification', 'PATCH',
3146
+ path_params,
3147
+ query_params,
3148
+ header_params,
3149
+ body=body_params,
3150
+ post_params=form_params,
3151
+ files=local_var_files,
3152
+ response_type='ModifiedResult', # noqa: E501
3153
+ auth_settings=auth_settings,
3154
+ async_=params.get('async_'),
3155
+ _return_http_data_only=params.get('_return_http_data_only'),
3156
+ _preload_content=params.get('_preload_content', True),
3157
+ _request_timeout=params.get('_request_timeout'),
3158
+ _request_out=params.get('_request_out'),
3159
+ collection_formats=collection_formats)
3160
+
3161
+ def modify_collection_file_info(self, cid, filename, body, **kwargs): # noqa: E501
3162
+ """Update info for a particular file.
3163
+
3164
+ Modify and return the file 'info' field
3165
+ This method makes a synchronous HTTP request by default.
3166
+
3167
+ :param str cid: (required)
3168
+ :param str filename: (required)
3169
+ :param Info body: (required)
3170
+ :param bool async_: Perform the request asynchronously
3171
+ :return: ModifiedResult
3172
+ """
3173
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3174
+ kwargs['_return_http_data_only'] = True
3175
+
3176
+ if kwargs.get('async_'):
3177
+ return self.modify_collection_file_info_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3178
+ else:
3179
+ (data) = self.modify_collection_file_info_with_http_info(cid, filename, body, **kwargs) # noqa: E501
3180
+ if (
3181
+ data
3182
+ and hasattr(data, 'return_value')
3183
+ and not ignore_simplified_return_value
3184
+ ):
3185
+ return data.return_value()
3186
+ return data
3187
+
3188
+
3189
+ def modify_collection_file_info_with_http_info(self, cid, filename, body, **kwargs): # noqa: E501
3190
+ """Update info for a particular file.
3191
+
3192
+ Modify and return the file 'info' field
3193
+ This method makes a synchronous HTTP request by default.
3194
+
3195
+ :param str cid: (required)
3196
+ :param str filename: (required)
3197
+ :param Info body: (required)
3198
+ :param bool async_: Perform the request asynchronously
3199
+ :return: ModifiedResult
3200
+ """
3201
+
3202
+ all_params = ['cid','filename','body',] # noqa: E501
3203
+ all_params.append('async_')
3204
+ all_params.append('_return_http_data_only')
3205
+ all_params.append('_preload_content')
3206
+ all_params.append('_request_timeout')
3207
+ all_params.append('_request_out')
3208
+
3209
+ params = locals()
3210
+ for key, val in six.iteritems(params['kwargs']):
3211
+ if key not in all_params:
3212
+ raise TypeError(
3213
+ "Got an unexpected keyword argument '%s'"
3214
+ " to method modify_collection_file_info" % key
3215
+ )
3216
+ params[key] = val
3217
+ del params['kwargs']
3218
+ # verify the required parameter 'cid' is set
3219
+ if ('cid' not in params or
3220
+ params['cid'] is None):
3221
+ raise ValueError("Missing the required parameter `cid` when calling `modify_collection_file_info`") # noqa: E501
3222
+ # verify the required parameter 'filename' is set
3223
+ if ('filename' not in params or
3224
+ params['filename'] is None):
3225
+ raise ValueError("Missing the required parameter `filename` when calling `modify_collection_file_info`") # noqa: E501
3226
+ # verify the required parameter 'body' is set
3227
+ if ('body' not in params or
3228
+ params['body'] is None):
3229
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection_file_info`") # noqa: E501
3230
+ check_filename_params(params)
3231
+
3232
+ collection_formats = {}
3233
+
3234
+ path_params = {}
3235
+ if 'cid' in params:
3236
+ path_params['cid'] = params['cid'] # noqa: E501
3237
+ if 'filename' in params:
3238
+ path_params['filename'] = params['filename'] # noqa: E501
3239
+
3240
+ query_params = []
3241
+
3242
+ header_params = {}
3243
+
3244
+ form_params = []
3245
+ local_var_files = {}
3246
+
3247
+ body_params = None
3248
+ if 'body' in params:
3249
+ if 'Info'.startswith('union'):
3250
+ body_type = type(params['body'])
3251
+ if getattr(body_type, 'positional_to_model', None):
3252
+ body_params = body_type.positional_to_model(params['body'])
3253
+ else:
3254
+ body_params = params['body']
3255
+ else:
3256
+ body_params = flywheel.models.Info.positional_to_model(params['body'])
3257
+ # HTTP header `Accept`
3258
+ header_params['Accept'] = self.api_client.select_header_accept(
3259
+ ['application/json']) # noqa: E501
3260
+
3261
+ # HTTP header `Content-Type`
3262
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3263
+ ['application/json']) # noqa: E501
3264
+
3265
+ # Authentication setting
3266
+ auth_settings = ['ApiKey'] # noqa: E501
3267
+
3268
+ return self.api_client.call_api(
3269
+ '/collections/{cid}/files/{filename}/info', 'PATCH',
3270
+ path_params,
3271
+ query_params,
3272
+ header_params,
3273
+ body=body_params,
3274
+ post_params=form_params,
3275
+ files=local_var_files,
3276
+ response_type='ModifiedResult', # noqa: E501
3277
+ auth_settings=auth_settings,
3278
+ async_=params.get('async_'),
3279
+ _return_http_data_only=params.get('_return_http_data_only'),
3280
+ _preload_content=params.get('_preload_content', True),
3281
+ _request_timeout=params.get('_request_timeout'),
3282
+ _request_out=params.get('_request_out'),
3283
+ collection_formats=collection_formats)
3284
+
3285
+ def modify_collection_info(self, cid, body, **kwargs): # noqa: E501
3286
+ """Update or replace info for a(n) collection.
3287
+
3288
+ Update or replace info for a(n) collection. Keys that contain '$' or '.' will be sanitized in the process of being updated on the container.
3289
+ This method makes a synchronous HTTP request by default.
3290
+
3291
+ :param str cid: (required)
3292
+ :param Info body: (required)
3293
+ :param bool async_: Perform the request asynchronously
3294
+ :return: ModifiedResult
3295
+ """
3296
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3297
+ kwargs['_return_http_data_only'] = True
3298
+
3299
+ if kwargs.get('async_'):
3300
+ return self.modify_collection_info_with_http_info(cid, body, **kwargs) # noqa: E501
3301
+ else:
3302
+ (data) = self.modify_collection_info_with_http_info(cid, body, **kwargs) # noqa: E501
3303
+ if (
3304
+ data
3305
+ and hasattr(data, 'return_value')
3306
+ and not ignore_simplified_return_value
3307
+ ):
3308
+ return data.return_value()
3309
+ return data
3310
+
3311
+
3312
+ def modify_collection_info_with_http_info(self, cid, body, **kwargs): # noqa: E501
3313
+ """Update or replace info for a(n) collection.
3314
+
3315
+ Update or replace info for a(n) collection. Keys that contain '$' or '.' will be sanitized in the process of being updated on the container.
3316
+ This method makes a synchronous HTTP request by default.
3317
+
3318
+ :param str cid: (required)
3319
+ :param Info body: (required)
3320
+ :param bool async_: Perform the request asynchronously
3321
+ :return: ModifiedResult
3322
+ """
3323
+
3324
+ all_params = ['cid','body',] # noqa: E501
3325
+ all_params.append('async_')
3326
+ all_params.append('_return_http_data_only')
3327
+ all_params.append('_preload_content')
3328
+ all_params.append('_request_timeout')
3329
+ all_params.append('_request_out')
3330
+
3331
+ params = locals()
3332
+ for key, val in six.iteritems(params['kwargs']):
3333
+ if key not in all_params:
3334
+ raise TypeError(
3335
+ "Got an unexpected keyword argument '%s'"
3336
+ " to method modify_collection_info" % key
3337
+ )
3338
+ params[key] = val
3339
+ del params['kwargs']
3340
+ # verify the required parameter 'cid' is set
3341
+ if ('cid' not in params or
3342
+ params['cid'] is None):
3343
+ raise ValueError("Missing the required parameter `cid` when calling `modify_collection_info`") # noqa: E501
3344
+ # verify the required parameter 'body' is set
3345
+ if ('body' not in params or
3346
+ params['body'] is None):
3347
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection_info`") # noqa: E501
3348
+ check_filename_params(params)
3349
+
3350
+ collection_formats = {}
3351
+
3352
+ path_params = {}
3353
+ if 'cid' in params:
3354
+ path_params['cid'] = params['cid'] # noqa: E501
3355
+
3356
+ query_params = []
3357
+
3358
+ header_params = {}
3359
+
3360
+ form_params = []
3361
+ local_var_files = {}
3362
+
3363
+ body_params = None
3364
+ if 'body' in params:
3365
+ if 'Info'.startswith('union'):
3366
+ body_type = type(params['body'])
3367
+ if getattr(body_type, 'positional_to_model', None):
3368
+ body_params = body_type.positional_to_model(params['body'])
3369
+ else:
3370
+ body_params = params['body']
3371
+ else:
3372
+ body_params = flywheel.models.Info.positional_to_model(params['body'])
3373
+ # HTTP header `Accept`
3374
+ header_params['Accept'] = self.api_client.select_header_accept(
3375
+ ['application/json']) # noqa: E501
3376
+
3377
+ # HTTP header `Content-Type`
3378
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3379
+ ['application/json']) # noqa: E501
3380
+
3381
+ # Authentication setting
3382
+ auth_settings = ['ApiKey'] # noqa: E501
3383
+
3384
+ return self.api_client.call_api(
3385
+ '/collections/{cid}/info', 'PATCH',
3386
+ path_params,
3387
+ query_params,
3388
+ header_params,
3389
+ body=body_params,
3390
+ post_params=form_params,
3391
+ files=local_var_files,
3392
+ response_type='ModifiedResult', # noqa: E501
3393
+ auth_settings=auth_settings,
3394
+ async_=params.get('async_'),
3395
+ _return_http_data_only=params.get('_return_http_data_only'),
3396
+ _preload_content=params.get('_preload_content', True),
3397
+ _request_timeout=params.get('_request_timeout'),
3398
+ _request_out=params.get('_request_out'),
3399
+ collection_formats=collection_formats)
3400
+
3401
+ def modify_collection_note(self, cid, note_id, body, **kwargs): # noqa: E501
3402
+ """Update a note of a(n) collection.
3403
+
3404
+ Update a note of a(n) collection
3405
+ This method makes a synchronous HTTP request by default.
3406
+
3407
+ :param str cid: (required)
3408
+ :param str note_id: (required)
3409
+ :param NoteInput body: (required)
3410
+ :param bool async_: Perform the request asynchronously
3411
+ :return: int
3412
+ """
3413
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3414
+ kwargs['_return_http_data_only'] = True
3415
+
3416
+ if kwargs.get('async_'):
3417
+ return self.modify_collection_note_with_http_info(cid, note_id, body, **kwargs) # noqa: E501
3418
+ else:
3419
+ (data) = self.modify_collection_note_with_http_info(cid, note_id, body, **kwargs) # noqa: E501
3420
+ if (
3421
+ data
3422
+ and hasattr(data, 'return_value')
3423
+ and not ignore_simplified_return_value
3424
+ ):
3425
+ return data.return_value()
3426
+ return data
3427
+
3428
+
3429
+ def modify_collection_note_with_http_info(self, cid, note_id, body, **kwargs): # noqa: E501
3430
+ """Update a note of a(n) collection.
3431
+
3432
+ Update a note of a(n) collection
3433
+ This method makes a synchronous HTTP request by default.
3434
+
3435
+ :param str cid: (required)
3436
+ :param str note_id: (required)
3437
+ :param NoteInput body: (required)
3438
+ :param bool async_: Perform the request asynchronously
3439
+ :return: int
3440
+ """
3441
+
3442
+ all_params = ['cid','note_id','body',] # noqa: E501
3443
+ all_params.append('async_')
3444
+ all_params.append('_return_http_data_only')
3445
+ all_params.append('_preload_content')
3446
+ all_params.append('_request_timeout')
3447
+ all_params.append('_request_out')
3448
+
3449
+ params = locals()
3450
+ for key, val in six.iteritems(params['kwargs']):
3451
+ if key not in all_params:
3452
+ raise TypeError(
3453
+ "Got an unexpected keyword argument '%s'"
3454
+ " to method modify_collection_note" % key
3455
+ )
3456
+ params[key] = val
3457
+ del params['kwargs']
3458
+ # verify the required parameter 'cid' is set
3459
+ if ('cid' not in params or
3460
+ params['cid'] is None):
3461
+ raise ValueError("Missing the required parameter `cid` when calling `modify_collection_note`") # noqa: E501
3462
+ # verify the required parameter 'note_id' is set
3463
+ if ('note_id' not in params or
3464
+ params['note_id'] is None):
3465
+ raise ValueError("Missing the required parameter `note_id` when calling `modify_collection_note`") # noqa: E501
3466
+ # verify the required parameter 'body' is set
3467
+ if ('body' not in params or
3468
+ params['body'] is None):
3469
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection_note`") # noqa: E501
3470
+ check_filename_params(params)
3471
+
3472
+ collection_formats = {}
3473
+
3474
+ path_params = {}
3475
+ if 'cid' in params:
3476
+ path_params['cid'] = params['cid'] # noqa: E501
3477
+ if 'note_id' in params:
3478
+ path_params['note_id'] = params['note_id'] # noqa: E501
3479
+
3480
+ query_params = []
3481
+
3482
+ header_params = {}
3483
+
3484
+ form_params = []
3485
+ local_var_files = {}
3486
+
3487
+ body_params = None
3488
+ if 'body' in params:
3489
+ if 'NoteInput'.startswith('union'):
3490
+ body_type = type(params['body'])
3491
+ if getattr(body_type, 'positional_to_model', None):
3492
+ body_params = body_type.positional_to_model(params['body'])
3493
+ else:
3494
+ body_params = params['body']
3495
+ else:
3496
+ body_params = flywheel.models.NoteInput.positional_to_model(params['body'])
3497
+ # HTTP header `Accept`
3498
+ header_params['Accept'] = self.api_client.select_header_accept(
3499
+ ['application/json']) # noqa: E501
3500
+
3501
+ # HTTP header `Content-Type`
3502
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3503
+ ['application/json']) # noqa: E501
3504
+
3505
+ # Authentication setting
3506
+ auth_settings = ['ApiKey'] # noqa: E501
3507
+
3508
+ return self.api_client.call_api(
3509
+ '/collections/{cid}/notes/{note_id}', 'PUT',
3510
+ path_params,
3511
+ query_params,
3512
+ header_params,
3513
+ body=body_params,
3514
+ post_params=form_params,
3515
+ files=local_var_files,
3516
+ response_type='int', # noqa: E501
3517
+ auth_settings=auth_settings,
3518
+ async_=params.get('async_'),
3519
+ _return_http_data_only=params.get('_return_http_data_only'),
3520
+ _preload_content=params.get('_preload_content', True),
3521
+ _request_timeout=params.get('_request_timeout'),
3522
+ _request_out=params.get('_request_out'),
3523
+ collection_formats=collection_formats)
3524
+
3525
+ def modify_collection_user_permission(self, collection_id, user_id, body, **kwargs): # noqa: E501
3526
+ """Update a user&#x27;s permission for this group.
3527
+
3528
+ Update a users permission for this group
3529
+ This method makes a synchronous HTTP request by default.
3530
+
3531
+ :param str collection_id: (required)
3532
+ :param str user_id: (required)
3533
+ :param AccessPermissionUpdate body: (required)
3534
+ :param bool async_: Perform the request asynchronously
3535
+ :return: AccessPermissionOutput
3536
+ """
3537
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3538
+ kwargs['_return_http_data_only'] = True
3539
+
3540
+ if kwargs.get('async_'):
3541
+ return self.modify_collection_user_permission_with_http_info(collection_id, user_id, body, **kwargs) # noqa: E501
3542
+ else:
3543
+ (data) = self.modify_collection_user_permission_with_http_info(collection_id, user_id, body, **kwargs) # noqa: E501
3544
+ if (
3545
+ data
3546
+ and hasattr(data, 'return_value')
3547
+ and not ignore_simplified_return_value
3548
+ ):
3549
+ return data.return_value()
3550
+ return data
3551
+
3552
+
3553
+ def modify_collection_user_permission_with_http_info(self, collection_id, user_id, body, **kwargs): # noqa: E501
3554
+ """Update a user&#x27;s permission for this group.
3555
+
3556
+ Update a users permission for this group
3557
+ This method makes a synchronous HTTP request by default.
3558
+
3559
+ :param str collection_id: (required)
3560
+ :param str user_id: (required)
3561
+ :param AccessPermissionUpdate body: (required)
3562
+ :param bool async_: Perform the request asynchronously
3563
+ :return: AccessPermissionOutput
3564
+ """
3565
+
3566
+ all_params = ['collection_id','user_id','body',] # noqa: E501
3567
+ all_params.append('async_')
3568
+ all_params.append('_return_http_data_only')
3569
+ all_params.append('_preload_content')
3570
+ all_params.append('_request_timeout')
3571
+ all_params.append('_request_out')
3572
+
3573
+ params = locals()
3574
+ for key, val in six.iteritems(params['kwargs']):
3575
+ if key not in all_params:
3576
+ raise TypeError(
3577
+ "Got an unexpected keyword argument '%s'"
3578
+ " to method modify_collection_user_permission" % key
3579
+ )
3580
+ params[key] = val
3581
+ del params['kwargs']
3582
+ # verify the required parameter 'collection_id' is set
3583
+ if ('collection_id' not in params or
3584
+ params['collection_id'] is None):
3585
+ raise ValueError("Missing the required parameter `collection_id` when calling `modify_collection_user_permission`") # noqa: E501
3586
+ # verify the required parameter 'user_id' is set
3587
+ if ('user_id' not in params or
3588
+ params['user_id'] is None):
3589
+ raise ValueError("Missing the required parameter `user_id` when calling `modify_collection_user_permission`") # noqa: E501
3590
+ # verify the required parameter 'body' is set
3591
+ if ('body' not in params or
3592
+ params['body'] is None):
3593
+ raise ValueError("Missing the required parameter `body` when calling `modify_collection_user_permission`") # noqa: E501
3594
+ check_filename_params(params)
3595
+
3596
+ collection_formats = {}
3597
+
3598
+ path_params = {}
3599
+ if 'collection_id' in params:
3600
+ path_params['collection_id'] = params['collection_id'] # noqa: E501
3601
+ if 'user_id' in params:
3602
+ path_params['user_id'] = params['user_id'] # noqa: E501
3603
+
3604
+ query_params = []
3605
+
3606
+ header_params = {}
3607
+
3608
+ form_params = []
3609
+ local_var_files = {}
3610
+
3611
+ body_params = None
3612
+ if 'body' in params:
3613
+ if 'AccessPermissionUpdate'.startswith('union'):
3614
+ body_type = type(params['body'])
3615
+ if getattr(body_type, 'positional_to_model', None):
3616
+ body_params = body_type.positional_to_model(params['body'])
3617
+ else:
3618
+ body_params = params['body']
3619
+ else:
3620
+ body_params = flywheel.models.AccessPermissionUpdate.positional_to_model(params['body'])
3621
+ # HTTP header `Accept`
3622
+ header_params['Accept'] = self.api_client.select_header_accept(
3623
+ ['application/json']) # noqa: E501
3624
+
3625
+ # HTTP header `Content-Type`
3626
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3627
+ ['application/json']) # noqa: E501
3628
+
3629
+ # Authentication setting
3630
+ auth_settings = ['ApiKey'] # noqa: E501
3631
+
3632
+ return self.api_client.call_api(
3633
+ '/collections/{collection_id}/permissions/{user_id}', 'PUT',
3634
+ path_params,
3635
+ query_params,
3636
+ header_params,
3637
+ body=body_params,
3638
+ post_params=form_params,
3639
+ files=local_var_files,
3640
+ response_type='AccessPermissionOutput', # noqa: E501
3641
+ auth_settings=auth_settings,
3642
+ async_=params.get('async_'),
3643
+ _return_http_data_only=params.get('_return_http_data_only'),
3644
+ _preload_content=params.get('_preload_content', True),
3645
+ _request_timeout=params.get('_request_timeout'),
3646
+ _request_out=params.get('_request_out'),
3647
+ collection_formats=collection_formats)
3648
+
3649
+ def rename_collection_tag(self, cid, value, body, **kwargs): # noqa: E501
3650
+ """Rename a tag.
3651
+
3652
+ Rename a tag
3653
+ This method makes a synchronous HTTP request by default.
3654
+
3655
+ :param str cid: (required)
3656
+ :param str value: The tag to interact with (required)
3657
+ :param Tag body: (required)
3658
+ :param bool async_: Perform the request asynchronously
3659
+ :return: str
3660
+ """
3661
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3662
+ kwargs['_return_http_data_only'] = True
3663
+
3664
+ if kwargs.get('async_'):
3665
+ return self.rename_collection_tag_with_http_info(cid, value, body, **kwargs) # noqa: E501
3666
+ else:
3667
+ (data) = self.rename_collection_tag_with_http_info(cid, value, body, **kwargs) # noqa: E501
3668
+ if (
3669
+ data
3670
+ and hasattr(data, 'return_value')
3671
+ and not ignore_simplified_return_value
3672
+ ):
3673
+ return data.return_value()
3674
+ return data
3675
+
3676
+
3677
+ def rename_collection_tag_with_http_info(self, cid, value, body, **kwargs): # noqa: E501
3678
+ """Rename a tag.
3679
+
3680
+ Rename a tag
3681
+ This method makes a synchronous HTTP request by default.
3682
+
3683
+ :param str cid: (required)
3684
+ :param str value: The tag to interact with (required)
3685
+ :param Tag body: (required)
3686
+ :param bool async_: Perform the request asynchronously
3687
+ :return: str
3688
+ """
3689
+
3690
+ all_params = ['cid','value','body',] # noqa: E501
3691
+ all_params.append('async_')
3692
+ all_params.append('_return_http_data_only')
3693
+ all_params.append('_preload_content')
3694
+ all_params.append('_request_timeout')
3695
+ all_params.append('_request_out')
3696
+
3697
+ params = locals()
3698
+ for key, val in six.iteritems(params['kwargs']):
3699
+ if key not in all_params:
3700
+ raise TypeError(
3701
+ "Got an unexpected keyword argument '%s'"
3702
+ " to method rename_collection_tag" % key
3703
+ )
3704
+ params[key] = val
3705
+ del params['kwargs']
3706
+ # verify the required parameter 'cid' is set
3707
+ if ('cid' not in params or
3708
+ params['cid'] is None):
3709
+ raise ValueError("Missing the required parameter `cid` when calling `rename_collection_tag`") # noqa: E501
3710
+ # verify the required parameter 'value' is set
3711
+ if ('value' not in params or
3712
+ params['value'] is None):
3713
+ raise ValueError("Missing the required parameter `value` when calling `rename_collection_tag`") # noqa: E501
3714
+ # verify the required parameter 'body' is set
3715
+ if ('body' not in params or
3716
+ params['body'] is None):
3717
+ raise ValueError("Missing the required parameter `body` when calling `rename_collection_tag`") # noqa: E501
3718
+ check_filename_params(params)
3719
+
3720
+ collection_formats = {}
3721
+
3722
+ path_params = {}
3723
+ if 'cid' in params:
3724
+ path_params['cid'] = params['cid'] # noqa: E501
3725
+ if 'value' in params:
3726
+ path_params['value'] = params['value'] # noqa: E501
3727
+
3728
+ query_params = []
3729
+
3730
+ header_params = {}
3731
+
3732
+ form_params = []
3733
+ local_var_files = {}
3734
+
3735
+ body_params = None
3736
+ if 'body' in params:
3737
+ if 'Tag'.startswith('union'):
3738
+ body_type = type(params['body'])
3739
+ if getattr(body_type, 'positional_to_model', None):
3740
+ body_params = body_type.positional_to_model(params['body'])
3741
+ else:
3742
+ body_params = params['body']
3743
+ else:
3744
+ body_params = flywheel.models.Tag.positional_to_model(params['body'])
3745
+ # HTTP header `Accept`
3746
+ header_params['Accept'] = self.api_client.select_header_accept(
3747
+ ['application/json']) # noqa: E501
3748
+
3749
+ # HTTP header `Content-Type`
3750
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3751
+ ['application/json']) # noqa: E501
3752
+
3753
+ # Authentication setting
3754
+ auth_settings = ['ApiKey'] # noqa: E501
3755
+
3756
+ return self.api_client.call_api(
3757
+ '/collections/{cid}/tags/{value}', 'PUT',
3758
+ path_params,
3759
+ query_params,
3760
+ header_params,
3761
+ body=body_params,
3762
+ post_params=form_params,
3763
+ files=local_var_files,
3764
+ response_type='str', # noqa: E501
3765
+ auth_settings=auth_settings,
3766
+ async_=params.get('async_'),
3767
+ _return_http_data_only=params.get('_return_http_data_only'),
3768
+ _preload_content=params.get('_preload_content', True),
3769
+ _request_timeout=params.get('_request_timeout'),
3770
+ _request_out=params.get('_request_out'),
3771
+ collection_formats=collection_formats)
3772
+
3773
+ def upload_file_to_collection(self, container_id, file, **kwargs): # noqa: E501
3774
+ """Upload a file to a(n) collection.
3775
+
3776
+ Upload a file to a(n) collection.
3777
+ This method makes a synchronous HTTP request by default.
3778
+
3779
+ :param str container_id: (required)
3780
+ :param str file: The file to upload (required)
3781
+ :param bool preserve_metadata:
3782
+ :param str ticket:
3783
+ :param str id:
3784
+ :param ContainerType level:
3785
+ :param str job:
3786
+ :param object metadata: Dictionary of file metadata (type, modality, info, etc.)
3787
+ :param list[str] x_accept_feature: redirect header
3788
+ :param str content_type:
3789
+ :param bool async_: Perform the request asynchronously
3790
+ :return: union[list[FileOutput],UploadTicketOutput]
3791
+ """
3792
+ ignore_simplified_return_value = kwargs.pop('_ignore_simplified_return_value', False)
3793
+ kwargs['_return_http_data_only'] = True
3794
+
3795
+ if kwargs.get('async_'):
3796
+ return self.upload_file_to_collection_with_http_info(container_id, file, **kwargs) # noqa: E501
3797
+ else:
3798
+ (data) = self.upload_file_to_collection_with_http_info(container_id, file, **kwargs) # noqa: E501
3799
+ if (
3800
+ data
3801
+ and hasattr(data, 'return_value')
3802
+ and not ignore_simplified_return_value
3803
+ ):
3804
+ return data.return_value()
3805
+ return data
3806
+
3807
+
3808
+ def upload_file_to_collection_with_http_info(self, container_id, file, **kwargs): # noqa: E501
3809
+ """Upload a file to a(n) collection.
3810
+
3811
+ Upload a file to a(n) collection.
3812
+ This method makes a synchronous HTTP request by default.
3813
+
3814
+ :param str container_id: (required)
3815
+ :param str file: The file to upload (required)
3816
+ :param bool preserve_metadata:
3817
+ :param str ticket:
3818
+ :param str id:
3819
+ :param ContainerType level:
3820
+ :param str job:
3821
+ :param object metadata: Dictionary of file metadata (type, modality, info, etc.)
3822
+ :param list[str] x_accept_feature: redirect header
3823
+ :param str content_type:
3824
+ :param bool async_: Perform the request asynchronously
3825
+ :return: union[list[FileOutput],UploadTicketOutput]
3826
+ """
3827
+
3828
+ all_params = ['container_id','file','preserve_metadata','ticket','id','level','job','metadata','x_accept_feature','content_type',] # noqa: E501
3829
+ all_params.append('async_')
3830
+ all_params.append('_return_http_data_only')
3831
+ all_params.append('_preload_content')
3832
+ all_params.append('_request_timeout')
3833
+ all_params.append('_request_out')
3834
+
3835
+ params = locals()
3836
+ for key, val in six.iteritems(params['kwargs']):
3837
+ if key not in all_params:
3838
+ raise TypeError(
3839
+ "Got an unexpected keyword argument '%s'"
3840
+ " to method upload_file_to_collection" % key
3841
+ )
3842
+ params[key] = val
3843
+ del params['kwargs']
3844
+ # verify the required parameter 'container_id' is set
3845
+ if ('container_id' not in params or
3846
+ params['container_id'] is None):
3847
+ raise ValueError("Missing the required parameter `container_id` when calling `upload_file_to_collection`") # noqa: E501
3848
+ # verify the required parameter 'file' is set
3849
+ if ('file' not in params or
3850
+ params['file'] is None):
3851
+ raise ValueError("Missing the required parameter `file` when calling `upload_file_to_collection`") # noqa: E501
3852
+ check_filename_params(params)
3853
+
3854
+ collection_formats = {}
3855
+
3856
+ path_params = {}
3857
+ if 'container_id' in params:
3858
+ path_params['container_id'] = params['container_id'] # noqa: E501
3859
+
3860
+ query_params = []
3861
+ if 'preserve_metadata' in params:
3862
+ query_params.append(('preserve_metadata', params['preserve_metadata'])) # noqa: E501
3863
+ if 'ticket' in params:
3864
+ query_params.append(('ticket', params['ticket'])) # noqa: E501
3865
+ if 'id' in params:
3866
+ query_params.append(('id', params['id'])) # noqa: E501
3867
+ if 'level' in params:
3868
+ query_params.append(('level', params['level'])) # noqa: E501
3869
+ if 'job' in params:
3870
+ query_params.append(('job', params['job'])) # noqa: E501
3871
+
3872
+ header_params = {}
3873
+ if 'x_accept_feature' in params:
3874
+ header_params['x-accept-feature'] = params['x_accept_feature'] # noqa: E501
3875
+ collection_formats['x-accept-feature'] = '' # noqa: E501
3876
+ if 'content_type' in params:
3877
+ header_params['content-type'] = params['content_type'] # noqa: E501
3878
+
3879
+ form_params = []
3880
+ local_var_files = {}
3881
+ if 'file' in params:
3882
+ local_var_files['file'] = params['file'] # noqa: E501
3883
+ if 'metadata' in params:
3884
+ form_params.append(('metadata', params['metadata'])) # noqa: E501
3885
+
3886
+ body_params = None
3887
+ # HTTP header `Accept`
3888
+ header_params['Accept'] = self.api_client.select_header_accept(
3889
+ ['application/json']) # noqa: E501
3890
+
3891
+ # HTTP header `Content-Type`
3892
+ header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
3893
+ ['multipart/form-data']) # noqa: E501
3894
+
3895
+ # Authentication setting
3896
+ auth_settings = ['ApiKey'] # noqa: E501
3897
+
3898
+ return self.api_client.call_api(
3899
+ '/collections/{container_id}/files', 'POST',
3900
+ path_params,
3901
+ query_params,
3902
+ header_params,
3903
+ body=body_params,
3904
+ post_params=form_params,
3905
+ files=local_var_files,
3906
+ response_type='union[list[FileOutput],UploadTicketOutput]', # noqa: E501
3907
+ auth_settings=auth_settings,
3908
+ async_=params.get('async_'),
3909
+ _return_http_data_only=params.get('_return_http_data_only'),
3910
+ _preload_content=params.get('_preload_content', True),
3911
+ _request_timeout=params.get('_request_timeout'),
3912
+ _request_out=params.get('_request_out'),
3913
+ collection_formats=collection_formats)