immich 1.2.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (387) hide show
  1. immich/.openapi-generator/FILES +372 -0
  2. immich/.openapi-generator/VERSION +1 -0
  3. immich/.openapi-generator-ignore +48 -0
  4. immich/__init__.py +3 -0
  5. immich/client/__init__.py +1162 -0
  6. immich/client/api/__init__.py +39 -0
  7. immich/client/api/activities_api.py +1092 -0
  8. immich/client/api/albums_api.py +3228 -0
  9. immich/client/api/api_keys_api.py +1484 -0
  10. immich/client/api/assets_api.py +5834 -0
  11. immich/client/api/authentication_admin_api.py +254 -0
  12. immich/client/api/authentication_api.py +3881 -0
  13. immich/client/api/deprecated_api.py +2199 -0
  14. immich/client/api/download_api.py +603 -0
  15. immich/client/api/duplicates_api.py +743 -0
  16. immich/client/api/faces_api.py +1053 -0
  17. immich/client/api/jobs_api.py +783 -0
  18. immich/client/api/libraries_api.py +2004 -0
  19. immich/client/api/maintenance_admin_api.py +533 -0
  20. immich/client/api/map_api.py +640 -0
  21. immich/client/api/memories_api.py +2250 -0
  22. immich/client/api/notifications_admin_api.py +808 -0
  23. immich/client/api/notifications_api.py +1564 -0
  24. immich/client/api/partners_api.py +1278 -0
  25. immich/client/api/people_api.py +2905 -0
  26. immich/client/api/plugins_api.py +730 -0
  27. immich/client/api/queues_api.py +1292 -0
  28. immich/client/api/search_api.py +3198 -0
  29. immich/client/api/server_api.py +3466 -0
  30. immich/client/api/sessions_api.py +1472 -0
  31. immich/client/api/shared_links_api.py +2177 -0
  32. immich/client/api/stacks_api.py +1769 -0
  33. immich/client/api/sync_api.py +1512 -0
  34. immich/client/api/system_config_api.py +967 -0
  35. immich/client/api/system_metadata_api.py +964 -0
  36. immich/client/api/tags_api.py +2296 -0
  37. immich/client/api/timeline_api.py +1193 -0
  38. immich/client/api/trash_api.py +739 -0
  39. immich/client/api/users_admin_api.py +2607 -0
  40. immich/client/api/users_api.py +3577 -0
  41. immich/client/api/views_api.py +503 -0
  42. immich/client/api/workflows_api.py +1257 -0
  43. immich/client/api_client.py +756 -0
  44. immich/client/api_response.py +20 -0
  45. immich/client/configuration.py +638 -0
  46. immich/client/exceptions.py +222 -0
  47. immich/client/models/__init__.py +424 -0
  48. immich/client/models/activity_create_dto.py +94 -0
  49. immich/client/models/activity_response_dto.py +121 -0
  50. immich/client/models/activity_statistics_response_dto.py +85 -0
  51. immich/client/models/add_users_dto.py +101 -0
  52. immich/client/models/admin_onboarding_update_dto.py +82 -0
  53. immich/client/models/album_response_dto.py +199 -0
  54. immich/client/models/album_statistics_response_dto.py +90 -0
  55. immich/client/models/album_user_add_dto.py +87 -0
  56. immich/client/models/album_user_create_dto.py +87 -0
  57. immich/client/models/album_user_response_dto.py +95 -0
  58. immich/client/models/album_user_role.py +34 -0
  59. immich/client/models/albums_add_assets_dto.py +86 -0
  60. immich/client/models/albums_add_assets_response_dto.py +86 -0
  61. immich/client/models/albums_response.py +83 -0
  62. immich/client/models/albums_update.py +85 -0
  63. immich/client/models/api_key_create_dto.py +87 -0
  64. immich/client/models/api_key_create_response_dto.py +94 -0
  65. immich/client/models/api_key_response_dto.py +102 -0
  66. immich/client/models/api_key_update_dto.py +87 -0
  67. immich/client/models/asset_bulk_delete_dto.py +84 -0
  68. immich/client/models/asset_bulk_update_dto.py +143 -0
  69. immich/client/models/asset_bulk_upload_check_dto.py +98 -0
  70. immich/client/models/asset_bulk_upload_check_item.py +85 -0
  71. immich/client/models/asset_bulk_upload_check_response_dto.py +101 -0
  72. immich/client/models/asset_bulk_upload_check_result.py +126 -0
  73. immich/client/models/asset_copy_dto.py +113 -0
  74. immich/client/models/asset_delta_sync_dto.py +87 -0
  75. immich/client/models/asset_delta_sync_response_dto.py +102 -0
  76. immich/client/models/asset_face_create_dto.py +110 -0
  77. immich/client/models/asset_face_delete_dto.py +82 -0
  78. immich/client/models/asset_face_response_dto.py +125 -0
  79. immich/client/models/asset_face_update_dto.py +96 -0
  80. immich/client/models/asset_face_update_item.py +86 -0
  81. immich/client/models/asset_face_without_person_response_dto.py +111 -0
  82. immich/client/models/asset_full_sync_dto.py +95 -0
  83. immich/client/models/asset_ids_dto.py +83 -0
  84. immich/client/models/asset_ids_response_dto.py +109 -0
  85. immich/client/models/asset_job_name.py +36 -0
  86. immich/client/models/asset_jobs_dto.py +87 -0
  87. immich/client/models/asset_media_response_dto.py +84 -0
  88. immich/client/models/asset_media_size.py +35 -0
  89. immich/client/models/asset_media_status.py +35 -0
  90. immich/client/models/asset_metadata_key.py +33 -0
  91. immich/client/models/asset_metadata_response_dto.py +92 -0
  92. immich/client/models/asset_metadata_upsert_dto.py +101 -0
  93. immich/client/models/asset_metadata_upsert_item_dto.py +84 -0
  94. immich/client/models/asset_ocr_response_dto.py +145 -0
  95. immich/client/models/asset_order.py +34 -0
  96. immich/client/models/asset_response_dto.py +291 -0
  97. immich/client/models/asset_stack_response_dto.py +90 -0
  98. immich/client/models/asset_stats_response_dto.py +90 -0
  99. immich/client/models/asset_type_enum.py +36 -0
  100. immich/client/models/asset_visibility.py +36 -0
  101. immich/client/models/audio_codec.py +36 -0
  102. immich/client/models/auth_status_response_dto.py +100 -0
  103. immich/client/models/avatar_update.py +83 -0
  104. immich/client/models/bulk_id_error_reason.py +36 -0
  105. immich/client/models/bulk_id_response_dto.py +102 -0
  106. immich/client/models/bulk_ids_dto.py +83 -0
  107. immich/client/models/cast_response.py +88 -0
  108. immich/client/models/cast_update.py +82 -0
  109. immich/client/models/change_password_dto.py +101 -0
  110. immich/client/models/check_existing_assets_dto.py +91 -0
  111. immich/client/models/check_existing_assets_response_dto.py +82 -0
  112. immich/client/models/clip_config.py +85 -0
  113. immich/client/models/colorspace.py +34 -0
  114. immich/client/models/contributor_count_response_dto.py +85 -0
  115. immich/client/models/cq_mode.py +35 -0
  116. immich/client/models/create_album_dto.py +112 -0
  117. immich/client/models/create_library_dto.py +103 -0
  118. immich/client/models/create_profile_image_response_dto.py +95 -0
  119. immich/client/models/database_backup_config.py +94 -0
  120. immich/client/models/download_archive_info.py +85 -0
  121. immich/client/models/download_info_dto.py +96 -0
  122. immich/client/models/download_response.py +90 -0
  123. immich/client/models/download_response_dto.py +100 -0
  124. immich/client/models/download_update.py +93 -0
  125. immich/client/models/duplicate_detection_config.py +89 -0
  126. immich/client/models/duplicate_response_dto.py +98 -0
  127. immich/client/models/email_notifications_response.py +90 -0
  128. immich/client/models/email_notifications_update.py +90 -0
  129. immich/client/models/exif_response_dto.py +284 -0
  130. immich/client/models/face_dto.py +83 -0
  131. immich/client/models/facial_recognition_config.py +107 -0
  132. immich/client/models/folders_response.py +92 -0
  133. immich/client/models/folders_update.py +85 -0
  134. immich/client/models/image_format.py +34 -0
  135. immich/client/models/job_create_dto.py +83 -0
  136. immich/client/models/job_name.py +87 -0
  137. immich/client/models/job_settings_dto.py +83 -0
  138. immich/client/models/library_response_dto.py +118 -0
  139. immich/client/models/library_stats_response_dto.py +92 -0
  140. immich/client/models/license_key_dto.py +98 -0
  141. immich/client/models/license_response_dto.py +101 -0
  142. immich/client/models/log_level.py +38 -0
  143. immich/client/models/login_credential_dto.py +85 -0
  144. immich/client/models/login_response_dto.py +109 -0
  145. immich/client/models/logout_response_dto.py +85 -0
  146. immich/client/models/machine_learning_availability_checks_dto.py +90 -0
  147. immich/client/models/maintenance_action.py +34 -0
  148. immich/client/models/maintenance_auth_dto.py +82 -0
  149. immich/client/models/maintenance_login_dto.py +82 -0
  150. immich/client/models/manual_job_name.py +38 -0
  151. immich/client/models/map_marker_response_dto.py +111 -0
  152. immich/client/models/map_reverse_geocode_response_dto.py +105 -0
  153. immich/client/models/memories_response.py +92 -0
  154. immich/client/models/memories_update.py +86 -0
  155. immich/client/models/memory_create_dto.py +112 -0
  156. immich/client/models/memory_response_dto.py +142 -0
  157. immich/client/models/memory_search_order.py +35 -0
  158. immich/client/models/memory_statistics_response_dto.py +82 -0
  159. immich/client/models/memory_type.py +33 -0
  160. immich/client/models/memory_update_dto.py +91 -0
  161. immich/client/models/merge_person_dto.py +83 -0
  162. immich/client/models/metadata_search_dto.py +277 -0
  163. immich/client/models/notification_create_dto.py +120 -0
  164. immich/client/models/notification_delete_all_dto.py +83 -0
  165. immich/client/models/notification_dto.py +112 -0
  166. immich/client/models/notification_level.py +36 -0
  167. immich/client/models/notification_type.py +38 -0
  168. immich/client/models/notification_update_all_dto.py +90 -0
  169. immich/client/models/notification_update_dto.py +88 -0
  170. immich/client/models/o_auth_authorize_response_dto.py +82 -0
  171. immich/client/models/o_auth_callback_dto.py +90 -0
  172. immich/client/models/o_auth_config_dto.py +90 -0
  173. immich/client/models/o_auth_token_endpoint_auth_method.py +34 -0
  174. immich/client/models/ocr_config.py +109 -0
  175. immich/client/models/on_this_day_dto.py +86 -0
  176. immich/client/models/onboarding_dto.py +82 -0
  177. immich/client/models/onboarding_response_dto.py +82 -0
  178. immich/client/models/partner_create_dto.py +83 -0
  179. immich/client/models/partner_direction.py +34 -0
  180. immich/client/models/partner_response_dto.py +108 -0
  181. immich/client/models/partner_update_dto.py +82 -0
  182. immich/client/models/people_response.py +92 -0
  183. immich/client/models/people_response_dto.py +104 -0
  184. immich/client/models/people_update.py +85 -0
  185. immich/client/models/people_update_dto.py +96 -0
  186. immich/client/models/people_update_item.py +128 -0
  187. immich/client/models/permission.py +177 -0
  188. immich/client/models/person_create_dto.py +117 -0
  189. immich/client/models/person_response_dto.py +115 -0
  190. immich/client/models/person_statistics_response_dto.py +82 -0
  191. immich/client/models/person_update_dto.py +125 -0
  192. immich/client/models/person_with_faces_response_dto.py +133 -0
  193. immich/client/models/pin_code_change_dto.py +90 -0
  194. immich/client/models/pin_code_reset_dto.py +85 -0
  195. immich/client/models/pin_code_setup_dto.py +82 -0
  196. immich/client/models/places_response_dto.py +100 -0
  197. immich/client/models/plugin_action_response_dto.py +112 -0
  198. immich/client/models/plugin_context_type.py +35 -0
  199. immich/client/models/plugin_filter_response_dto.py +112 -0
  200. immich/client/models/plugin_response_dto.py +139 -0
  201. immich/client/models/plugin_trigger_response_dto.py +87 -0
  202. immich/client/models/plugin_trigger_type.py +34 -0
  203. immich/client/models/purchase_response.py +88 -0
  204. immich/client/models/purchase_update.py +92 -0
  205. immich/client/models/queue_command.py +37 -0
  206. immich/client/models/queue_command_dto.py +86 -0
  207. immich/client/models/queue_delete_dto.py +85 -0
  208. immich/client/models/queue_job_response_dto.py +93 -0
  209. immich/client/models/queue_job_status.py +38 -0
  210. immich/client/models/queue_name.py +49 -0
  211. immich/client/models/queue_response_dto.py +97 -0
  212. immich/client/models/queue_response_legacy_dto.py +100 -0
  213. immich/client/models/queue_statistics_dto.py +103 -0
  214. immich/client/models/queue_status_legacy_dto.py +85 -0
  215. immich/client/models/queue_update_dto.py +82 -0
  216. immich/client/models/queues_response_legacy_dto.py +242 -0
  217. immich/client/models/random_search_dto.py +234 -0
  218. immich/client/models/ratings_response.py +84 -0
  219. immich/client/models/ratings_update.py +82 -0
  220. immich/client/models/reaction_level.py +34 -0
  221. immich/client/models/reaction_type.py +34 -0
  222. immich/client/models/reverse_geocoding_state_response_dto.py +101 -0
  223. immich/client/models/search_album_response_dto.py +114 -0
  224. immich/client/models/search_asset_response_dto.py +127 -0
  225. immich/client/models/search_explore_item.py +94 -0
  226. immich/client/models/search_explore_response_dto.py +98 -0
  227. immich/client/models/search_facet_count_response_dto.py +85 -0
  228. immich/client/models/search_facet_response_dto.py +103 -0
  229. immich/client/models/search_response_dto.py +100 -0
  230. immich/client/models/search_statistics_response_dto.py +82 -0
  231. immich/client/models/search_suggestion_type.py +38 -0
  232. immich/client/models/server_about_response_dto.py +156 -0
  233. immich/client/models/server_apk_links_dto.py +97 -0
  234. immich/client/models/server_config_dto.py +118 -0
  235. immich/client/models/server_features_dto.py +130 -0
  236. immich/client/models/server_media_types_response_dto.py +90 -0
  237. immich/client/models/server_ping_response.py +87 -0
  238. immich/client/models/server_stats_response_dto.py +119 -0
  239. immich/client/models/server_storage_response_dto.py +108 -0
  240. immich/client/models/server_theme_dto.py +82 -0
  241. immich/client/models/server_version_history_response_dto.py +91 -0
  242. immich/client/models/server_version_response_dto.py +90 -0
  243. immich/client/models/session_create_dto.py +96 -0
  244. immich/client/models/session_create_response_dto.py +120 -0
  245. immich/client/models/session_response_dto.py +117 -0
  246. immich/client/models/session_unlock_dto.py +85 -0
  247. immich/client/models/session_update_dto.py +84 -0
  248. immich/client/models/set_maintenance_mode_dto.py +83 -0
  249. immich/client/models/shared_link_create_dto.py +142 -0
  250. immich/client/models/shared_link_edit_dto.py +134 -0
  251. immich/client/models/shared_link_response_dto.py +173 -0
  252. immich/client/models/shared_link_type.py +34 -0
  253. immich/client/models/shared_links_response.py +92 -0
  254. immich/client/models/shared_links_update.py +85 -0
  255. immich/client/models/sign_up_dto.py +90 -0
  256. immich/client/models/smart_search_dto.py +245 -0
  257. immich/client/models/source_type.py +35 -0
  258. immich/client/models/stack_create_dto.py +86 -0
  259. immich/client/models/stack_response_dto.py +100 -0
  260. immich/client/models/stack_update_dto.py +83 -0
  261. immich/client/models/statistics_search_dto.py +217 -0
  262. immich/client/models/sync_ack_delete_dto.py +83 -0
  263. immich/client/models/sync_ack_dto.py +84 -0
  264. immich/client/models/sync_ack_set_dto.py +83 -0
  265. immich/client/models/sync_album_delete_v1.py +82 -0
  266. immich/client/models/sync_album_to_asset_delete_v1.py +85 -0
  267. immich/client/models/sync_album_to_asset_v1.py +85 -0
  268. immich/client/models/sync_album_user_delete_v1.py +85 -0
  269. immich/client/models/sync_album_user_v1.py +91 -0
  270. immich/client/models/sync_album_v1.py +122 -0
  271. immich/client/models/sync_asset_delete_v1.py +82 -0
  272. immich/client/models/sync_asset_exif_v1.py +296 -0
  273. immich/client/models/sync_asset_face_delete_v1.py +82 -0
  274. immich/client/models/sync_asset_face_v1.py +120 -0
  275. immich/client/models/sync_asset_metadata_delete_v1.py +86 -0
  276. immich/client/models/sync_asset_metadata_v1.py +91 -0
  277. immich/client/models/sync_asset_v1.py +187 -0
  278. immich/client/models/sync_auth_user_v1.py +154 -0
  279. immich/client/models/sync_entity_type.py +79 -0
  280. immich/client/models/sync_memory_asset_delete_v1.py +85 -0
  281. immich/client/models/sync_memory_asset_v1.py +85 -0
  282. immich/client/models/sync_memory_delete_v1.py +82 -0
  283. immich/client/models/sync_memory_v1.py +143 -0
  284. immich/client/models/sync_partner_delete_v1.py +88 -0
  285. immich/client/models/sync_partner_v1.py +90 -0
  286. immich/client/models/sync_person_delete_v1.py +82 -0
  287. immich/client/models/sync_person_v1.py +131 -0
  288. immich/client/models/sync_request_type.py +52 -0
  289. immich/client/models/sync_stack_delete_v1.py +82 -0
  290. immich/client/models/sync_stack_v1.py +101 -0
  291. immich/client/models/sync_stream_dto.py +86 -0
  292. immich/client/models/sync_user_delete_v1.py +82 -0
  293. immich/client/models/sync_user_metadata_delete_v1.py +84 -0
  294. immich/client/models/sync_user_metadata_v1.py +91 -0
  295. immich/client/models/sync_user_v1.py +118 -0
  296. immich/client/models/system_config_backups_dto.py +92 -0
  297. immich/client/models/system_config_dto.py +302 -0
  298. immich/client/models/system_config_f_fmpeg_dto.py +156 -0
  299. immich/client/models/system_config_faces_dto.py +82 -0
  300. immich/client/models/system_config_generated_fullsize_image_dto.py +92 -0
  301. immich/client/models/system_config_generated_image_dto.py +92 -0
  302. immich/client/models/system_config_image_dto.py +124 -0
  303. immich/client/models/system_config_job_dto.py +194 -0
  304. immich/client/models/system_config_library_dto.py +104 -0
  305. immich/client/models/system_config_library_scan_dto.py +85 -0
  306. immich/client/models/system_config_library_watch_dto.py +82 -0
  307. immich/client/models/system_config_logging_dto.py +86 -0
  308. immich/client/models/system_config_machine_learning_dto.py +147 -0
  309. immich/client/models/system_config_map_dto.py +90 -0
  310. immich/client/models/system_config_metadata_dto.py +92 -0
  311. immich/client/models/system_config_new_version_check_dto.py +82 -0
  312. immich/client/models/system_config_nightly_tasks_dto.py +103 -0
  313. immich/client/models/system_config_notifications_dto.py +92 -0
  314. immich/client/models/system_config_o_auth_dto.py +155 -0
  315. immich/client/models/system_config_password_login_dto.py +82 -0
  316. immich/client/models/system_config_reverse_geocoding_dto.py +82 -0
  317. immich/client/models/system_config_server_dto.py +94 -0
  318. immich/client/models/system_config_smtp_dto.py +100 -0
  319. immich/client/models/system_config_smtp_transport_dto.py +107 -0
  320. immich/client/models/system_config_storage_template_dto.py +94 -0
  321. immich/client/models/system_config_template_emails_dto.py +94 -0
  322. immich/client/models/system_config_template_storage_option_dto.py +109 -0
  323. immich/client/models/system_config_templates_dto.py +94 -0
  324. immich/client/models/system_config_theme_dto.py +82 -0
  325. immich/client/models/system_config_trash_dto.py +86 -0
  326. immich/client/models/system_config_user_dto.py +83 -0
  327. immich/client/models/tag_bulk_assets_dto.py +86 -0
  328. immich/client/models/tag_bulk_assets_response_dto.py +82 -0
  329. immich/client/models/tag_create_dto.py +111 -0
  330. immich/client/models/tag_response_dto.py +107 -0
  331. immich/client/models/tag_update_dto.py +87 -0
  332. immich/client/models/tag_upsert_dto.py +82 -0
  333. immich/client/models/tags_response.py +92 -0
  334. immich/client/models/tags_update.py +85 -0
  335. immich/client/models/template_dto.py +82 -0
  336. immich/client/models/template_response_dto.py +83 -0
  337. immich/client/models/test_email_response_dto.py +82 -0
  338. immich/client/models/time_bucket_asset_response_dto.py +195 -0
  339. immich/client/models/time_buckets_response_dto.py +88 -0
  340. immich/client/models/tone_mapping.py +36 -0
  341. immich/client/models/transcode_hw_accel.py +37 -0
  342. immich/client/models/transcode_policy.py +37 -0
  343. immich/client/models/trash_response_dto.py +82 -0
  344. immich/client/models/update_album_dto.py +106 -0
  345. immich/client/models/update_album_user_dto.py +83 -0
  346. immich/client/models/update_asset_dto.py +135 -0
  347. immich/client/models/update_library_dto.py +95 -0
  348. immich/client/models/usage_by_user_dto.py +117 -0
  349. immich/client/models/user_admin_create_dto.py +136 -0
  350. immich/client/models/user_admin_delete_dto.py +82 -0
  351. immich/client/models/user_admin_response_dto.py +176 -0
  352. immich/client/models/user_admin_update_dto.py +141 -0
  353. immich/client/models/user_avatar_color.py +42 -0
  354. immich/client/models/user_license.py +91 -0
  355. immich/client/models/user_metadata_key.py +35 -0
  356. immich/client/models/user_preferences_response_dto.py +186 -0
  357. immich/client/models/user_preferences_update_dto.py +197 -0
  358. immich/client/models/user_response_dto.py +105 -0
  359. immich/client/models/user_status.py +35 -0
  360. immich/client/models/user_update_me_dto.py +98 -0
  361. immich/client/models/validate_access_token_response_dto.py +82 -0
  362. immich/client/models/validate_library_dto.py +93 -0
  363. immich/client/models/validate_library_import_path_response_dto.py +92 -0
  364. immich/client/models/validate_library_response_dto.py +103 -0
  365. immich/client/models/version_check_state_response_dto.py +98 -0
  366. immich/client/models/video_codec.py +36 -0
  367. immich/client/models/video_container.py +36 -0
  368. immich/client/models/workflow_action_item_dto.py +89 -0
  369. immich/client/models/workflow_action_response_dto.py +105 -0
  370. immich/client/models/workflow_create_dto.py +128 -0
  371. immich/client/models/workflow_filter_item_dto.py +89 -0
  372. immich/client/models/workflow_filter_response_dto.py +105 -0
  373. immich/client/models/workflow_response_dto.py +144 -0
  374. immich/client/models/workflow_update_dto.py +128 -0
  375. immich/client/py.typed +0 -0
  376. immich/client/rest.py +199 -0
  377. immich/client_wrapper/__init__.py +15 -0
  378. immich/client_wrapper/assets_api_wrapped.py +87 -0
  379. immich/client_wrapper/download_api_wrapped.py +111 -0
  380. immich/client_wrapper/users_api_wrapped.py +41 -0
  381. immich/py.typed +0 -0
  382. immich/sdk.py +365 -0
  383. immich/utils.py +100 -0
  384. immich-1.2.1.dist-info/METADATA +166 -0
  385. immich-1.2.1.dist-info/RECORD +387 -0
  386. immich-1.2.1.dist-info/WHEEL +4 -0
  387. immich-1.2.1.dist-info/licenses/LICENSE +9 -0
@@ -0,0 +1,3228 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Immich
5
+
6
+ Immich API
7
+
8
+ The version of the OpenAPI document: 2.4.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import StrictBool
19
+ from uuid import UUID
20
+ from immich.client.models.add_users_dto import AddUsersDto
21
+ from immich.client.models.album_response_dto import AlbumResponseDto
22
+ from immich.client.models.album_statistics_response_dto import (
23
+ AlbumStatisticsResponseDto,
24
+ )
25
+ from immich.client.models.albums_add_assets_dto import AlbumsAddAssetsDto
26
+ from immich.client.models.albums_add_assets_response_dto import (
27
+ AlbumsAddAssetsResponseDto,
28
+ )
29
+ from immich.client.models.bulk_id_response_dto import BulkIdResponseDto
30
+ from immich.client.models.bulk_ids_dto import BulkIdsDto
31
+ from immich.client.models.create_album_dto import CreateAlbumDto
32
+ from immich.client.models.update_album_dto import UpdateAlbumDto
33
+ from immich.client.models.update_album_user_dto import UpdateAlbumUserDto
34
+
35
+ from immich.client.api_client import ApiClient, RequestSerialized
36
+ from immich.client.api_response import ApiResponse
37
+ from immich.client.rest import RESTResponseType
38
+
39
+
40
+ class AlbumsApi:
41
+ """NOTE: This class is auto generated by OpenAPI Generator
42
+ Ref: https://openapi-generator.tech
43
+
44
+ Do not edit the class manually.
45
+ """
46
+
47
+ def __init__(self, api_client=None) -> None:
48
+ if api_client is None:
49
+ api_client = ApiClient.get_default()
50
+ self.api_client = api_client
51
+
52
+ @validate_call
53
+ async def add_assets_to_album(
54
+ self,
55
+ id: UUID,
56
+ bulk_ids_dto: BulkIdsDto,
57
+ key: Optional[StrictStr] = None,
58
+ slug: Optional[StrictStr] = None,
59
+ _request_timeout: Union[
60
+ None,
61
+ Annotated[StrictFloat, Field(gt=0)],
62
+ Tuple[
63
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
64
+ ],
65
+ ] = None,
66
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
67
+ _content_type: Optional[StrictStr] = None,
68
+ _headers: Optional[Dict[StrictStr, Any]] = None,
69
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
70
+ ) -> List[BulkIdResponseDto]:
71
+ """Add assets to an album
72
+
73
+ Add multiple assets to a specific album by its ID.
74
+
75
+ :param id: (required)
76
+ :type id: UUID
77
+ :param bulk_ids_dto: (required)
78
+ :type bulk_ids_dto: BulkIdsDto
79
+ :param key:
80
+ :type key: str
81
+ :param slug:
82
+ :type slug: str
83
+ :param _request_timeout: timeout setting for this request. If one
84
+ number provided, it will be total request
85
+ timeout. It can also be a pair (tuple) of
86
+ (connection, read) timeouts.
87
+ :type _request_timeout: int, tuple(int, int), optional
88
+ :param _request_auth: set to override the auth_settings for an a single
89
+ request; this effectively ignores the
90
+ authentication in the spec for a single request.
91
+ :type _request_auth: dict, optional
92
+ :param _content_type: force content-type for the request.
93
+ :type _content_type: str, Optional
94
+ :param _headers: set to override the headers for a single
95
+ request; this effectively ignores the headers
96
+ in the spec for a single request.
97
+ :type _headers: dict, optional
98
+ :param _host_index: set to override the host_index for a single
99
+ request; this effectively ignores the host_index
100
+ in the spec for a single request.
101
+ :type _host_index: int, optional
102
+ :return: Returns the result object.
103
+ """ # noqa: E501
104
+
105
+ _param = self._add_assets_to_album_serialize(
106
+ id=id,
107
+ bulk_ids_dto=bulk_ids_dto,
108
+ key=key,
109
+ slug=slug,
110
+ _request_auth=_request_auth,
111
+ _content_type=_content_type,
112
+ _headers=_headers,
113
+ _host_index=_host_index,
114
+ )
115
+
116
+ _response_types_map: Dict[str, Optional[str]] = {
117
+ "200": "List[BulkIdResponseDto]",
118
+ }
119
+ response_data = await self.api_client.call_api(
120
+ *_param, _request_timeout=_request_timeout
121
+ )
122
+ await response_data.read()
123
+ return self.api_client.response_deserialize(
124
+ response_data=response_data,
125
+ response_types_map=_response_types_map,
126
+ ).data
127
+
128
+ @validate_call
129
+ async def add_assets_to_album_with_http_info(
130
+ self,
131
+ id: UUID,
132
+ bulk_ids_dto: BulkIdsDto,
133
+ key: Optional[StrictStr] = None,
134
+ slug: Optional[StrictStr] = None,
135
+ _request_timeout: Union[
136
+ None,
137
+ Annotated[StrictFloat, Field(gt=0)],
138
+ Tuple[
139
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
140
+ ],
141
+ ] = None,
142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
143
+ _content_type: Optional[StrictStr] = None,
144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
146
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
147
+ """Add assets to an album
148
+
149
+ Add multiple assets to a specific album by its ID.
150
+
151
+ :param id: (required)
152
+ :type id: UUID
153
+ :param bulk_ids_dto: (required)
154
+ :type bulk_ids_dto: BulkIdsDto
155
+ :param key:
156
+ :type key: str
157
+ :param slug:
158
+ :type slug: str
159
+ :param _request_timeout: timeout setting for this request. If one
160
+ number provided, it will be total request
161
+ timeout. It can also be a pair (tuple) of
162
+ (connection, read) timeouts.
163
+ :type _request_timeout: int, tuple(int, int), optional
164
+ :param _request_auth: set to override the auth_settings for an a single
165
+ request; this effectively ignores the
166
+ authentication in the spec for a single request.
167
+ :type _request_auth: dict, optional
168
+ :param _content_type: force content-type for the request.
169
+ :type _content_type: str, Optional
170
+ :param _headers: set to override the headers for a single
171
+ request; this effectively ignores the headers
172
+ in the spec for a single request.
173
+ :type _headers: dict, optional
174
+ :param _host_index: set to override the host_index for a single
175
+ request; this effectively ignores the host_index
176
+ in the spec for a single request.
177
+ :type _host_index: int, optional
178
+ :return: Returns the result object.
179
+ """ # noqa: E501
180
+
181
+ _param = self._add_assets_to_album_serialize(
182
+ id=id,
183
+ bulk_ids_dto=bulk_ids_dto,
184
+ key=key,
185
+ slug=slug,
186
+ _request_auth=_request_auth,
187
+ _content_type=_content_type,
188
+ _headers=_headers,
189
+ _host_index=_host_index,
190
+ )
191
+
192
+ _response_types_map: Dict[str, Optional[str]] = {
193
+ "200": "List[BulkIdResponseDto]",
194
+ }
195
+ response_data = await self.api_client.call_api(
196
+ *_param, _request_timeout=_request_timeout
197
+ )
198
+ await response_data.read()
199
+ return self.api_client.response_deserialize(
200
+ response_data=response_data,
201
+ response_types_map=_response_types_map,
202
+ )
203
+
204
+ @validate_call
205
+ async def add_assets_to_album_without_preload_content(
206
+ self,
207
+ id: UUID,
208
+ bulk_ids_dto: BulkIdsDto,
209
+ key: Optional[StrictStr] = None,
210
+ slug: Optional[StrictStr] = None,
211
+ _request_timeout: Union[
212
+ None,
213
+ Annotated[StrictFloat, Field(gt=0)],
214
+ Tuple[
215
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
216
+ ],
217
+ ] = None,
218
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
219
+ _content_type: Optional[StrictStr] = None,
220
+ _headers: Optional[Dict[StrictStr, Any]] = None,
221
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
222
+ ) -> RESTResponseType:
223
+ """Add assets to an album
224
+
225
+ Add multiple assets to a specific album by its ID.
226
+
227
+ :param id: (required)
228
+ :type id: UUID
229
+ :param bulk_ids_dto: (required)
230
+ :type bulk_ids_dto: BulkIdsDto
231
+ :param key:
232
+ :type key: str
233
+ :param slug:
234
+ :type slug: str
235
+ :param _request_timeout: timeout setting for this request. If one
236
+ number provided, it will be total request
237
+ timeout. It can also be a pair (tuple) of
238
+ (connection, read) timeouts.
239
+ :type _request_timeout: int, tuple(int, int), optional
240
+ :param _request_auth: set to override the auth_settings for an a single
241
+ request; this effectively ignores the
242
+ authentication in the spec for a single request.
243
+ :type _request_auth: dict, optional
244
+ :param _content_type: force content-type for the request.
245
+ :type _content_type: str, Optional
246
+ :param _headers: set to override the headers for a single
247
+ request; this effectively ignores the headers
248
+ in the spec for a single request.
249
+ :type _headers: dict, optional
250
+ :param _host_index: set to override the host_index for a single
251
+ request; this effectively ignores the host_index
252
+ in the spec for a single request.
253
+ :type _host_index: int, optional
254
+ :return: Returns the result object.
255
+ """ # noqa: E501
256
+
257
+ _param = self._add_assets_to_album_serialize(
258
+ id=id,
259
+ bulk_ids_dto=bulk_ids_dto,
260
+ key=key,
261
+ slug=slug,
262
+ _request_auth=_request_auth,
263
+ _content_type=_content_type,
264
+ _headers=_headers,
265
+ _host_index=_host_index,
266
+ )
267
+
268
+ _response_types_map: Dict[str, Optional[str]] = {
269
+ "200": "List[BulkIdResponseDto]",
270
+ }
271
+ response_data = await self.api_client.call_api(
272
+ *_param, _request_timeout=_request_timeout
273
+ )
274
+ return response_data.response
275
+
276
+ def _add_assets_to_album_serialize(
277
+ self,
278
+ id,
279
+ bulk_ids_dto,
280
+ key,
281
+ slug,
282
+ _request_auth,
283
+ _content_type,
284
+ _headers,
285
+ _host_index,
286
+ ) -> RequestSerialized:
287
+ _host = None
288
+
289
+ _collection_formats: Dict[str, str] = {}
290
+
291
+ _path_params: Dict[str, str] = {}
292
+ _query_params: List[Tuple[str, str]] = []
293
+ _header_params: Dict[str, Optional[str]] = _headers or {}
294
+ _form_params: List[Tuple[str, str]] = []
295
+ _files: Dict[
296
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
297
+ ] = {}
298
+ _body_params: Optional[bytes] = None
299
+
300
+ # process the path parameters
301
+ if id is not None:
302
+ _path_params["id"] = id
303
+ # process the query parameters
304
+ if key is not None:
305
+ _query_params.append(("key", key))
306
+
307
+ if slug is not None:
308
+ _query_params.append(("slug", slug))
309
+
310
+ # process the header parameters
311
+ # process the form parameters
312
+ # process the body parameter
313
+ if bulk_ids_dto is not None:
314
+ _body_params = bulk_ids_dto
315
+
316
+ # set the HTTP header `Accept`
317
+ if "Accept" not in _header_params:
318
+ _header_params["Accept"] = self.api_client.select_header_accept(
319
+ ["application/json"]
320
+ )
321
+
322
+ # set the HTTP header `Content-Type`
323
+ if _content_type:
324
+ _header_params["Content-Type"] = _content_type
325
+ else:
326
+ _default_content_type = self.api_client.select_header_content_type(
327
+ ["application/json"]
328
+ )
329
+ if _default_content_type is not None:
330
+ _header_params["Content-Type"] = _default_content_type
331
+
332
+ # authentication setting
333
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
334
+
335
+ return self.api_client.param_serialize(
336
+ method="PUT",
337
+ resource_path="/albums/{id}/assets",
338
+ path_params=_path_params,
339
+ query_params=_query_params,
340
+ header_params=_header_params,
341
+ body=_body_params,
342
+ post_params=_form_params,
343
+ files=_files,
344
+ auth_settings=_auth_settings,
345
+ collection_formats=_collection_formats,
346
+ _host=_host,
347
+ _request_auth=_request_auth,
348
+ )
349
+
350
+ @validate_call
351
+ async def add_assets_to_albums(
352
+ self,
353
+ albums_add_assets_dto: AlbumsAddAssetsDto,
354
+ key: Optional[StrictStr] = None,
355
+ slug: Optional[StrictStr] = None,
356
+ _request_timeout: Union[
357
+ None,
358
+ Annotated[StrictFloat, Field(gt=0)],
359
+ Tuple[
360
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
361
+ ],
362
+ ] = None,
363
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
364
+ _content_type: Optional[StrictStr] = None,
365
+ _headers: Optional[Dict[StrictStr, Any]] = None,
366
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
367
+ ) -> AlbumsAddAssetsResponseDto:
368
+ """Add assets to albums
369
+
370
+ Send a list of asset IDs and album IDs to add each asset to each album.
371
+
372
+ :param albums_add_assets_dto: (required)
373
+ :type albums_add_assets_dto: AlbumsAddAssetsDto
374
+ :param key:
375
+ :type key: str
376
+ :param slug:
377
+ :type slug: str
378
+ :param _request_timeout: timeout setting for this request. If one
379
+ number provided, it will be total request
380
+ timeout. It can also be a pair (tuple) of
381
+ (connection, read) timeouts.
382
+ :type _request_timeout: int, tuple(int, int), optional
383
+ :param _request_auth: set to override the auth_settings for an a single
384
+ request; this effectively ignores the
385
+ authentication in the spec for a single request.
386
+ :type _request_auth: dict, optional
387
+ :param _content_type: force content-type for the request.
388
+ :type _content_type: str, Optional
389
+ :param _headers: set to override the headers for a single
390
+ request; this effectively ignores the headers
391
+ in the spec for a single request.
392
+ :type _headers: dict, optional
393
+ :param _host_index: set to override the host_index for a single
394
+ request; this effectively ignores the host_index
395
+ in the spec for a single request.
396
+ :type _host_index: int, optional
397
+ :return: Returns the result object.
398
+ """ # noqa: E501
399
+
400
+ _param = self._add_assets_to_albums_serialize(
401
+ albums_add_assets_dto=albums_add_assets_dto,
402
+ key=key,
403
+ slug=slug,
404
+ _request_auth=_request_auth,
405
+ _content_type=_content_type,
406
+ _headers=_headers,
407
+ _host_index=_host_index,
408
+ )
409
+
410
+ _response_types_map: Dict[str, Optional[str]] = {
411
+ "200": "AlbumsAddAssetsResponseDto",
412
+ }
413
+ response_data = await self.api_client.call_api(
414
+ *_param, _request_timeout=_request_timeout
415
+ )
416
+ await response_data.read()
417
+ return self.api_client.response_deserialize(
418
+ response_data=response_data,
419
+ response_types_map=_response_types_map,
420
+ ).data
421
+
422
+ @validate_call
423
+ async def add_assets_to_albums_with_http_info(
424
+ self,
425
+ albums_add_assets_dto: AlbumsAddAssetsDto,
426
+ key: Optional[StrictStr] = None,
427
+ slug: Optional[StrictStr] = None,
428
+ _request_timeout: Union[
429
+ None,
430
+ Annotated[StrictFloat, Field(gt=0)],
431
+ Tuple[
432
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
433
+ ],
434
+ ] = None,
435
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
436
+ _content_type: Optional[StrictStr] = None,
437
+ _headers: Optional[Dict[StrictStr, Any]] = None,
438
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
439
+ ) -> ApiResponse[AlbumsAddAssetsResponseDto]:
440
+ """Add assets to albums
441
+
442
+ Send a list of asset IDs and album IDs to add each asset to each album.
443
+
444
+ :param albums_add_assets_dto: (required)
445
+ :type albums_add_assets_dto: AlbumsAddAssetsDto
446
+ :param key:
447
+ :type key: str
448
+ :param slug:
449
+ :type slug: str
450
+ :param _request_timeout: timeout setting for this request. If one
451
+ number provided, it will be total request
452
+ timeout. It can also be a pair (tuple) of
453
+ (connection, read) timeouts.
454
+ :type _request_timeout: int, tuple(int, int), optional
455
+ :param _request_auth: set to override the auth_settings for an a single
456
+ request; this effectively ignores the
457
+ authentication in the spec for a single request.
458
+ :type _request_auth: dict, optional
459
+ :param _content_type: force content-type for the request.
460
+ :type _content_type: str, Optional
461
+ :param _headers: set to override the headers for a single
462
+ request; this effectively ignores the headers
463
+ in the spec for a single request.
464
+ :type _headers: dict, optional
465
+ :param _host_index: set to override the host_index for a single
466
+ request; this effectively ignores the host_index
467
+ in the spec for a single request.
468
+ :type _host_index: int, optional
469
+ :return: Returns the result object.
470
+ """ # noqa: E501
471
+
472
+ _param = self._add_assets_to_albums_serialize(
473
+ albums_add_assets_dto=albums_add_assets_dto,
474
+ key=key,
475
+ slug=slug,
476
+ _request_auth=_request_auth,
477
+ _content_type=_content_type,
478
+ _headers=_headers,
479
+ _host_index=_host_index,
480
+ )
481
+
482
+ _response_types_map: Dict[str, Optional[str]] = {
483
+ "200": "AlbumsAddAssetsResponseDto",
484
+ }
485
+ response_data = await self.api_client.call_api(
486
+ *_param, _request_timeout=_request_timeout
487
+ )
488
+ await response_data.read()
489
+ return self.api_client.response_deserialize(
490
+ response_data=response_data,
491
+ response_types_map=_response_types_map,
492
+ )
493
+
494
+ @validate_call
495
+ async def add_assets_to_albums_without_preload_content(
496
+ self,
497
+ albums_add_assets_dto: AlbumsAddAssetsDto,
498
+ key: Optional[StrictStr] = None,
499
+ slug: Optional[StrictStr] = None,
500
+ _request_timeout: Union[
501
+ None,
502
+ Annotated[StrictFloat, Field(gt=0)],
503
+ Tuple[
504
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
505
+ ],
506
+ ] = None,
507
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
508
+ _content_type: Optional[StrictStr] = None,
509
+ _headers: Optional[Dict[StrictStr, Any]] = None,
510
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
511
+ ) -> RESTResponseType:
512
+ """Add assets to albums
513
+
514
+ Send a list of asset IDs and album IDs to add each asset to each album.
515
+
516
+ :param albums_add_assets_dto: (required)
517
+ :type albums_add_assets_dto: AlbumsAddAssetsDto
518
+ :param key:
519
+ :type key: str
520
+ :param slug:
521
+ :type slug: str
522
+ :param _request_timeout: timeout setting for this request. If one
523
+ number provided, it will be total request
524
+ timeout. It can also be a pair (tuple) of
525
+ (connection, read) timeouts.
526
+ :type _request_timeout: int, tuple(int, int), optional
527
+ :param _request_auth: set to override the auth_settings for an a single
528
+ request; this effectively ignores the
529
+ authentication in the spec for a single request.
530
+ :type _request_auth: dict, optional
531
+ :param _content_type: force content-type for the request.
532
+ :type _content_type: str, Optional
533
+ :param _headers: set to override the headers for a single
534
+ request; this effectively ignores the headers
535
+ in the spec for a single request.
536
+ :type _headers: dict, optional
537
+ :param _host_index: set to override the host_index for a single
538
+ request; this effectively ignores the host_index
539
+ in the spec for a single request.
540
+ :type _host_index: int, optional
541
+ :return: Returns the result object.
542
+ """ # noqa: E501
543
+
544
+ _param = self._add_assets_to_albums_serialize(
545
+ albums_add_assets_dto=albums_add_assets_dto,
546
+ key=key,
547
+ slug=slug,
548
+ _request_auth=_request_auth,
549
+ _content_type=_content_type,
550
+ _headers=_headers,
551
+ _host_index=_host_index,
552
+ )
553
+
554
+ _response_types_map: Dict[str, Optional[str]] = {
555
+ "200": "AlbumsAddAssetsResponseDto",
556
+ }
557
+ response_data = await self.api_client.call_api(
558
+ *_param, _request_timeout=_request_timeout
559
+ )
560
+ return response_data.response
561
+
562
+ def _add_assets_to_albums_serialize(
563
+ self,
564
+ albums_add_assets_dto,
565
+ key,
566
+ slug,
567
+ _request_auth,
568
+ _content_type,
569
+ _headers,
570
+ _host_index,
571
+ ) -> RequestSerialized:
572
+ _host = None
573
+
574
+ _collection_formats: Dict[str, str] = {}
575
+
576
+ _path_params: Dict[str, str] = {}
577
+ _query_params: List[Tuple[str, str]] = []
578
+ _header_params: Dict[str, Optional[str]] = _headers or {}
579
+ _form_params: List[Tuple[str, str]] = []
580
+ _files: Dict[
581
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
582
+ ] = {}
583
+ _body_params: Optional[bytes] = None
584
+
585
+ # process the path parameters
586
+ # process the query parameters
587
+ if key is not None:
588
+ _query_params.append(("key", key))
589
+
590
+ if slug is not None:
591
+ _query_params.append(("slug", slug))
592
+
593
+ # process the header parameters
594
+ # process the form parameters
595
+ # process the body parameter
596
+ if albums_add_assets_dto is not None:
597
+ _body_params = albums_add_assets_dto
598
+
599
+ # set the HTTP header `Accept`
600
+ if "Accept" not in _header_params:
601
+ _header_params["Accept"] = self.api_client.select_header_accept(
602
+ ["application/json"]
603
+ )
604
+
605
+ # set the HTTP header `Content-Type`
606
+ if _content_type:
607
+ _header_params["Content-Type"] = _content_type
608
+ else:
609
+ _default_content_type = self.api_client.select_header_content_type(
610
+ ["application/json"]
611
+ )
612
+ if _default_content_type is not None:
613
+ _header_params["Content-Type"] = _default_content_type
614
+
615
+ # authentication setting
616
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
617
+
618
+ return self.api_client.param_serialize(
619
+ method="PUT",
620
+ resource_path="/albums/assets",
621
+ path_params=_path_params,
622
+ query_params=_query_params,
623
+ header_params=_header_params,
624
+ body=_body_params,
625
+ post_params=_form_params,
626
+ files=_files,
627
+ auth_settings=_auth_settings,
628
+ collection_formats=_collection_formats,
629
+ _host=_host,
630
+ _request_auth=_request_auth,
631
+ )
632
+
633
+ @validate_call
634
+ async def add_users_to_album(
635
+ self,
636
+ id: UUID,
637
+ add_users_dto: AddUsersDto,
638
+ _request_timeout: Union[
639
+ None,
640
+ Annotated[StrictFloat, Field(gt=0)],
641
+ Tuple[
642
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
643
+ ],
644
+ ] = None,
645
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
646
+ _content_type: Optional[StrictStr] = None,
647
+ _headers: Optional[Dict[StrictStr, Any]] = None,
648
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
649
+ ) -> AlbumResponseDto:
650
+ """Share album with users
651
+
652
+ Share an album with multiple users. Each user can be given a specific role in the album.
653
+
654
+ :param id: (required)
655
+ :type id: UUID
656
+ :param add_users_dto: (required)
657
+ :type add_users_dto: AddUsersDto
658
+ :param _request_timeout: timeout setting for this request. If one
659
+ number provided, it will be total request
660
+ timeout. It can also be a pair (tuple) of
661
+ (connection, read) timeouts.
662
+ :type _request_timeout: int, tuple(int, int), optional
663
+ :param _request_auth: set to override the auth_settings for an a single
664
+ request; this effectively ignores the
665
+ authentication in the spec for a single request.
666
+ :type _request_auth: dict, optional
667
+ :param _content_type: force content-type for the request.
668
+ :type _content_type: str, Optional
669
+ :param _headers: set to override the headers for a single
670
+ request; this effectively ignores the headers
671
+ in the spec for a single request.
672
+ :type _headers: dict, optional
673
+ :param _host_index: set to override the host_index for a single
674
+ request; this effectively ignores the host_index
675
+ in the spec for a single request.
676
+ :type _host_index: int, optional
677
+ :return: Returns the result object.
678
+ """ # noqa: E501
679
+
680
+ _param = self._add_users_to_album_serialize(
681
+ id=id,
682
+ add_users_dto=add_users_dto,
683
+ _request_auth=_request_auth,
684
+ _content_type=_content_type,
685
+ _headers=_headers,
686
+ _host_index=_host_index,
687
+ )
688
+
689
+ _response_types_map: Dict[str, Optional[str]] = {
690
+ "200": "AlbumResponseDto",
691
+ }
692
+ response_data = await self.api_client.call_api(
693
+ *_param, _request_timeout=_request_timeout
694
+ )
695
+ await response_data.read()
696
+ return self.api_client.response_deserialize(
697
+ response_data=response_data,
698
+ response_types_map=_response_types_map,
699
+ ).data
700
+
701
+ @validate_call
702
+ async def add_users_to_album_with_http_info(
703
+ self,
704
+ id: UUID,
705
+ add_users_dto: AddUsersDto,
706
+ _request_timeout: Union[
707
+ None,
708
+ Annotated[StrictFloat, Field(gt=0)],
709
+ Tuple[
710
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
711
+ ],
712
+ ] = None,
713
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
714
+ _content_type: Optional[StrictStr] = None,
715
+ _headers: Optional[Dict[StrictStr, Any]] = None,
716
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
717
+ ) -> ApiResponse[AlbumResponseDto]:
718
+ """Share album with users
719
+
720
+ Share an album with multiple users. Each user can be given a specific role in the album.
721
+
722
+ :param id: (required)
723
+ :type id: UUID
724
+ :param add_users_dto: (required)
725
+ :type add_users_dto: AddUsersDto
726
+ :param _request_timeout: timeout setting for this request. If one
727
+ number provided, it will be total request
728
+ timeout. It can also be a pair (tuple) of
729
+ (connection, read) timeouts.
730
+ :type _request_timeout: int, tuple(int, int), optional
731
+ :param _request_auth: set to override the auth_settings for an a single
732
+ request; this effectively ignores the
733
+ authentication in the spec for a single request.
734
+ :type _request_auth: dict, optional
735
+ :param _content_type: force content-type for the request.
736
+ :type _content_type: str, Optional
737
+ :param _headers: set to override the headers for a single
738
+ request; this effectively ignores the headers
739
+ in the spec for a single request.
740
+ :type _headers: dict, optional
741
+ :param _host_index: set to override the host_index for a single
742
+ request; this effectively ignores the host_index
743
+ in the spec for a single request.
744
+ :type _host_index: int, optional
745
+ :return: Returns the result object.
746
+ """ # noqa: E501
747
+
748
+ _param = self._add_users_to_album_serialize(
749
+ id=id,
750
+ add_users_dto=add_users_dto,
751
+ _request_auth=_request_auth,
752
+ _content_type=_content_type,
753
+ _headers=_headers,
754
+ _host_index=_host_index,
755
+ )
756
+
757
+ _response_types_map: Dict[str, Optional[str]] = {
758
+ "200": "AlbumResponseDto",
759
+ }
760
+ response_data = await self.api_client.call_api(
761
+ *_param, _request_timeout=_request_timeout
762
+ )
763
+ await response_data.read()
764
+ return self.api_client.response_deserialize(
765
+ response_data=response_data,
766
+ response_types_map=_response_types_map,
767
+ )
768
+
769
+ @validate_call
770
+ async def add_users_to_album_without_preload_content(
771
+ self,
772
+ id: UUID,
773
+ add_users_dto: AddUsersDto,
774
+ _request_timeout: Union[
775
+ None,
776
+ Annotated[StrictFloat, Field(gt=0)],
777
+ Tuple[
778
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
779
+ ],
780
+ ] = None,
781
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
782
+ _content_type: Optional[StrictStr] = None,
783
+ _headers: Optional[Dict[StrictStr, Any]] = None,
784
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
785
+ ) -> RESTResponseType:
786
+ """Share album with users
787
+
788
+ Share an album with multiple users. Each user can be given a specific role in the album.
789
+
790
+ :param id: (required)
791
+ :type id: UUID
792
+ :param add_users_dto: (required)
793
+ :type add_users_dto: AddUsersDto
794
+ :param _request_timeout: timeout setting for this request. If one
795
+ number provided, it will be total request
796
+ timeout. It can also be a pair (tuple) of
797
+ (connection, read) timeouts.
798
+ :type _request_timeout: int, tuple(int, int), optional
799
+ :param _request_auth: set to override the auth_settings for an a single
800
+ request; this effectively ignores the
801
+ authentication in the spec for a single request.
802
+ :type _request_auth: dict, optional
803
+ :param _content_type: force content-type for the request.
804
+ :type _content_type: str, Optional
805
+ :param _headers: set to override the headers for a single
806
+ request; this effectively ignores the headers
807
+ in the spec for a single request.
808
+ :type _headers: dict, optional
809
+ :param _host_index: set to override the host_index for a single
810
+ request; this effectively ignores the host_index
811
+ in the spec for a single request.
812
+ :type _host_index: int, optional
813
+ :return: Returns the result object.
814
+ """ # noqa: E501
815
+
816
+ _param = self._add_users_to_album_serialize(
817
+ id=id,
818
+ add_users_dto=add_users_dto,
819
+ _request_auth=_request_auth,
820
+ _content_type=_content_type,
821
+ _headers=_headers,
822
+ _host_index=_host_index,
823
+ )
824
+
825
+ _response_types_map: Dict[str, Optional[str]] = {
826
+ "200": "AlbumResponseDto",
827
+ }
828
+ response_data = await self.api_client.call_api(
829
+ *_param, _request_timeout=_request_timeout
830
+ )
831
+ return response_data.response
832
+
833
+ def _add_users_to_album_serialize(
834
+ self,
835
+ id,
836
+ add_users_dto,
837
+ _request_auth,
838
+ _content_type,
839
+ _headers,
840
+ _host_index,
841
+ ) -> RequestSerialized:
842
+ _host = None
843
+
844
+ _collection_formats: Dict[str, str] = {}
845
+
846
+ _path_params: Dict[str, str] = {}
847
+ _query_params: List[Tuple[str, str]] = []
848
+ _header_params: Dict[str, Optional[str]] = _headers or {}
849
+ _form_params: List[Tuple[str, str]] = []
850
+ _files: Dict[
851
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
852
+ ] = {}
853
+ _body_params: Optional[bytes] = None
854
+
855
+ # process the path parameters
856
+ if id is not None:
857
+ _path_params["id"] = id
858
+ # process the query parameters
859
+ # process the header parameters
860
+ # process the form parameters
861
+ # process the body parameter
862
+ if add_users_dto is not None:
863
+ _body_params = add_users_dto
864
+
865
+ # set the HTTP header `Accept`
866
+ if "Accept" not in _header_params:
867
+ _header_params["Accept"] = self.api_client.select_header_accept(
868
+ ["application/json"]
869
+ )
870
+
871
+ # set the HTTP header `Content-Type`
872
+ if _content_type:
873
+ _header_params["Content-Type"] = _content_type
874
+ else:
875
+ _default_content_type = self.api_client.select_header_content_type(
876
+ ["application/json"]
877
+ )
878
+ if _default_content_type is not None:
879
+ _header_params["Content-Type"] = _default_content_type
880
+
881
+ # authentication setting
882
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
883
+
884
+ return self.api_client.param_serialize(
885
+ method="PUT",
886
+ resource_path="/albums/{id}/users",
887
+ path_params=_path_params,
888
+ query_params=_query_params,
889
+ header_params=_header_params,
890
+ body=_body_params,
891
+ post_params=_form_params,
892
+ files=_files,
893
+ auth_settings=_auth_settings,
894
+ collection_formats=_collection_formats,
895
+ _host=_host,
896
+ _request_auth=_request_auth,
897
+ )
898
+
899
+ @validate_call
900
+ async def create_album(
901
+ self,
902
+ create_album_dto: CreateAlbumDto,
903
+ _request_timeout: Union[
904
+ None,
905
+ Annotated[StrictFloat, Field(gt=0)],
906
+ Tuple[
907
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
908
+ ],
909
+ ] = None,
910
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
911
+ _content_type: Optional[StrictStr] = None,
912
+ _headers: Optional[Dict[StrictStr, Any]] = None,
913
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
914
+ ) -> AlbumResponseDto:
915
+ """Create an album
916
+
917
+ Create a new album. The album can also be created with initial users and assets.
918
+
919
+ :param create_album_dto: (required)
920
+ :type create_album_dto: CreateAlbumDto
921
+ :param _request_timeout: timeout setting for this request. If one
922
+ number provided, it will be total request
923
+ timeout. It can also be a pair (tuple) of
924
+ (connection, read) timeouts.
925
+ :type _request_timeout: int, tuple(int, int), optional
926
+ :param _request_auth: set to override the auth_settings for an a single
927
+ request; this effectively ignores the
928
+ authentication in the spec for a single request.
929
+ :type _request_auth: dict, optional
930
+ :param _content_type: force content-type for the request.
931
+ :type _content_type: str, Optional
932
+ :param _headers: set to override the headers for a single
933
+ request; this effectively ignores the headers
934
+ in the spec for a single request.
935
+ :type _headers: dict, optional
936
+ :param _host_index: set to override the host_index for a single
937
+ request; this effectively ignores the host_index
938
+ in the spec for a single request.
939
+ :type _host_index: int, optional
940
+ :return: Returns the result object.
941
+ """ # noqa: E501
942
+
943
+ _param = self._create_album_serialize(
944
+ create_album_dto=create_album_dto,
945
+ _request_auth=_request_auth,
946
+ _content_type=_content_type,
947
+ _headers=_headers,
948
+ _host_index=_host_index,
949
+ )
950
+
951
+ _response_types_map: Dict[str, Optional[str]] = {
952
+ "201": "AlbumResponseDto",
953
+ }
954
+ response_data = await self.api_client.call_api(
955
+ *_param, _request_timeout=_request_timeout
956
+ )
957
+ await response_data.read()
958
+ return self.api_client.response_deserialize(
959
+ response_data=response_data,
960
+ response_types_map=_response_types_map,
961
+ ).data
962
+
963
+ @validate_call
964
+ async def create_album_with_http_info(
965
+ self,
966
+ create_album_dto: CreateAlbumDto,
967
+ _request_timeout: Union[
968
+ None,
969
+ Annotated[StrictFloat, Field(gt=0)],
970
+ Tuple[
971
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
972
+ ],
973
+ ] = None,
974
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
975
+ _content_type: Optional[StrictStr] = None,
976
+ _headers: Optional[Dict[StrictStr, Any]] = None,
977
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
978
+ ) -> ApiResponse[AlbumResponseDto]:
979
+ """Create an album
980
+
981
+ Create a new album. The album can also be created with initial users and assets.
982
+
983
+ :param create_album_dto: (required)
984
+ :type create_album_dto: CreateAlbumDto
985
+ :param _request_timeout: timeout setting for this request. If one
986
+ number provided, it will be total request
987
+ timeout. It can also be a pair (tuple) of
988
+ (connection, read) timeouts.
989
+ :type _request_timeout: int, tuple(int, int), optional
990
+ :param _request_auth: set to override the auth_settings for an a single
991
+ request; this effectively ignores the
992
+ authentication in the spec for a single request.
993
+ :type _request_auth: dict, optional
994
+ :param _content_type: force content-type for the request.
995
+ :type _content_type: str, Optional
996
+ :param _headers: set to override the headers for a single
997
+ request; this effectively ignores the headers
998
+ in the spec for a single request.
999
+ :type _headers: dict, optional
1000
+ :param _host_index: set to override the host_index for a single
1001
+ request; this effectively ignores the host_index
1002
+ in the spec for a single request.
1003
+ :type _host_index: int, optional
1004
+ :return: Returns the result object.
1005
+ """ # noqa: E501
1006
+
1007
+ _param = self._create_album_serialize(
1008
+ create_album_dto=create_album_dto,
1009
+ _request_auth=_request_auth,
1010
+ _content_type=_content_type,
1011
+ _headers=_headers,
1012
+ _host_index=_host_index,
1013
+ )
1014
+
1015
+ _response_types_map: Dict[str, Optional[str]] = {
1016
+ "201": "AlbumResponseDto",
1017
+ }
1018
+ response_data = await self.api_client.call_api(
1019
+ *_param, _request_timeout=_request_timeout
1020
+ )
1021
+ await response_data.read()
1022
+ return self.api_client.response_deserialize(
1023
+ response_data=response_data,
1024
+ response_types_map=_response_types_map,
1025
+ )
1026
+
1027
+ @validate_call
1028
+ async def create_album_without_preload_content(
1029
+ self,
1030
+ create_album_dto: CreateAlbumDto,
1031
+ _request_timeout: Union[
1032
+ None,
1033
+ Annotated[StrictFloat, Field(gt=0)],
1034
+ Tuple[
1035
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1036
+ ],
1037
+ ] = None,
1038
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1039
+ _content_type: Optional[StrictStr] = None,
1040
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1041
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1042
+ ) -> RESTResponseType:
1043
+ """Create an album
1044
+
1045
+ Create a new album. The album can also be created with initial users and assets.
1046
+
1047
+ :param create_album_dto: (required)
1048
+ :type create_album_dto: CreateAlbumDto
1049
+ :param _request_timeout: timeout setting for this request. If one
1050
+ number provided, it will be total request
1051
+ timeout. It can also be a pair (tuple) of
1052
+ (connection, read) timeouts.
1053
+ :type _request_timeout: int, tuple(int, int), optional
1054
+ :param _request_auth: set to override the auth_settings for an a single
1055
+ request; this effectively ignores the
1056
+ authentication in the spec for a single request.
1057
+ :type _request_auth: dict, optional
1058
+ :param _content_type: force content-type for the request.
1059
+ :type _content_type: str, Optional
1060
+ :param _headers: set to override the headers for a single
1061
+ request; this effectively ignores the headers
1062
+ in the spec for a single request.
1063
+ :type _headers: dict, optional
1064
+ :param _host_index: set to override the host_index for a single
1065
+ request; this effectively ignores the host_index
1066
+ in the spec for a single request.
1067
+ :type _host_index: int, optional
1068
+ :return: Returns the result object.
1069
+ """ # noqa: E501
1070
+
1071
+ _param = self._create_album_serialize(
1072
+ create_album_dto=create_album_dto,
1073
+ _request_auth=_request_auth,
1074
+ _content_type=_content_type,
1075
+ _headers=_headers,
1076
+ _host_index=_host_index,
1077
+ )
1078
+
1079
+ _response_types_map: Dict[str, Optional[str]] = {
1080
+ "201": "AlbumResponseDto",
1081
+ }
1082
+ response_data = await self.api_client.call_api(
1083
+ *_param, _request_timeout=_request_timeout
1084
+ )
1085
+ return response_data.response
1086
+
1087
+ def _create_album_serialize(
1088
+ self,
1089
+ create_album_dto,
1090
+ _request_auth,
1091
+ _content_type,
1092
+ _headers,
1093
+ _host_index,
1094
+ ) -> RequestSerialized:
1095
+ _host = None
1096
+
1097
+ _collection_formats: Dict[str, str] = {}
1098
+
1099
+ _path_params: Dict[str, str] = {}
1100
+ _query_params: List[Tuple[str, str]] = []
1101
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1102
+ _form_params: List[Tuple[str, str]] = []
1103
+ _files: Dict[
1104
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1105
+ ] = {}
1106
+ _body_params: Optional[bytes] = None
1107
+
1108
+ # process the path parameters
1109
+ # process the query parameters
1110
+ # process the header parameters
1111
+ # process the form parameters
1112
+ # process the body parameter
1113
+ if create_album_dto is not None:
1114
+ _body_params = create_album_dto
1115
+
1116
+ # set the HTTP header `Accept`
1117
+ if "Accept" not in _header_params:
1118
+ _header_params["Accept"] = self.api_client.select_header_accept(
1119
+ ["application/json"]
1120
+ )
1121
+
1122
+ # set the HTTP header `Content-Type`
1123
+ if _content_type:
1124
+ _header_params["Content-Type"] = _content_type
1125
+ else:
1126
+ _default_content_type = self.api_client.select_header_content_type(
1127
+ ["application/json"]
1128
+ )
1129
+ if _default_content_type is not None:
1130
+ _header_params["Content-Type"] = _default_content_type
1131
+
1132
+ # authentication setting
1133
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1134
+
1135
+ return self.api_client.param_serialize(
1136
+ method="POST",
1137
+ resource_path="/albums",
1138
+ path_params=_path_params,
1139
+ query_params=_query_params,
1140
+ header_params=_header_params,
1141
+ body=_body_params,
1142
+ post_params=_form_params,
1143
+ files=_files,
1144
+ auth_settings=_auth_settings,
1145
+ collection_formats=_collection_formats,
1146
+ _host=_host,
1147
+ _request_auth=_request_auth,
1148
+ )
1149
+
1150
+ @validate_call
1151
+ async def delete_album(
1152
+ self,
1153
+ id: UUID,
1154
+ _request_timeout: Union[
1155
+ None,
1156
+ Annotated[StrictFloat, Field(gt=0)],
1157
+ Tuple[
1158
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1159
+ ],
1160
+ ] = None,
1161
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1162
+ _content_type: Optional[StrictStr] = None,
1163
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1164
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1165
+ ) -> None:
1166
+ """Delete an album
1167
+
1168
+ Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.
1169
+
1170
+ :param id: (required)
1171
+ :type id: UUID
1172
+ :param _request_timeout: timeout setting for this request. If one
1173
+ number provided, it will be total request
1174
+ timeout. It can also be a pair (tuple) of
1175
+ (connection, read) timeouts.
1176
+ :type _request_timeout: int, tuple(int, int), optional
1177
+ :param _request_auth: set to override the auth_settings for an a single
1178
+ request; this effectively ignores the
1179
+ authentication in the spec for a single request.
1180
+ :type _request_auth: dict, optional
1181
+ :param _content_type: force content-type for the request.
1182
+ :type _content_type: str, Optional
1183
+ :param _headers: set to override the headers for a single
1184
+ request; this effectively ignores the headers
1185
+ in the spec for a single request.
1186
+ :type _headers: dict, optional
1187
+ :param _host_index: set to override the host_index for a single
1188
+ request; this effectively ignores the host_index
1189
+ in the spec for a single request.
1190
+ :type _host_index: int, optional
1191
+ :return: Returns the result object.
1192
+ """ # noqa: E501
1193
+
1194
+ _param = self._delete_album_serialize(
1195
+ id=id,
1196
+ _request_auth=_request_auth,
1197
+ _content_type=_content_type,
1198
+ _headers=_headers,
1199
+ _host_index=_host_index,
1200
+ )
1201
+
1202
+ _response_types_map: Dict[str, Optional[str]] = {
1203
+ "204": None,
1204
+ }
1205
+ response_data = await self.api_client.call_api(
1206
+ *_param, _request_timeout=_request_timeout
1207
+ )
1208
+ await response_data.read()
1209
+ return self.api_client.response_deserialize(
1210
+ response_data=response_data,
1211
+ response_types_map=_response_types_map,
1212
+ ).data
1213
+
1214
+ @validate_call
1215
+ async def delete_album_with_http_info(
1216
+ self,
1217
+ id: UUID,
1218
+ _request_timeout: Union[
1219
+ None,
1220
+ Annotated[StrictFloat, Field(gt=0)],
1221
+ Tuple[
1222
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1223
+ ],
1224
+ ] = None,
1225
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1226
+ _content_type: Optional[StrictStr] = None,
1227
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1228
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1229
+ ) -> ApiResponse[None]:
1230
+ """Delete an album
1231
+
1232
+ Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.
1233
+
1234
+ :param id: (required)
1235
+ :type id: UUID
1236
+ :param _request_timeout: timeout setting for this request. If one
1237
+ number provided, it will be total request
1238
+ timeout. It can also be a pair (tuple) of
1239
+ (connection, read) timeouts.
1240
+ :type _request_timeout: int, tuple(int, int), optional
1241
+ :param _request_auth: set to override the auth_settings for an a single
1242
+ request; this effectively ignores the
1243
+ authentication in the spec for a single request.
1244
+ :type _request_auth: dict, optional
1245
+ :param _content_type: force content-type for the request.
1246
+ :type _content_type: str, Optional
1247
+ :param _headers: set to override the headers for a single
1248
+ request; this effectively ignores the headers
1249
+ in the spec for a single request.
1250
+ :type _headers: dict, optional
1251
+ :param _host_index: set to override the host_index for a single
1252
+ request; this effectively ignores the host_index
1253
+ in the spec for a single request.
1254
+ :type _host_index: int, optional
1255
+ :return: Returns the result object.
1256
+ """ # noqa: E501
1257
+
1258
+ _param = self._delete_album_serialize(
1259
+ id=id,
1260
+ _request_auth=_request_auth,
1261
+ _content_type=_content_type,
1262
+ _headers=_headers,
1263
+ _host_index=_host_index,
1264
+ )
1265
+
1266
+ _response_types_map: Dict[str, Optional[str]] = {
1267
+ "204": None,
1268
+ }
1269
+ response_data = await self.api_client.call_api(
1270
+ *_param, _request_timeout=_request_timeout
1271
+ )
1272
+ await response_data.read()
1273
+ return self.api_client.response_deserialize(
1274
+ response_data=response_data,
1275
+ response_types_map=_response_types_map,
1276
+ )
1277
+
1278
+ @validate_call
1279
+ async def delete_album_without_preload_content(
1280
+ self,
1281
+ id: UUID,
1282
+ _request_timeout: Union[
1283
+ None,
1284
+ Annotated[StrictFloat, Field(gt=0)],
1285
+ Tuple[
1286
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1287
+ ],
1288
+ ] = None,
1289
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1290
+ _content_type: Optional[StrictStr] = None,
1291
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1292
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1293
+ ) -> RESTResponseType:
1294
+ """Delete an album
1295
+
1296
+ Delete a specific album by its ID. Note the album is initially trashed and then immediately scheduled for deletion, but relies on a background job to complete the process.
1297
+
1298
+ :param id: (required)
1299
+ :type id: UUID
1300
+ :param _request_timeout: timeout setting for this request. If one
1301
+ number provided, it will be total request
1302
+ timeout. It can also be a pair (tuple) of
1303
+ (connection, read) timeouts.
1304
+ :type _request_timeout: int, tuple(int, int), optional
1305
+ :param _request_auth: set to override the auth_settings for an a single
1306
+ request; this effectively ignores the
1307
+ authentication in the spec for a single request.
1308
+ :type _request_auth: dict, optional
1309
+ :param _content_type: force content-type for the request.
1310
+ :type _content_type: str, Optional
1311
+ :param _headers: set to override the headers for a single
1312
+ request; this effectively ignores the headers
1313
+ in the spec for a single request.
1314
+ :type _headers: dict, optional
1315
+ :param _host_index: set to override the host_index for a single
1316
+ request; this effectively ignores the host_index
1317
+ in the spec for a single request.
1318
+ :type _host_index: int, optional
1319
+ :return: Returns the result object.
1320
+ """ # noqa: E501
1321
+
1322
+ _param = self._delete_album_serialize(
1323
+ id=id,
1324
+ _request_auth=_request_auth,
1325
+ _content_type=_content_type,
1326
+ _headers=_headers,
1327
+ _host_index=_host_index,
1328
+ )
1329
+
1330
+ _response_types_map: Dict[str, Optional[str]] = {
1331
+ "204": None,
1332
+ }
1333
+ response_data = await self.api_client.call_api(
1334
+ *_param, _request_timeout=_request_timeout
1335
+ )
1336
+ return response_data.response
1337
+
1338
+ def _delete_album_serialize(
1339
+ self,
1340
+ id,
1341
+ _request_auth,
1342
+ _content_type,
1343
+ _headers,
1344
+ _host_index,
1345
+ ) -> RequestSerialized:
1346
+ _host = None
1347
+
1348
+ _collection_formats: Dict[str, str] = {}
1349
+
1350
+ _path_params: Dict[str, str] = {}
1351
+ _query_params: List[Tuple[str, str]] = []
1352
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1353
+ _form_params: List[Tuple[str, str]] = []
1354
+ _files: Dict[
1355
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1356
+ ] = {}
1357
+ _body_params: Optional[bytes] = None
1358
+
1359
+ # process the path parameters
1360
+ if id is not None:
1361
+ _path_params["id"] = id
1362
+ # process the query parameters
1363
+ # process the header parameters
1364
+ # process the form parameters
1365
+ # process the body parameter
1366
+
1367
+ # authentication setting
1368
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1369
+
1370
+ return self.api_client.param_serialize(
1371
+ method="DELETE",
1372
+ resource_path="/albums/{id}",
1373
+ path_params=_path_params,
1374
+ query_params=_query_params,
1375
+ header_params=_header_params,
1376
+ body=_body_params,
1377
+ post_params=_form_params,
1378
+ files=_files,
1379
+ auth_settings=_auth_settings,
1380
+ collection_formats=_collection_formats,
1381
+ _host=_host,
1382
+ _request_auth=_request_auth,
1383
+ )
1384
+
1385
+ @validate_call
1386
+ async def get_album_info(
1387
+ self,
1388
+ id: UUID,
1389
+ key: Optional[StrictStr] = None,
1390
+ slug: Optional[StrictStr] = None,
1391
+ without_assets: Optional[StrictBool] = None,
1392
+ _request_timeout: Union[
1393
+ None,
1394
+ Annotated[StrictFloat, Field(gt=0)],
1395
+ Tuple[
1396
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1397
+ ],
1398
+ ] = None,
1399
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1400
+ _content_type: Optional[StrictStr] = None,
1401
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1402
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1403
+ ) -> AlbumResponseDto:
1404
+ """Retrieve an album
1405
+
1406
+ Retrieve information about a specific album by its ID.
1407
+
1408
+ :param id: (required)
1409
+ :type id: UUID
1410
+ :param key:
1411
+ :type key: str
1412
+ :param slug:
1413
+ :type slug: str
1414
+ :param without_assets:
1415
+ :type without_assets: bool
1416
+ :param _request_timeout: timeout setting for this request. If one
1417
+ number provided, it will be total request
1418
+ timeout. It can also be a pair (tuple) of
1419
+ (connection, read) timeouts.
1420
+ :type _request_timeout: int, tuple(int, int), optional
1421
+ :param _request_auth: set to override the auth_settings for an a single
1422
+ request; this effectively ignores the
1423
+ authentication in the spec for a single request.
1424
+ :type _request_auth: dict, optional
1425
+ :param _content_type: force content-type for the request.
1426
+ :type _content_type: str, Optional
1427
+ :param _headers: set to override the headers for a single
1428
+ request; this effectively ignores the headers
1429
+ in the spec for a single request.
1430
+ :type _headers: dict, optional
1431
+ :param _host_index: set to override the host_index for a single
1432
+ request; this effectively ignores the host_index
1433
+ in the spec for a single request.
1434
+ :type _host_index: int, optional
1435
+ :return: Returns the result object.
1436
+ """ # noqa: E501
1437
+
1438
+ _param = self._get_album_info_serialize(
1439
+ id=id,
1440
+ key=key,
1441
+ slug=slug,
1442
+ without_assets=without_assets,
1443
+ _request_auth=_request_auth,
1444
+ _content_type=_content_type,
1445
+ _headers=_headers,
1446
+ _host_index=_host_index,
1447
+ )
1448
+
1449
+ _response_types_map: Dict[str, Optional[str]] = {
1450
+ "200": "AlbumResponseDto",
1451
+ }
1452
+ response_data = await self.api_client.call_api(
1453
+ *_param, _request_timeout=_request_timeout
1454
+ )
1455
+ await response_data.read()
1456
+ return self.api_client.response_deserialize(
1457
+ response_data=response_data,
1458
+ response_types_map=_response_types_map,
1459
+ ).data
1460
+
1461
+ @validate_call
1462
+ async def get_album_info_with_http_info(
1463
+ self,
1464
+ id: UUID,
1465
+ key: Optional[StrictStr] = None,
1466
+ slug: Optional[StrictStr] = None,
1467
+ without_assets: Optional[StrictBool] = None,
1468
+ _request_timeout: Union[
1469
+ None,
1470
+ Annotated[StrictFloat, Field(gt=0)],
1471
+ Tuple[
1472
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1473
+ ],
1474
+ ] = None,
1475
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1476
+ _content_type: Optional[StrictStr] = None,
1477
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1478
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1479
+ ) -> ApiResponse[AlbumResponseDto]:
1480
+ """Retrieve an album
1481
+
1482
+ Retrieve information about a specific album by its ID.
1483
+
1484
+ :param id: (required)
1485
+ :type id: UUID
1486
+ :param key:
1487
+ :type key: str
1488
+ :param slug:
1489
+ :type slug: str
1490
+ :param without_assets:
1491
+ :type without_assets: bool
1492
+ :param _request_timeout: timeout setting for this request. If one
1493
+ number provided, it will be total request
1494
+ timeout. It can also be a pair (tuple) of
1495
+ (connection, read) timeouts.
1496
+ :type _request_timeout: int, tuple(int, int), optional
1497
+ :param _request_auth: set to override the auth_settings for an a single
1498
+ request; this effectively ignores the
1499
+ authentication in the spec for a single request.
1500
+ :type _request_auth: dict, optional
1501
+ :param _content_type: force content-type for the request.
1502
+ :type _content_type: str, Optional
1503
+ :param _headers: set to override the headers for a single
1504
+ request; this effectively ignores the headers
1505
+ in the spec for a single request.
1506
+ :type _headers: dict, optional
1507
+ :param _host_index: set to override the host_index for a single
1508
+ request; this effectively ignores the host_index
1509
+ in the spec for a single request.
1510
+ :type _host_index: int, optional
1511
+ :return: Returns the result object.
1512
+ """ # noqa: E501
1513
+
1514
+ _param = self._get_album_info_serialize(
1515
+ id=id,
1516
+ key=key,
1517
+ slug=slug,
1518
+ without_assets=without_assets,
1519
+ _request_auth=_request_auth,
1520
+ _content_type=_content_type,
1521
+ _headers=_headers,
1522
+ _host_index=_host_index,
1523
+ )
1524
+
1525
+ _response_types_map: Dict[str, Optional[str]] = {
1526
+ "200": "AlbumResponseDto",
1527
+ }
1528
+ response_data = await self.api_client.call_api(
1529
+ *_param, _request_timeout=_request_timeout
1530
+ )
1531
+ await response_data.read()
1532
+ return self.api_client.response_deserialize(
1533
+ response_data=response_data,
1534
+ response_types_map=_response_types_map,
1535
+ )
1536
+
1537
+ @validate_call
1538
+ async def get_album_info_without_preload_content(
1539
+ self,
1540
+ id: UUID,
1541
+ key: Optional[StrictStr] = None,
1542
+ slug: Optional[StrictStr] = None,
1543
+ without_assets: Optional[StrictBool] = None,
1544
+ _request_timeout: Union[
1545
+ None,
1546
+ Annotated[StrictFloat, Field(gt=0)],
1547
+ Tuple[
1548
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1549
+ ],
1550
+ ] = None,
1551
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1552
+ _content_type: Optional[StrictStr] = None,
1553
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1554
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1555
+ ) -> RESTResponseType:
1556
+ """Retrieve an album
1557
+
1558
+ Retrieve information about a specific album by its ID.
1559
+
1560
+ :param id: (required)
1561
+ :type id: UUID
1562
+ :param key:
1563
+ :type key: str
1564
+ :param slug:
1565
+ :type slug: str
1566
+ :param without_assets:
1567
+ :type without_assets: bool
1568
+ :param _request_timeout: timeout setting for this request. If one
1569
+ number provided, it will be total request
1570
+ timeout. It can also be a pair (tuple) of
1571
+ (connection, read) timeouts.
1572
+ :type _request_timeout: int, tuple(int, int), optional
1573
+ :param _request_auth: set to override the auth_settings for an a single
1574
+ request; this effectively ignores the
1575
+ authentication in the spec for a single request.
1576
+ :type _request_auth: dict, optional
1577
+ :param _content_type: force content-type for the request.
1578
+ :type _content_type: str, Optional
1579
+ :param _headers: set to override the headers for a single
1580
+ request; this effectively ignores the headers
1581
+ in the spec for a single request.
1582
+ :type _headers: dict, optional
1583
+ :param _host_index: set to override the host_index for a single
1584
+ request; this effectively ignores the host_index
1585
+ in the spec for a single request.
1586
+ :type _host_index: int, optional
1587
+ :return: Returns the result object.
1588
+ """ # noqa: E501
1589
+
1590
+ _param = self._get_album_info_serialize(
1591
+ id=id,
1592
+ key=key,
1593
+ slug=slug,
1594
+ without_assets=without_assets,
1595
+ _request_auth=_request_auth,
1596
+ _content_type=_content_type,
1597
+ _headers=_headers,
1598
+ _host_index=_host_index,
1599
+ )
1600
+
1601
+ _response_types_map: Dict[str, Optional[str]] = {
1602
+ "200": "AlbumResponseDto",
1603
+ }
1604
+ response_data = await self.api_client.call_api(
1605
+ *_param, _request_timeout=_request_timeout
1606
+ )
1607
+ return response_data.response
1608
+
1609
+ def _get_album_info_serialize(
1610
+ self,
1611
+ id,
1612
+ key,
1613
+ slug,
1614
+ without_assets,
1615
+ _request_auth,
1616
+ _content_type,
1617
+ _headers,
1618
+ _host_index,
1619
+ ) -> RequestSerialized:
1620
+ _host = None
1621
+
1622
+ _collection_formats: Dict[str, str] = {}
1623
+
1624
+ _path_params: Dict[str, str] = {}
1625
+ _query_params: List[Tuple[str, str]] = []
1626
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1627
+ _form_params: List[Tuple[str, str]] = []
1628
+ _files: Dict[
1629
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1630
+ ] = {}
1631
+ _body_params: Optional[bytes] = None
1632
+
1633
+ # process the path parameters
1634
+ if id is not None:
1635
+ _path_params["id"] = id
1636
+ # process the query parameters
1637
+ if key is not None:
1638
+ _query_params.append(("key", key))
1639
+
1640
+ if slug is not None:
1641
+ _query_params.append(("slug", slug))
1642
+
1643
+ if without_assets is not None:
1644
+ _query_params.append(("withoutAssets", without_assets))
1645
+
1646
+ # process the header parameters
1647
+ # process the form parameters
1648
+ # process the body parameter
1649
+
1650
+ # set the HTTP header `Accept`
1651
+ if "Accept" not in _header_params:
1652
+ _header_params["Accept"] = self.api_client.select_header_accept(
1653
+ ["application/json"]
1654
+ )
1655
+
1656
+ # authentication setting
1657
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1658
+
1659
+ return self.api_client.param_serialize(
1660
+ method="GET",
1661
+ resource_path="/albums/{id}",
1662
+ path_params=_path_params,
1663
+ query_params=_query_params,
1664
+ header_params=_header_params,
1665
+ body=_body_params,
1666
+ post_params=_form_params,
1667
+ files=_files,
1668
+ auth_settings=_auth_settings,
1669
+ collection_formats=_collection_formats,
1670
+ _host=_host,
1671
+ _request_auth=_request_auth,
1672
+ )
1673
+
1674
+ @validate_call
1675
+ async def get_album_statistics(
1676
+ self,
1677
+ _request_timeout: Union[
1678
+ None,
1679
+ Annotated[StrictFloat, Field(gt=0)],
1680
+ Tuple[
1681
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1682
+ ],
1683
+ ] = None,
1684
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1685
+ _content_type: Optional[StrictStr] = None,
1686
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1687
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1688
+ ) -> AlbumStatisticsResponseDto:
1689
+ """Retrieve album statistics
1690
+
1691
+ Returns statistics about the albums available to the authenticated user.
1692
+
1693
+ :param _request_timeout: timeout setting for this request. If one
1694
+ number provided, it will be total request
1695
+ timeout. It can also be a pair (tuple) of
1696
+ (connection, read) timeouts.
1697
+ :type _request_timeout: int, tuple(int, int), optional
1698
+ :param _request_auth: set to override the auth_settings for an a single
1699
+ request; this effectively ignores the
1700
+ authentication in the spec for a single request.
1701
+ :type _request_auth: dict, optional
1702
+ :param _content_type: force content-type for the request.
1703
+ :type _content_type: str, Optional
1704
+ :param _headers: set to override the headers for a single
1705
+ request; this effectively ignores the headers
1706
+ in the spec for a single request.
1707
+ :type _headers: dict, optional
1708
+ :param _host_index: set to override the host_index for a single
1709
+ request; this effectively ignores the host_index
1710
+ in the spec for a single request.
1711
+ :type _host_index: int, optional
1712
+ :return: Returns the result object.
1713
+ """ # noqa: E501
1714
+
1715
+ _param = self._get_album_statistics_serialize(
1716
+ _request_auth=_request_auth,
1717
+ _content_type=_content_type,
1718
+ _headers=_headers,
1719
+ _host_index=_host_index,
1720
+ )
1721
+
1722
+ _response_types_map: Dict[str, Optional[str]] = {
1723
+ "200": "AlbumStatisticsResponseDto",
1724
+ }
1725
+ response_data = await self.api_client.call_api(
1726
+ *_param, _request_timeout=_request_timeout
1727
+ )
1728
+ await response_data.read()
1729
+ return self.api_client.response_deserialize(
1730
+ response_data=response_data,
1731
+ response_types_map=_response_types_map,
1732
+ ).data
1733
+
1734
+ @validate_call
1735
+ async def get_album_statistics_with_http_info(
1736
+ self,
1737
+ _request_timeout: Union[
1738
+ None,
1739
+ Annotated[StrictFloat, Field(gt=0)],
1740
+ Tuple[
1741
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1742
+ ],
1743
+ ] = None,
1744
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1745
+ _content_type: Optional[StrictStr] = None,
1746
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1747
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1748
+ ) -> ApiResponse[AlbumStatisticsResponseDto]:
1749
+ """Retrieve album statistics
1750
+
1751
+ Returns statistics about the albums available to the authenticated user.
1752
+
1753
+ :param _request_timeout: timeout setting for this request. If one
1754
+ number provided, it will be total request
1755
+ timeout. It can also be a pair (tuple) of
1756
+ (connection, read) timeouts.
1757
+ :type _request_timeout: int, tuple(int, int), optional
1758
+ :param _request_auth: set to override the auth_settings for an a single
1759
+ request; this effectively ignores the
1760
+ authentication in the spec for a single request.
1761
+ :type _request_auth: dict, optional
1762
+ :param _content_type: force content-type for the request.
1763
+ :type _content_type: str, Optional
1764
+ :param _headers: set to override the headers for a single
1765
+ request; this effectively ignores the headers
1766
+ in the spec for a single request.
1767
+ :type _headers: dict, optional
1768
+ :param _host_index: set to override the host_index for a single
1769
+ request; this effectively ignores the host_index
1770
+ in the spec for a single request.
1771
+ :type _host_index: int, optional
1772
+ :return: Returns the result object.
1773
+ """ # noqa: E501
1774
+
1775
+ _param = self._get_album_statistics_serialize(
1776
+ _request_auth=_request_auth,
1777
+ _content_type=_content_type,
1778
+ _headers=_headers,
1779
+ _host_index=_host_index,
1780
+ )
1781
+
1782
+ _response_types_map: Dict[str, Optional[str]] = {
1783
+ "200": "AlbumStatisticsResponseDto",
1784
+ }
1785
+ response_data = await self.api_client.call_api(
1786
+ *_param, _request_timeout=_request_timeout
1787
+ )
1788
+ await response_data.read()
1789
+ return self.api_client.response_deserialize(
1790
+ response_data=response_data,
1791
+ response_types_map=_response_types_map,
1792
+ )
1793
+
1794
+ @validate_call
1795
+ async def get_album_statistics_without_preload_content(
1796
+ self,
1797
+ _request_timeout: Union[
1798
+ None,
1799
+ Annotated[StrictFloat, Field(gt=0)],
1800
+ Tuple[
1801
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1802
+ ],
1803
+ ] = None,
1804
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1805
+ _content_type: Optional[StrictStr] = None,
1806
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1807
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1808
+ ) -> RESTResponseType:
1809
+ """Retrieve album statistics
1810
+
1811
+ Returns statistics about the albums available to the authenticated user.
1812
+
1813
+ :param _request_timeout: timeout setting for this request. If one
1814
+ number provided, it will be total request
1815
+ timeout. It can also be a pair (tuple) of
1816
+ (connection, read) timeouts.
1817
+ :type _request_timeout: int, tuple(int, int), optional
1818
+ :param _request_auth: set to override the auth_settings for an a single
1819
+ request; this effectively ignores the
1820
+ authentication in the spec for a single request.
1821
+ :type _request_auth: dict, optional
1822
+ :param _content_type: force content-type for the request.
1823
+ :type _content_type: str, Optional
1824
+ :param _headers: set to override the headers for a single
1825
+ request; this effectively ignores the headers
1826
+ in the spec for a single request.
1827
+ :type _headers: dict, optional
1828
+ :param _host_index: set to override the host_index for a single
1829
+ request; this effectively ignores the host_index
1830
+ in the spec for a single request.
1831
+ :type _host_index: int, optional
1832
+ :return: Returns the result object.
1833
+ """ # noqa: E501
1834
+
1835
+ _param = self._get_album_statistics_serialize(
1836
+ _request_auth=_request_auth,
1837
+ _content_type=_content_type,
1838
+ _headers=_headers,
1839
+ _host_index=_host_index,
1840
+ )
1841
+
1842
+ _response_types_map: Dict[str, Optional[str]] = {
1843
+ "200": "AlbumStatisticsResponseDto",
1844
+ }
1845
+ response_data = await self.api_client.call_api(
1846
+ *_param, _request_timeout=_request_timeout
1847
+ )
1848
+ return response_data.response
1849
+
1850
+ def _get_album_statistics_serialize(
1851
+ self,
1852
+ _request_auth,
1853
+ _content_type,
1854
+ _headers,
1855
+ _host_index,
1856
+ ) -> RequestSerialized:
1857
+ _host = None
1858
+
1859
+ _collection_formats: Dict[str, str] = {}
1860
+
1861
+ _path_params: Dict[str, str] = {}
1862
+ _query_params: List[Tuple[str, str]] = []
1863
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1864
+ _form_params: List[Tuple[str, str]] = []
1865
+ _files: Dict[
1866
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1867
+ ] = {}
1868
+ _body_params: Optional[bytes] = None
1869
+
1870
+ # process the path parameters
1871
+ # process the query parameters
1872
+ # process the header parameters
1873
+ # process the form parameters
1874
+ # process the body parameter
1875
+
1876
+ # set the HTTP header `Accept`
1877
+ if "Accept" not in _header_params:
1878
+ _header_params["Accept"] = self.api_client.select_header_accept(
1879
+ ["application/json"]
1880
+ )
1881
+
1882
+ # authentication setting
1883
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1884
+
1885
+ return self.api_client.param_serialize(
1886
+ method="GET",
1887
+ resource_path="/albums/statistics",
1888
+ path_params=_path_params,
1889
+ query_params=_query_params,
1890
+ header_params=_header_params,
1891
+ body=_body_params,
1892
+ post_params=_form_params,
1893
+ files=_files,
1894
+ auth_settings=_auth_settings,
1895
+ collection_formats=_collection_formats,
1896
+ _host=_host,
1897
+ _request_auth=_request_auth,
1898
+ )
1899
+
1900
+ @validate_call
1901
+ async def get_all_albums(
1902
+ self,
1903
+ asset_id: Annotated[
1904
+ Optional[UUID],
1905
+ Field(
1906
+ description="Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums"
1907
+ ),
1908
+ ] = None,
1909
+ shared: Optional[StrictBool] = None,
1910
+ _request_timeout: Union[
1911
+ None,
1912
+ Annotated[StrictFloat, Field(gt=0)],
1913
+ Tuple[
1914
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1915
+ ],
1916
+ ] = None,
1917
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1918
+ _content_type: Optional[StrictStr] = None,
1919
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1920
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1921
+ ) -> List[AlbumResponseDto]:
1922
+ """List all albums
1923
+
1924
+ Retrieve a list of albums available to the authenticated user.
1925
+
1926
+ :param asset_id: Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
1927
+ :type asset_id: UUID
1928
+ :param shared:
1929
+ :type shared: bool
1930
+ :param _request_timeout: timeout setting for this request. If one
1931
+ number provided, it will be total request
1932
+ timeout. It can also be a pair (tuple) of
1933
+ (connection, read) timeouts.
1934
+ :type _request_timeout: int, tuple(int, int), optional
1935
+ :param _request_auth: set to override the auth_settings for an a single
1936
+ request; this effectively ignores the
1937
+ authentication in the spec for a single request.
1938
+ :type _request_auth: dict, optional
1939
+ :param _content_type: force content-type for the request.
1940
+ :type _content_type: str, Optional
1941
+ :param _headers: set to override the headers for a single
1942
+ request; this effectively ignores the headers
1943
+ in the spec for a single request.
1944
+ :type _headers: dict, optional
1945
+ :param _host_index: set to override the host_index for a single
1946
+ request; this effectively ignores the host_index
1947
+ in the spec for a single request.
1948
+ :type _host_index: int, optional
1949
+ :return: Returns the result object.
1950
+ """ # noqa: E501
1951
+
1952
+ _param = self._get_all_albums_serialize(
1953
+ asset_id=asset_id,
1954
+ shared=shared,
1955
+ _request_auth=_request_auth,
1956
+ _content_type=_content_type,
1957
+ _headers=_headers,
1958
+ _host_index=_host_index,
1959
+ )
1960
+
1961
+ _response_types_map: Dict[str, Optional[str]] = {
1962
+ "200": "List[AlbumResponseDto]",
1963
+ }
1964
+ response_data = await self.api_client.call_api(
1965
+ *_param, _request_timeout=_request_timeout
1966
+ )
1967
+ await response_data.read()
1968
+ return self.api_client.response_deserialize(
1969
+ response_data=response_data,
1970
+ response_types_map=_response_types_map,
1971
+ ).data
1972
+
1973
+ @validate_call
1974
+ async def get_all_albums_with_http_info(
1975
+ self,
1976
+ asset_id: Annotated[
1977
+ Optional[UUID],
1978
+ Field(
1979
+ description="Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums"
1980
+ ),
1981
+ ] = None,
1982
+ shared: Optional[StrictBool] = None,
1983
+ _request_timeout: Union[
1984
+ None,
1985
+ Annotated[StrictFloat, Field(gt=0)],
1986
+ Tuple[
1987
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1988
+ ],
1989
+ ] = None,
1990
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1991
+ _content_type: Optional[StrictStr] = None,
1992
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1993
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1994
+ ) -> ApiResponse[List[AlbumResponseDto]]:
1995
+ """List all albums
1996
+
1997
+ Retrieve a list of albums available to the authenticated user.
1998
+
1999
+ :param asset_id: Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
2000
+ :type asset_id: UUID
2001
+ :param shared:
2002
+ :type shared: bool
2003
+ :param _request_timeout: timeout setting for this request. If one
2004
+ number provided, it will be total request
2005
+ timeout. It can also be a pair (tuple) of
2006
+ (connection, read) timeouts.
2007
+ :type _request_timeout: int, tuple(int, int), optional
2008
+ :param _request_auth: set to override the auth_settings for an a single
2009
+ request; this effectively ignores the
2010
+ authentication in the spec for a single request.
2011
+ :type _request_auth: dict, optional
2012
+ :param _content_type: force content-type for the request.
2013
+ :type _content_type: str, Optional
2014
+ :param _headers: set to override the headers for a single
2015
+ request; this effectively ignores the headers
2016
+ in the spec for a single request.
2017
+ :type _headers: dict, optional
2018
+ :param _host_index: set to override the host_index for a single
2019
+ request; this effectively ignores the host_index
2020
+ in the spec for a single request.
2021
+ :type _host_index: int, optional
2022
+ :return: Returns the result object.
2023
+ """ # noqa: E501
2024
+
2025
+ _param = self._get_all_albums_serialize(
2026
+ asset_id=asset_id,
2027
+ shared=shared,
2028
+ _request_auth=_request_auth,
2029
+ _content_type=_content_type,
2030
+ _headers=_headers,
2031
+ _host_index=_host_index,
2032
+ )
2033
+
2034
+ _response_types_map: Dict[str, Optional[str]] = {
2035
+ "200": "List[AlbumResponseDto]",
2036
+ }
2037
+ response_data = await self.api_client.call_api(
2038
+ *_param, _request_timeout=_request_timeout
2039
+ )
2040
+ await response_data.read()
2041
+ return self.api_client.response_deserialize(
2042
+ response_data=response_data,
2043
+ response_types_map=_response_types_map,
2044
+ )
2045
+
2046
+ @validate_call
2047
+ async def get_all_albums_without_preload_content(
2048
+ self,
2049
+ asset_id: Annotated[
2050
+ Optional[UUID],
2051
+ Field(
2052
+ description="Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums"
2053
+ ),
2054
+ ] = None,
2055
+ shared: Optional[StrictBool] = None,
2056
+ _request_timeout: Union[
2057
+ None,
2058
+ Annotated[StrictFloat, Field(gt=0)],
2059
+ Tuple[
2060
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2061
+ ],
2062
+ ] = None,
2063
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2064
+ _content_type: Optional[StrictStr] = None,
2065
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2066
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2067
+ ) -> RESTResponseType:
2068
+ """List all albums
2069
+
2070
+ Retrieve a list of albums available to the authenticated user.
2071
+
2072
+ :param asset_id: Only returns albums that contain the asset Ignores the shared parameter undefined: get all albums
2073
+ :type asset_id: UUID
2074
+ :param shared:
2075
+ :type shared: bool
2076
+ :param _request_timeout: timeout setting for this request. If one
2077
+ number provided, it will be total request
2078
+ timeout. It can also be a pair (tuple) of
2079
+ (connection, read) timeouts.
2080
+ :type _request_timeout: int, tuple(int, int), optional
2081
+ :param _request_auth: set to override the auth_settings for an a single
2082
+ request; this effectively ignores the
2083
+ authentication in the spec for a single request.
2084
+ :type _request_auth: dict, optional
2085
+ :param _content_type: force content-type for the request.
2086
+ :type _content_type: str, Optional
2087
+ :param _headers: set to override the headers for a single
2088
+ request; this effectively ignores the headers
2089
+ in the spec for a single request.
2090
+ :type _headers: dict, optional
2091
+ :param _host_index: set to override the host_index for a single
2092
+ request; this effectively ignores the host_index
2093
+ in the spec for a single request.
2094
+ :type _host_index: int, optional
2095
+ :return: Returns the result object.
2096
+ """ # noqa: E501
2097
+
2098
+ _param = self._get_all_albums_serialize(
2099
+ asset_id=asset_id,
2100
+ shared=shared,
2101
+ _request_auth=_request_auth,
2102
+ _content_type=_content_type,
2103
+ _headers=_headers,
2104
+ _host_index=_host_index,
2105
+ )
2106
+
2107
+ _response_types_map: Dict[str, Optional[str]] = {
2108
+ "200": "List[AlbumResponseDto]",
2109
+ }
2110
+ response_data = await self.api_client.call_api(
2111
+ *_param, _request_timeout=_request_timeout
2112
+ )
2113
+ return response_data.response
2114
+
2115
+ def _get_all_albums_serialize(
2116
+ self,
2117
+ asset_id,
2118
+ shared,
2119
+ _request_auth,
2120
+ _content_type,
2121
+ _headers,
2122
+ _host_index,
2123
+ ) -> RequestSerialized:
2124
+ _host = None
2125
+
2126
+ _collection_formats: Dict[str, str] = {}
2127
+
2128
+ _path_params: Dict[str, str] = {}
2129
+ _query_params: List[Tuple[str, str]] = []
2130
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2131
+ _form_params: List[Tuple[str, str]] = []
2132
+ _files: Dict[
2133
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2134
+ ] = {}
2135
+ _body_params: Optional[bytes] = None
2136
+
2137
+ # process the path parameters
2138
+ # process the query parameters
2139
+ if asset_id is not None:
2140
+ _query_params.append(("assetId", asset_id))
2141
+
2142
+ if shared is not None:
2143
+ _query_params.append(("shared", shared))
2144
+
2145
+ # process the header parameters
2146
+ # process the form parameters
2147
+ # process the body parameter
2148
+
2149
+ # set the HTTP header `Accept`
2150
+ if "Accept" not in _header_params:
2151
+ _header_params["Accept"] = self.api_client.select_header_accept(
2152
+ ["application/json"]
2153
+ )
2154
+
2155
+ # authentication setting
2156
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2157
+
2158
+ return self.api_client.param_serialize(
2159
+ method="GET",
2160
+ resource_path="/albums",
2161
+ path_params=_path_params,
2162
+ query_params=_query_params,
2163
+ header_params=_header_params,
2164
+ body=_body_params,
2165
+ post_params=_form_params,
2166
+ files=_files,
2167
+ auth_settings=_auth_settings,
2168
+ collection_formats=_collection_formats,
2169
+ _host=_host,
2170
+ _request_auth=_request_auth,
2171
+ )
2172
+
2173
+ @validate_call
2174
+ async def remove_asset_from_album(
2175
+ self,
2176
+ id: UUID,
2177
+ bulk_ids_dto: BulkIdsDto,
2178
+ _request_timeout: Union[
2179
+ None,
2180
+ Annotated[StrictFloat, Field(gt=0)],
2181
+ Tuple[
2182
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2183
+ ],
2184
+ ] = None,
2185
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2186
+ _content_type: Optional[StrictStr] = None,
2187
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2188
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2189
+ ) -> List[BulkIdResponseDto]:
2190
+ """Remove assets from an album
2191
+
2192
+ Remove multiple assets from a specific album by its ID.
2193
+
2194
+ :param id: (required)
2195
+ :type id: UUID
2196
+ :param bulk_ids_dto: (required)
2197
+ :type bulk_ids_dto: BulkIdsDto
2198
+ :param _request_timeout: timeout setting for this request. If one
2199
+ number provided, it will be total request
2200
+ timeout. It can also be a pair (tuple) of
2201
+ (connection, read) timeouts.
2202
+ :type _request_timeout: int, tuple(int, int), optional
2203
+ :param _request_auth: set to override the auth_settings for an a single
2204
+ request; this effectively ignores the
2205
+ authentication in the spec for a single request.
2206
+ :type _request_auth: dict, optional
2207
+ :param _content_type: force content-type for the request.
2208
+ :type _content_type: str, Optional
2209
+ :param _headers: set to override the headers for a single
2210
+ request; this effectively ignores the headers
2211
+ in the spec for a single request.
2212
+ :type _headers: dict, optional
2213
+ :param _host_index: set to override the host_index for a single
2214
+ request; this effectively ignores the host_index
2215
+ in the spec for a single request.
2216
+ :type _host_index: int, optional
2217
+ :return: Returns the result object.
2218
+ """ # noqa: E501
2219
+
2220
+ _param = self._remove_asset_from_album_serialize(
2221
+ id=id,
2222
+ bulk_ids_dto=bulk_ids_dto,
2223
+ _request_auth=_request_auth,
2224
+ _content_type=_content_type,
2225
+ _headers=_headers,
2226
+ _host_index=_host_index,
2227
+ )
2228
+
2229
+ _response_types_map: Dict[str, Optional[str]] = {
2230
+ "200": "List[BulkIdResponseDto]",
2231
+ }
2232
+ response_data = await self.api_client.call_api(
2233
+ *_param, _request_timeout=_request_timeout
2234
+ )
2235
+ await response_data.read()
2236
+ return self.api_client.response_deserialize(
2237
+ response_data=response_data,
2238
+ response_types_map=_response_types_map,
2239
+ ).data
2240
+
2241
+ @validate_call
2242
+ async def remove_asset_from_album_with_http_info(
2243
+ self,
2244
+ id: UUID,
2245
+ bulk_ids_dto: BulkIdsDto,
2246
+ _request_timeout: Union[
2247
+ None,
2248
+ Annotated[StrictFloat, Field(gt=0)],
2249
+ Tuple[
2250
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2251
+ ],
2252
+ ] = None,
2253
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2254
+ _content_type: Optional[StrictStr] = None,
2255
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2256
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2257
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
2258
+ """Remove assets from an album
2259
+
2260
+ Remove multiple assets from a specific album by its ID.
2261
+
2262
+ :param id: (required)
2263
+ :type id: UUID
2264
+ :param bulk_ids_dto: (required)
2265
+ :type bulk_ids_dto: BulkIdsDto
2266
+ :param _request_timeout: timeout setting for this request. If one
2267
+ number provided, it will be total request
2268
+ timeout. It can also be a pair (tuple) of
2269
+ (connection, read) timeouts.
2270
+ :type _request_timeout: int, tuple(int, int), optional
2271
+ :param _request_auth: set to override the auth_settings for an a single
2272
+ request; this effectively ignores the
2273
+ authentication in the spec for a single request.
2274
+ :type _request_auth: dict, optional
2275
+ :param _content_type: force content-type for the request.
2276
+ :type _content_type: str, Optional
2277
+ :param _headers: set to override the headers for a single
2278
+ request; this effectively ignores the headers
2279
+ in the spec for a single request.
2280
+ :type _headers: dict, optional
2281
+ :param _host_index: set to override the host_index for a single
2282
+ request; this effectively ignores the host_index
2283
+ in the spec for a single request.
2284
+ :type _host_index: int, optional
2285
+ :return: Returns the result object.
2286
+ """ # noqa: E501
2287
+
2288
+ _param = self._remove_asset_from_album_serialize(
2289
+ id=id,
2290
+ bulk_ids_dto=bulk_ids_dto,
2291
+ _request_auth=_request_auth,
2292
+ _content_type=_content_type,
2293
+ _headers=_headers,
2294
+ _host_index=_host_index,
2295
+ )
2296
+
2297
+ _response_types_map: Dict[str, Optional[str]] = {
2298
+ "200": "List[BulkIdResponseDto]",
2299
+ }
2300
+ response_data = await self.api_client.call_api(
2301
+ *_param, _request_timeout=_request_timeout
2302
+ )
2303
+ await response_data.read()
2304
+ return self.api_client.response_deserialize(
2305
+ response_data=response_data,
2306
+ response_types_map=_response_types_map,
2307
+ )
2308
+
2309
+ @validate_call
2310
+ async def remove_asset_from_album_without_preload_content(
2311
+ self,
2312
+ id: UUID,
2313
+ bulk_ids_dto: BulkIdsDto,
2314
+ _request_timeout: Union[
2315
+ None,
2316
+ Annotated[StrictFloat, Field(gt=0)],
2317
+ Tuple[
2318
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2319
+ ],
2320
+ ] = None,
2321
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2322
+ _content_type: Optional[StrictStr] = None,
2323
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2324
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2325
+ ) -> RESTResponseType:
2326
+ """Remove assets from an album
2327
+
2328
+ Remove multiple assets from a specific album by its ID.
2329
+
2330
+ :param id: (required)
2331
+ :type id: UUID
2332
+ :param bulk_ids_dto: (required)
2333
+ :type bulk_ids_dto: BulkIdsDto
2334
+ :param _request_timeout: timeout setting for this request. If one
2335
+ number provided, it will be total request
2336
+ timeout. It can also be a pair (tuple) of
2337
+ (connection, read) timeouts.
2338
+ :type _request_timeout: int, tuple(int, int), optional
2339
+ :param _request_auth: set to override the auth_settings for an a single
2340
+ request; this effectively ignores the
2341
+ authentication in the spec for a single request.
2342
+ :type _request_auth: dict, optional
2343
+ :param _content_type: force content-type for the request.
2344
+ :type _content_type: str, Optional
2345
+ :param _headers: set to override the headers for a single
2346
+ request; this effectively ignores the headers
2347
+ in the spec for a single request.
2348
+ :type _headers: dict, optional
2349
+ :param _host_index: set to override the host_index for a single
2350
+ request; this effectively ignores the host_index
2351
+ in the spec for a single request.
2352
+ :type _host_index: int, optional
2353
+ :return: Returns the result object.
2354
+ """ # noqa: E501
2355
+
2356
+ _param = self._remove_asset_from_album_serialize(
2357
+ id=id,
2358
+ bulk_ids_dto=bulk_ids_dto,
2359
+ _request_auth=_request_auth,
2360
+ _content_type=_content_type,
2361
+ _headers=_headers,
2362
+ _host_index=_host_index,
2363
+ )
2364
+
2365
+ _response_types_map: Dict[str, Optional[str]] = {
2366
+ "200": "List[BulkIdResponseDto]",
2367
+ }
2368
+ response_data = await self.api_client.call_api(
2369
+ *_param, _request_timeout=_request_timeout
2370
+ )
2371
+ return response_data.response
2372
+
2373
+ def _remove_asset_from_album_serialize(
2374
+ self,
2375
+ id,
2376
+ bulk_ids_dto,
2377
+ _request_auth,
2378
+ _content_type,
2379
+ _headers,
2380
+ _host_index,
2381
+ ) -> RequestSerialized:
2382
+ _host = None
2383
+
2384
+ _collection_formats: Dict[str, str] = {}
2385
+
2386
+ _path_params: Dict[str, str] = {}
2387
+ _query_params: List[Tuple[str, str]] = []
2388
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2389
+ _form_params: List[Tuple[str, str]] = []
2390
+ _files: Dict[
2391
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2392
+ ] = {}
2393
+ _body_params: Optional[bytes] = None
2394
+
2395
+ # process the path parameters
2396
+ if id is not None:
2397
+ _path_params["id"] = id
2398
+ # process the query parameters
2399
+ # process the header parameters
2400
+ # process the form parameters
2401
+ # process the body parameter
2402
+ if bulk_ids_dto is not None:
2403
+ _body_params = bulk_ids_dto
2404
+
2405
+ # set the HTTP header `Accept`
2406
+ if "Accept" not in _header_params:
2407
+ _header_params["Accept"] = self.api_client.select_header_accept(
2408
+ ["application/json"]
2409
+ )
2410
+
2411
+ # set the HTTP header `Content-Type`
2412
+ if _content_type:
2413
+ _header_params["Content-Type"] = _content_type
2414
+ else:
2415
+ _default_content_type = self.api_client.select_header_content_type(
2416
+ ["application/json"]
2417
+ )
2418
+ if _default_content_type is not None:
2419
+ _header_params["Content-Type"] = _default_content_type
2420
+
2421
+ # authentication setting
2422
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2423
+
2424
+ return self.api_client.param_serialize(
2425
+ method="DELETE",
2426
+ resource_path="/albums/{id}/assets",
2427
+ path_params=_path_params,
2428
+ query_params=_query_params,
2429
+ header_params=_header_params,
2430
+ body=_body_params,
2431
+ post_params=_form_params,
2432
+ files=_files,
2433
+ auth_settings=_auth_settings,
2434
+ collection_formats=_collection_formats,
2435
+ _host=_host,
2436
+ _request_auth=_request_auth,
2437
+ )
2438
+
2439
+ @validate_call
2440
+ async def remove_user_from_album(
2441
+ self,
2442
+ id: UUID,
2443
+ user_id: StrictStr,
2444
+ _request_timeout: Union[
2445
+ None,
2446
+ Annotated[StrictFloat, Field(gt=0)],
2447
+ Tuple[
2448
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2449
+ ],
2450
+ ] = None,
2451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2452
+ _content_type: Optional[StrictStr] = None,
2453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2455
+ ) -> None:
2456
+ """Remove user from album
2457
+
2458
+ Remove a user from an album. Use an ID of \"me\" to leave a shared album.
2459
+
2460
+ :param id: (required)
2461
+ :type id: UUID
2462
+ :param user_id: (required)
2463
+ :type user_id: str
2464
+ :param _request_timeout: timeout setting for this request. If one
2465
+ number provided, it will be total request
2466
+ timeout. It can also be a pair (tuple) of
2467
+ (connection, read) timeouts.
2468
+ :type _request_timeout: int, tuple(int, int), optional
2469
+ :param _request_auth: set to override the auth_settings for an a single
2470
+ request; this effectively ignores the
2471
+ authentication in the spec for a single request.
2472
+ :type _request_auth: dict, optional
2473
+ :param _content_type: force content-type for the request.
2474
+ :type _content_type: str, Optional
2475
+ :param _headers: set to override the headers for a single
2476
+ request; this effectively ignores the headers
2477
+ in the spec for a single request.
2478
+ :type _headers: dict, optional
2479
+ :param _host_index: set to override the host_index for a single
2480
+ request; this effectively ignores the host_index
2481
+ in the spec for a single request.
2482
+ :type _host_index: int, optional
2483
+ :return: Returns the result object.
2484
+ """ # noqa: E501
2485
+
2486
+ _param = self._remove_user_from_album_serialize(
2487
+ id=id,
2488
+ user_id=user_id,
2489
+ _request_auth=_request_auth,
2490
+ _content_type=_content_type,
2491
+ _headers=_headers,
2492
+ _host_index=_host_index,
2493
+ )
2494
+
2495
+ _response_types_map: Dict[str, Optional[str]] = {
2496
+ "204": None,
2497
+ }
2498
+ response_data = await self.api_client.call_api(
2499
+ *_param, _request_timeout=_request_timeout
2500
+ )
2501
+ await response_data.read()
2502
+ return self.api_client.response_deserialize(
2503
+ response_data=response_data,
2504
+ response_types_map=_response_types_map,
2505
+ ).data
2506
+
2507
+ @validate_call
2508
+ async def remove_user_from_album_with_http_info(
2509
+ self,
2510
+ id: UUID,
2511
+ user_id: StrictStr,
2512
+ _request_timeout: Union[
2513
+ None,
2514
+ Annotated[StrictFloat, Field(gt=0)],
2515
+ Tuple[
2516
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2517
+ ],
2518
+ ] = None,
2519
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2520
+ _content_type: Optional[StrictStr] = None,
2521
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2522
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2523
+ ) -> ApiResponse[None]:
2524
+ """Remove user from album
2525
+
2526
+ Remove a user from an album. Use an ID of \"me\" to leave a shared album.
2527
+
2528
+ :param id: (required)
2529
+ :type id: UUID
2530
+ :param user_id: (required)
2531
+ :type user_id: str
2532
+ :param _request_timeout: timeout setting for this request. If one
2533
+ number provided, it will be total request
2534
+ timeout. It can also be a pair (tuple) of
2535
+ (connection, read) timeouts.
2536
+ :type _request_timeout: int, tuple(int, int), optional
2537
+ :param _request_auth: set to override the auth_settings for an a single
2538
+ request; this effectively ignores the
2539
+ authentication in the spec for a single request.
2540
+ :type _request_auth: dict, optional
2541
+ :param _content_type: force content-type for the request.
2542
+ :type _content_type: str, Optional
2543
+ :param _headers: set to override the headers for a single
2544
+ request; this effectively ignores the headers
2545
+ in the spec for a single request.
2546
+ :type _headers: dict, optional
2547
+ :param _host_index: set to override the host_index for a single
2548
+ request; this effectively ignores the host_index
2549
+ in the spec for a single request.
2550
+ :type _host_index: int, optional
2551
+ :return: Returns the result object.
2552
+ """ # noqa: E501
2553
+
2554
+ _param = self._remove_user_from_album_serialize(
2555
+ id=id,
2556
+ user_id=user_id,
2557
+ _request_auth=_request_auth,
2558
+ _content_type=_content_type,
2559
+ _headers=_headers,
2560
+ _host_index=_host_index,
2561
+ )
2562
+
2563
+ _response_types_map: Dict[str, Optional[str]] = {
2564
+ "204": None,
2565
+ }
2566
+ response_data = await self.api_client.call_api(
2567
+ *_param, _request_timeout=_request_timeout
2568
+ )
2569
+ await response_data.read()
2570
+ return self.api_client.response_deserialize(
2571
+ response_data=response_data,
2572
+ response_types_map=_response_types_map,
2573
+ )
2574
+
2575
+ @validate_call
2576
+ async def remove_user_from_album_without_preload_content(
2577
+ self,
2578
+ id: UUID,
2579
+ user_id: StrictStr,
2580
+ _request_timeout: Union[
2581
+ None,
2582
+ Annotated[StrictFloat, Field(gt=0)],
2583
+ Tuple[
2584
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2585
+ ],
2586
+ ] = None,
2587
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2588
+ _content_type: Optional[StrictStr] = None,
2589
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2590
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2591
+ ) -> RESTResponseType:
2592
+ """Remove user from album
2593
+
2594
+ Remove a user from an album. Use an ID of \"me\" to leave a shared album.
2595
+
2596
+ :param id: (required)
2597
+ :type id: UUID
2598
+ :param user_id: (required)
2599
+ :type user_id: str
2600
+ :param _request_timeout: timeout setting for this request. If one
2601
+ number provided, it will be total request
2602
+ timeout. It can also be a pair (tuple) of
2603
+ (connection, read) timeouts.
2604
+ :type _request_timeout: int, tuple(int, int), optional
2605
+ :param _request_auth: set to override the auth_settings for an a single
2606
+ request; this effectively ignores the
2607
+ authentication in the spec for a single request.
2608
+ :type _request_auth: dict, optional
2609
+ :param _content_type: force content-type for the request.
2610
+ :type _content_type: str, Optional
2611
+ :param _headers: set to override the headers for a single
2612
+ request; this effectively ignores the headers
2613
+ in the spec for a single request.
2614
+ :type _headers: dict, optional
2615
+ :param _host_index: set to override the host_index for a single
2616
+ request; this effectively ignores the host_index
2617
+ in the spec for a single request.
2618
+ :type _host_index: int, optional
2619
+ :return: Returns the result object.
2620
+ """ # noqa: E501
2621
+
2622
+ _param = self._remove_user_from_album_serialize(
2623
+ id=id,
2624
+ user_id=user_id,
2625
+ _request_auth=_request_auth,
2626
+ _content_type=_content_type,
2627
+ _headers=_headers,
2628
+ _host_index=_host_index,
2629
+ )
2630
+
2631
+ _response_types_map: Dict[str, Optional[str]] = {
2632
+ "204": None,
2633
+ }
2634
+ response_data = await self.api_client.call_api(
2635
+ *_param, _request_timeout=_request_timeout
2636
+ )
2637
+ return response_data.response
2638
+
2639
+ def _remove_user_from_album_serialize(
2640
+ self,
2641
+ id,
2642
+ user_id,
2643
+ _request_auth,
2644
+ _content_type,
2645
+ _headers,
2646
+ _host_index,
2647
+ ) -> RequestSerialized:
2648
+ _host = None
2649
+
2650
+ _collection_formats: Dict[str, str] = {}
2651
+
2652
+ _path_params: Dict[str, str] = {}
2653
+ _query_params: List[Tuple[str, str]] = []
2654
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2655
+ _form_params: List[Tuple[str, str]] = []
2656
+ _files: Dict[
2657
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2658
+ ] = {}
2659
+ _body_params: Optional[bytes] = None
2660
+
2661
+ # process the path parameters
2662
+ if id is not None:
2663
+ _path_params["id"] = id
2664
+ if user_id is not None:
2665
+ _path_params["userId"] = user_id
2666
+ # process the query parameters
2667
+ # process the header parameters
2668
+ # process the form parameters
2669
+ # process the body parameter
2670
+
2671
+ # authentication setting
2672
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2673
+
2674
+ return self.api_client.param_serialize(
2675
+ method="DELETE",
2676
+ resource_path="/albums/{id}/user/{userId}",
2677
+ path_params=_path_params,
2678
+ query_params=_query_params,
2679
+ header_params=_header_params,
2680
+ body=_body_params,
2681
+ post_params=_form_params,
2682
+ files=_files,
2683
+ auth_settings=_auth_settings,
2684
+ collection_formats=_collection_formats,
2685
+ _host=_host,
2686
+ _request_auth=_request_auth,
2687
+ )
2688
+
2689
+ @validate_call
2690
+ async def update_album_info(
2691
+ self,
2692
+ id: UUID,
2693
+ update_album_dto: UpdateAlbumDto,
2694
+ _request_timeout: Union[
2695
+ None,
2696
+ Annotated[StrictFloat, Field(gt=0)],
2697
+ Tuple[
2698
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2699
+ ],
2700
+ ] = None,
2701
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2702
+ _content_type: Optional[StrictStr] = None,
2703
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2704
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2705
+ ) -> AlbumResponseDto:
2706
+ """Update an album
2707
+
2708
+ Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.
2709
+
2710
+ :param id: (required)
2711
+ :type id: UUID
2712
+ :param update_album_dto: (required)
2713
+ :type update_album_dto: UpdateAlbumDto
2714
+ :param _request_timeout: timeout setting for this request. If one
2715
+ number provided, it will be total request
2716
+ timeout. It can also be a pair (tuple) of
2717
+ (connection, read) timeouts.
2718
+ :type _request_timeout: int, tuple(int, int), optional
2719
+ :param _request_auth: set to override the auth_settings for an a single
2720
+ request; this effectively ignores the
2721
+ authentication in the spec for a single request.
2722
+ :type _request_auth: dict, optional
2723
+ :param _content_type: force content-type for the request.
2724
+ :type _content_type: str, Optional
2725
+ :param _headers: set to override the headers for a single
2726
+ request; this effectively ignores the headers
2727
+ in the spec for a single request.
2728
+ :type _headers: dict, optional
2729
+ :param _host_index: set to override the host_index for a single
2730
+ request; this effectively ignores the host_index
2731
+ in the spec for a single request.
2732
+ :type _host_index: int, optional
2733
+ :return: Returns the result object.
2734
+ """ # noqa: E501
2735
+
2736
+ _param = self._update_album_info_serialize(
2737
+ id=id,
2738
+ update_album_dto=update_album_dto,
2739
+ _request_auth=_request_auth,
2740
+ _content_type=_content_type,
2741
+ _headers=_headers,
2742
+ _host_index=_host_index,
2743
+ )
2744
+
2745
+ _response_types_map: Dict[str, Optional[str]] = {
2746
+ "200": "AlbumResponseDto",
2747
+ }
2748
+ response_data = await self.api_client.call_api(
2749
+ *_param, _request_timeout=_request_timeout
2750
+ )
2751
+ await response_data.read()
2752
+ return self.api_client.response_deserialize(
2753
+ response_data=response_data,
2754
+ response_types_map=_response_types_map,
2755
+ ).data
2756
+
2757
+ @validate_call
2758
+ async def update_album_info_with_http_info(
2759
+ self,
2760
+ id: UUID,
2761
+ update_album_dto: UpdateAlbumDto,
2762
+ _request_timeout: Union[
2763
+ None,
2764
+ Annotated[StrictFloat, Field(gt=0)],
2765
+ Tuple[
2766
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2767
+ ],
2768
+ ] = None,
2769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2770
+ _content_type: Optional[StrictStr] = None,
2771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2773
+ ) -> ApiResponse[AlbumResponseDto]:
2774
+ """Update an album
2775
+
2776
+ Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.
2777
+
2778
+ :param id: (required)
2779
+ :type id: UUID
2780
+ :param update_album_dto: (required)
2781
+ :type update_album_dto: UpdateAlbumDto
2782
+ :param _request_timeout: timeout setting for this request. If one
2783
+ number provided, it will be total request
2784
+ timeout. It can also be a pair (tuple) of
2785
+ (connection, read) timeouts.
2786
+ :type _request_timeout: int, tuple(int, int), optional
2787
+ :param _request_auth: set to override the auth_settings for an a single
2788
+ request; this effectively ignores the
2789
+ authentication in the spec for a single request.
2790
+ :type _request_auth: dict, optional
2791
+ :param _content_type: force content-type for the request.
2792
+ :type _content_type: str, Optional
2793
+ :param _headers: set to override the headers for a single
2794
+ request; this effectively ignores the headers
2795
+ in the spec for a single request.
2796
+ :type _headers: dict, optional
2797
+ :param _host_index: set to override the host_index for a single
2798
+ request; this effectively ignores the host_index
2799
+ in the spec for a single request.
2800
+ :type _host_index: int, optional
2801
+ :return: Returns the result object.
2802
+ """ # noqa: E501
2803
+
2804
+ _param = self._update_album_info_serialize(
2805
+ id=id,
2806
+ update_album_dto=update_album_dto,
2807
+ _request_auth=_request_auth,
2808
+ _content_type=_content_type,
2809
+ _headers=_headers,
2810
+ _host_index=_host_index,
2811
+ )
2812
+
2813
+ _response_types_map: Dict[str, Optional[str]] = {
2814
+ "200": "AlbumResponseDto",
2815
+ }
2816
+ response_data = await self.api_client.call_api(
2817
+ *_param, _request_timeout=_request_timeout
2818
+ )
2819
+ await response_data.read()
2820
+ return self.api_client.response_deserialize(
2821
+ response_data=response_data,
2822
+ response_types_map=_response_types_map,
2823
+ )
2824
+
2825
+ @validate_call
2826
+ async def update_album_info_without_preload_content(
2827
+ self,
2828
+ id: UUID,
2829
+ update_album_dto: UpdateAlbumDto,
2830
+ _request_timeout: Union[
2831
+ None,
2832
+ Annotated[StrictFloat, Field(gt=0)],
2833
+ Tuple[
2834
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2835
+ ],
2836
+ ] = None,
2837
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2838
+ _content_type: Optional[StrictStr] = None,
2839
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2840
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2841
+ ) -> RESTResponseType:
2842
+ """Update an album
2843
+
2844
+ Update the information of a specific album by its ID. This endpoint can be used to update the album name, description, sort order, etc. However, it is not used to add or remove assets or users from the album.
2845
+
2846
+ :param id: (required)
2847
+ :type id: UUID
2848
+ :param update_album_dto: (required)
2849
+ :type update_album_dto: UpdateAlbumDto
2850
+ :param _request_timeout: timeout setting for this request. If one
2851
+ number provided, it will be total request
2852
+ timeout. It can also be a pair (tuple) of
2853
+ (connection, read) timeouts.
2854
+ :type _request_timeout: int, tuple(int, int), optional
2855
+ :param _request_auth: set to override the auth_settings for an a single
2856
+ request; this effectively ignores the
2857
+ authentication in the spec for a single request.
2858
+ :type _request_auth: dict, optional
2859
+ :param _content_type: force content-type for the request.
2860
+ :type _content_type: str, Optional
2861
+ :param _headers: set to override the headers for a single
2862
+ request; this effectively ignores the headers
2863
+ in the spec for a single request.
2864
+ :type _headers: dict, optional
2865
+ :param _host_index: set to override the host_index for a single
2866
+ request; this effectively ignores the host_index
2867
+ in the spec for a single request.
2868
+ :type _host_index: int, optional
2869
+ :return: Returns the result object.
2870
+ """ # noqa: E501
2871
+
2872
+ _param = self._update_album_info_serialize(
2873
+ id=id,
2874
+ update_album_dto=update_album_dto,
2875
+ _request_auth=_request_auth,
2876
+ _content_type=_content_type,
2877
+ _headers=_headers,
2878
+ _host_index=_host_index,
2879
+ )
2880
+
2881
+ _response_types_map: Dict[str, Optional[str]] = {
2882
+ "200": "AlbumResponseDto",
2883
+ }
2884
+ response_data = await self.api_client.call_api(
2885
+ *_param, _request_timeout=_request_timeout
2886
+ )
2887
+ return response_data.response
2888
+
2889
+ def _update_album_info_serialize(
2890
+ self,
2891
+ id,
2892
+ update_album_dto,
2893
+ _request_auth,
2894
+ _content_type,
2895
+ _headers,
2896
+ _host_index,
2897
+ ) -> RequestSerialized:
2898
+ _host = None
2899
+
2900
+ _collection_formats: Dict[str, str] = {}
2901
+
2902
+ _path_params: Dict[str, str] = {}
2903
+ _query_params: List[Tuple[str, str]] = []
2904
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2905
+ _form_params: List[Tuple[str, str]] = []
2906
+ _files: Dict[
2907
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2908
+ ] = {}
2909
+ _body_params: Optional[bytes] = None
2910
+
2911
+ # process the path parameters
2912
+ if id is not None:
2913
+ _path_params["id"] = id
2914
+ # process the query parameters
2915
+ # process the header parameters
2916
+ # process the form parameters
2917
+ # process the body parameter
2918
+ if update_album_dto is not None:
2919
+ _body_params = update_album_dto
2920
+
2921
+ # set the HTTP header `Accept`
2922
+ if "Accept" not in _header_params:
2923
+ _header_params["Accept"] = self.api_client.select_header_accept(
2924
+ ["application/json"]
2925
+ )
2926
+
2927
+ # set the HTTP header `Content-Type`
2928
+ if _content_type:
2929
+ _header_params["Content-Type"] = _content_type
2930
+ else:
2931
+ _default_content_type = self.api_client.select_header_content_type(
2932
+ ["application/json"]
2933
+ )
2934
+ if _default_content_type is not None:
2935
+ _header_params["Content-Type"] = _default_content_type
2936
+
2937
+ # authentication setting
2938
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2939
+
2940
+ return self.api_client.param_serialize(
2941
+ method="PATCH",
2942
+ resource_path="/albums/{id}",
2943
+ path_params=_path_params,
2944
+ query_params=_query_params,
2945
+ header_params=_header_params,
2946
+ body=_body_params,
2947
+ post_params=_form_params,
2948
+ files=_files,
2949
+ auth_settings=_auth_settings,
2950
+ collection_formats=_collection_formats,
2951
+ _host=_host,
2952
+ _request_auth=_request_auth,
2953
+ )
2954
+
2955
+ @validate_call
2956
+ async def update_album_user(
2957
+ self,
2958
+ id: UUID,
2959
+ user_id: StrictStr,
2960
+ update_album_user_dto: UpdateAlbumUserDto,
2961
+ _request_timeout: Union[
2962
+ None,
2963
+ Annotated[StrictFloat, Field(gt=0)],
2964
+ Tuple[
2965
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2966
+ ],
2967
+ ] = None,
2968
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2969
+ _content_type: Optional[StrictStr] = None,
2970
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2971
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2972
+ ) -> None:
2973
+ """Update user role
2974
+
2975
+ Change the role for a specific user in a specific album.
2976
+
2977
+ :param id: (required)
2978
+ :type id: UUID
2979
+ :param user_id: (required)
2980
+ :type user_id: str
2981
+ :param update_album_user_dto: (required)
2982
+ :type update_album_user_dto: UpdateAlbumUserDto
2983
+ :param _request_timeout: timeout setting for this request. If one
2984
+ number provided, it will be total request
2985
+ timeout. It can also be a pair (tuple) of
2986
+ (connection, read) timeouts.
2987
+ :type _request_timeout: int, tuple(int, int), optional
2988
+ :param _request_auth: set to override the auth_settings for an a single
2989
+ request; this effectively ignores the
2990
+ authentication in the spec for a single request.
2991
+ :type _request_auth: dict, optional
2992
+ :param _content_type: force content-type for the request.
2993
+ :type _content_type: str, Optional
2994
+ :param _headers: set to override the headers for a single
2995
+ request; this effectively ignores the headers
2996
+ in the spec for a single request.
2997
+ :type _headers: dict, optional
2998
+ :param _host_index: set to override the host_index for a single
2999
+ request; this effectively ignores the host_index
3000
+ in the spec for a single request.
3001
+ :type _host_index: int, optional
3002
+ :return: Returns the result object.
3003
+ """ # noqa: E501
3004
+
3005
+ _param = self._update_album_user_serialize(
3006
+ id=id,
3007
+ user_id=user_id,
3008
+ update_album_user_dto=update_album_user_dto,
3009
+ _request_auth=_request_auth,
3010
+ _content_type=_content_type,
3011
+ _headers=_headers,
3012
+ _host_index=_host_index,
3013
+ )
3014
+
3015
+ _response_types_map: Dict[str, Optional[str]] = {
3016
+ "204": None,
3017
+ }
3018
+ response_data = await self.api_client.call_api(
3019
+ *_param, _request_timeout=_request_timeout
3020
+ )
3021
+ await response_data.read()
3022
+ return self.api_client.response_deserialize(
3023
+ response_data=response_data,
3024
+ response_types_map=_response_types_map,
3025
+ ).data
3026
+
3027
+ @validate_call
3028
+ async def update_album_user_with_http_info(
3029
+ self,
3030
+ id: UUID,
3031
+ user_id: StrictStr,
3032
+ update_album_user_dto: UpdateAlbumUserDto,
3033
+ _request_timeout: Union[
3034
+ None,
3035
+ Annotated[StrictFloat, Field(gt=0)],
3036
+ Tuple[
3037
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3038
+ ],
3039
+ ] = None,
3040
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3041
+ _content_type: Optional[StrictStr] = None,
3042
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3043
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3044
+ ) -> ApiResponse[None]:
3045
+ """Update user role
3046
+
3047
+ Change the role for a specific user in a specific album.
3048
+
3049
+ :param id: (required)
3050
+ :type id: UUID
3051
+ :param user_id: (required)
3052
+ :type user_id: str
3053
+ :param update_album_user_dto: (required)
3054
+ :type update_album_user_dto: UpdateAlbumUserDto
3055
+ :param _request_timeout: timeout setting for this request. If one
3056
+ number provided, it will be total request
3057
+ timeout. It can also be a pair (tuple) of
3058
+ (connection, read) timeouts.
3059
+ :type _request_timeout: int, tuple(int, int), optional
3060
+ :param _request_auth: set to override the auth_settings for an a single
3061
+ request; this effectively ignores the
3062
+ authentication in the spec for a single request.
3063
+ :type _request_auth: dict, optional
3064
+ :param _content_type: force content-type for the request.
3065
+ :type _content_type: str, Optional
3066
+ :param _headers: set to override the headers for a single
3067
+ request; this effectively ignores the headers
3068
+ in the spec for a single request.
3069
+ :type _headers: dict, optional
3070
+ :param _host_index: set to override the host_index for a single
3071
+ request; this effectively ignores the host_index
3072
+ in the spec for a single request.
3073
+ :type _host_index: int, optional
3074
+ :return: Returns the result object.
3075
+ """ # noqa: E501
3076
+
3077
+ _param = self._update_album_user_serialize(
3078
+ id=id,
3079
+ user_id=user_id,
3080
+ update_album_user_dto=update_album_user_dto,
3081
+ _request_auth=_request_auth,
3082
+ _content_type=_content_type,
3083
+ _headers=_headers,
3084
+ _host_index=_host_index,
3085
+ )
3086
+
3087
+ _response_types_map: Dict[str, Optional[str]] = {
3088
+ "204": None,
3089
+ }
3090
+ response_data = await self.api_client.call_api(
3091
+ *_param, _request_timeout=_request_timeout
3092
+ )
3093
+ await response_data.read()
3094
+ return self.api_client.response_deserialize(
3095
+ response_data=response_data,
3096
+ response_types_map=_response_types_map,
3097
+ )
3098
+
3099
+ @validate_call
3100
+ async def update_album_user_without_preload_content(
3101
+ self,
3102
+ id: UUID,
3103
+ user_id: StrictStr,
3104
+ update_album_user_dto: UpdateAlbumUserDto,
3105
+ _request_timeout: Union[
3106
+ None,
3107
+ Annotated[StrictFloat, Field(gt=0)],
3108
+ Tuple[
3109
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
3110
+ ],
3111
+ ] = None,
3112
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
3113
+ _content_type: Optional[StrictStr] = None,
3114
+ _headers: Optional[Dict[StrictStr, Any]] = None,
3115
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
3116
+ ) -> RESTResponseType:
3117
+ """Update user role
3118
+
3119
+ Change the role for a specific user in a specific album.
3120
+
3121
+ :param id: (required)
3122
+ :type id: UUID
3123
+ :param user_id: (required)
3124
+ :type user_id: str
3125
+ :param update_album_user_dto: (required)
3126
+ :type update_album_user_dto: UpdateAlbumUserDto
3127
+ :param _request_timeout: timeout setting for this request. If one
3128
+ number provided, it will be total request
3129
+ timeout. It can also be a pair (tuple) of
3130
+ (connection, read) timeouts.
3131
+ :type _request_timeout: int, tuple(int, int), optional
3132
+ :param _request_auth: set to override the auth_settings for an a single
3133
+ request; this effectively ignores the
3134
+ authentication in the spec for a single request.
3135
+ :type _request_auth: dict, optional
3136
+ :param _content_type: force content-type for the request.
3137
+ :type _content_type: str, Optional
3138
+ :param _headers: set to override the headers for a single
3139
+ request; this effectively ignores the headers
3140
+ in the spec for a single request.
3141
+ :type _headers: dict, optional
3142
+ :param _host_index: set to override the host_index for a single
3143
+ request; this effectively ignores the host_index
3144
+ in the spec for a single request.
3145
+ :type _host_index: int, optional
3146
+ :return: Returns the result object.
3147
+ """ # noqa: E501
3148
+
3149
+ _param = self._update_album_user_serialize(
3150
+ id=id,
3151
+ user_id=user_id,
3152
+ update_album_user_dto=update_album_user_dto,
3153
+ _request_auth=_request_auth,
3154
+ _content_type=_content_type,
3155
+ _headers=_headers,
3156
+ _host_index=_host_index,
3157
+ )
3158
+
3159
+ _response_types_map: Dict[str, Optional[str]] = {
3160
+ "204": None,
3161
+ }
3162
+ response_data = await self.api_client.call_api(
3163
+ *_param, _request_timeout=_request_timeout
3164
+ )
3165
+ return response_data.response
3166
+
3167
+ def _update_album_user_serialize(
3168
+ self,
3169
+ id,
3170
+ user_id,
3171
+ update_album_user_dto,
3172
+ _request_auth,
3173
+ _content_type,
3174
+ _headers,
3175
+ _host_index,
3176
+ ) -> RequestSerialized:
3177
+ _host = None
3178
+
3179
+ _collection_formats: Dict[str, str] = {}
3180
+
3181
+ _path_params: Dict[str, str] = {}
3182
+ _query_params: List[Tuple[str, str]] = []
3183
+ _header_params: Dict[str, Optional[str]] = _headers or {}
3184
+ _form_params: List[Tuple[str, str]] = []
3185
+ _files: Dict[
3186
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
3187
+ ] = {}
3188
+ _body_params: Optional[bytes] = None
3189
+
3190
+ # process the path parameters
3191
+ if id is not None:
3192
+ _path_params["id"] = id
3193
+ if user_id is not None:
3194
+ _path_params["userId"] = user_id
3195
+ # process the query parameters
3196
+ # process the header parameters
3197
+ # process the form parameters
3198
+ # process the body parameter
3199
+ if update_album_user_dto is not None:
3200
+ _body_params = update_album_user_dto
3201
+
3202
+ # set the HTTP header `Content-Type`
3203
+ if _content_type:
3204
+ _header_params["Content-Type"] = _content_type
3205
+ else:
3206
+ _default_content_type = self.api_client.select_header_content_type(
3207
+ ["application/json"]
3208
+ )
3209
+ if _default_content_type is not None:
3210
+ _header_params["Content-Type"] = _default_content_type
3211
+
3212
+ # authentication setting
3213
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
3214
+
3215
+ return self.api_client.param_serialize(
3216
+ method="PUT",
3217
+ resource_path="/albums/{id}/user/{userId}",
3218
+ path_params=_path_params,
3219
+ query_params=_query_params,
3220
+ header_params=_header_params,
3221
+ body=_body_params,
3222
+ post_params=_form_params,
3223
+ files=_files,
3224
+ auth_settings=_auth_settings,
3225
+ collection_formats=_collection_formats,
3226
+ _host=_host,
3227
+ _request_auth=_request_auth,
3228
+ )