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,2296 @@
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 uuid import UUID
19
+ from immich.client.models.bulk_id_response_dto import BulkIdResponseDto
20
+ from immich.client.models.bulk_ids_dto import BulkIdsDto
21
+ from immich.client.models.tag_bulk_assets_dto import TagBulkAssetsDto
22
+ from immich.client.models.tag_bulk_assets_response_dto import TagBulkAssetsResponseDto
23
+ from immich.client.models.tag_create_dto import TagCreateDto
24
+ from immich.client.models.tag_response_dto import TagResponseDto
25
+ from immich.client.models.tag_update_dto import TagUpdateDto
26
+ from immich.client.models.tag_upsert_dto import TagUpsertDto
27
+
28
+ from immich.client.api_client import ApiClient, RequestSerialized
29
+ from immich.client.api_response import ApiResponse
30
+ from immich.client.rest import RESTResponseType
31
+
32
+
33
+ class TagsApi:
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None) -> None:
41
+ if api_client is None:
42
+ api_client = ApiClient.get_default()
43
+ self.api_client = api_client
44
+
45
+ @validate_call
46
+ async def bulk_tag_assets(
47
+ self,
48
+ tag_bulk_assets_dto: TagBulkAssetsDto,
49
+ _request_timeout: Union[
50
+ None,
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Tuple[
53
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
54
+ ],
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> TagBulkAssetsResponseDto:
61
+ """Tag assets
62
+
63
+ Add multiple tags to multiple assets in a single request.
64
+
65
+ :param tag_bulk_assets_dto: (required)
66
+ :type tag_bulk_assets_dto: TagBulkAssetsDto
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :type _request_timeout: int, tuple(int, int), optional
72
+ :param _request_auth: set to override the auth_settings for an a single
73
+ request; this effectively ignores the
74
+ authentication in the spec for a single request.
75
+ :type _request_auth: dict, optional
76
+ :param _content_type: force content-type for the request.
77
+ :type _content_type: str, Optional
78
+ :param _headers: set to override the headers for a single
79
+ request; this effectively ignores the headers
80
+ in the spec for a single request.
81
+ :type _headers: dict, optional
82
+ :param _host_index: set to override the host_index for a single
83
+ request; this effectively ignores the host_index
84
+ in the spec for a single request.
85
+ :type _host_index: int, optional
86
+ :return: Returns the result object.
87
+ """ # noqa: E501
88
+
89
+ _param = self._bulk_tag_assets_serialize(
90
+ tag_bulk_assets_dto=tag_bulk_assets_dto,
91
+ _request_auth=_request_auth,
92
+ _content_type=_content_type,
93
+ _headers=_headers,
94
+ _host_index=_host_index,
95
+ )
96
+
97
+ _response_types_map: Dict[str, Optional[str]] = {
98
+ "200": "TagBulkAssetsResponseDto",
99
+ }
100
+ response_data = await self.api_client.call_api(
101
+ *_param, _request_timeout=_request_timeout
102
+ )
103
+ await response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+ @validate_call
110
+ async def bulk_tag_assets_with_http_info(
111
+ self,
112
+ tag_bulk_assets_dto: TagBulkAssetsDto,
113
+ _request_timeout: Union[
114
+ None,
115
+ Annotated[StrictFloat, Field(gt=0)],
116
+ Tuple[
117
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
118
+ ],
119
+ ] = None,
120
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
121
+ _content_type: Optional[StrictStr] = None,
122
+ _headers: Optional[Dict[StrictStr, Any]] = None,
123
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
124
+ ) -> ApiResponse[TagBulkAssetsResponseDto]:
125
+ """Tag assets
126
+
127
+ Add multiple tags to multiple assets in a single request.
128
+
129
+ :param tag_bulk_assets_dto: (required)
130
+ :type tag_bulk_assets_dto: TagBulkAssetsDto
131
+ :param _request_timeout: timeout setting for this request. If one
132
+ number provided, it will be total request
133
+ timeout. It can also be a pair (tuple) of
134
+ (connection, read) timeouts.
135
+ :type _request_timeout: int, tuple(int, int), optional
136
+ :param _request_auth: set to override the auth_settings for an a single
137
+ request; this effectively ignores the
138
+ authentication in the spec for a single request.
139
+ :type _request_auth: dict, optional
140
+ :param _content_type: force content-type for the request.
141
+ :type _content_type: str, Optional
142
+ :param _headers: set to override the headers for a single
143
+ request; this effectively ignores the headers
144
+ in the spec for a single request.
145
+ :type _headers: dict, optional
146
+ :param _host_index: set to override the host_index for a single
147
+ request; this effectively ignores the host_index
148
+ in the spec for a single request.
149
+ :type _host_index: int, optional
150
+ :return: Returns the result object.
151
+ """ # noqa: E501
152
+
153
+ _param = self._bulk_tag_assets_serialize(
154
+ tag_bulk_assets_dto=tag_bulk_assets_dto,
155
+ _request_auth=_request_auth,
156
+ _content_type=_content_type,
157
+ _headers=_headers,
158
+ _host_index=_host_index,
159
+ )
160
+
161
+ _response_types_map: Dict[str, Optional[str]] = {
162
+ "200": "TagBulkAssetsResponseDto",
163
+ }
164
+ response_data = await self.api_client.call_api(
165
+ *_param, _request_timeout=_request_timeout
166
+ )
167
+ await response_data.read()
168
+ return self.api_client.response_deserialize(
169
+ response_data=response_data,
170
+ response_types_map=_response_types_map,
171
+ )
172
+
173
+ @validate_call
174
+ async def bulk_tag_assets_without_preload_content(
175
+ self,
176
+ tag_bulk_assets_dto: TagBulkAssetsDto,
177
+ _request_timeout: Union[
178
+ None,
179
+ Annotated[StrictFloat, Field(gt=0)],
180
+ Tuple[
181
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
182
+ ],
183
+ ] = None,
184
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
185
+ _content_type: Optional[StrictStr] = None,
186
+ _headers: Optional[Dict[StrictStr, Any]] = None,
187
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
188
+ ) -> RESTResponseType:
189
+ """Tag assets
190
+
191
+ Add multiple tags to multiple assets in a single request.
192
+
193
+ :param tag_bulk_assets_dto: (required)
194
+ :type tag_bulk_assets_dto: TagBulkAssetsDto
195
+ :param _request_timeout: timeout setting for this request. If one
196
+ number provided, it will be total request
197
+ timeout. It can also be a pair (tuple) of
198
+ (connection, read) timeouts.
199
+ :type _request_timeout: int, tuple(int, int), optional
200
+ :param _request_auth: set to override the auth_settings for an a single
201
+ request; this effectively ignores the
202
+ authentication in the spec for a single request.
203
+ :type _request_auth: dict, optional
204
+ :param _content_type: force content-type for the request.
205
+ :type _content_type: str, Optional
206
+ :param _headers: set to override the headers for a single
207
+ request; this effectively ignores the headers
208
+ in the spec for a single request.
209
+ :type _headers: dict, optional
210
+ :param _host_index: set to override the host_index for a single
211
+ request; this effectively ignores the host_index
212
+ in the spec for a single request.
213
+ :type _host_index: int, optional
214
+ :return: Returns the result object.
215
+ """ # noqa: E501
216
+
217
+ _param = self._bulk_tag_assets_serialize(
218
+ tag_bulk_assets_dto=tag_bulk_assets_dto,
219
+ _request_auth=_request_auth,
220
+ _content_type=_content_type,
221
+ _headers=_headers,
222
+ _host_index=_host_index,
223
+ )
224
+
225
+ _response_types_map: Dict[str, Optional[str]] = {
226
+ "200": "TagBulkAssetsResponseDto",
227
+ }
228
+ response_data = await self.api_client.call_api(
229
+ *_param, _request_timeout=_request_timeout
230
+ )
231
+ return response_data.response
232
+
233
+ def _bulk_tag_assets_serialize(
234
+ self,
235
+ tag_bulk_assets_dto,
236
+ _request_auth,
237
+ _content_type,
238
+ _headers,
239
+ _host_index,
240
+ ) -> RequestSerialized:
241
+ _host = None
242
+
243
+ _collection_formats: Dict[str, str] = {}
244
+
245
+ _path_params: Dict[str, str] = {}
246
+ _query_params: List[Tuple[str, str]] = []
247
+ _header_params: Dict[str, Optional[str]] = _headers or {}
248
+ _form_params: List[Tuple[str, str]] = []
249
+ _files: Dict[
250
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
251
+ ] = {}
252
+ _body_params: Optional[bytes] = None
253
+
254
+ # process the path parameters
255
+ # process the query parameters
256
+ # process the header parameters
257
+ # process the form parameters
258
+ # process the body parameter
259
+ if tag_bulk_assets_dto is not None:
260
+ _body_params = tag_bulk_assets_dto
261
+
262
+ # set the HTTP header `Accept`
263
+ if "Accept" not in _header_params:
264
+ _header_params["Accept"] = self.api_client.select_header_accept(
265
+ ["application/json"]
266
+ )
267
+
268
+ # set the HTTP header `Content-Type`
269
+ if _content_type:
270
+ _header_params["Content-Type"] = _content_type
271
+ else:
272
+ _default_content_type = self.api_client.select_header_content_type(
273
+ ["application/json"]
274
+ )
275
+ if _default_content_type is not None:
276
+ _header_params["Content-Type"] = _default_content_type
277
+
278
+ # authentication setting
279
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
280
+
281
+ return self.api_client.param_serialize(
282
+ method="PUT",
283
+ resource_path="/tags/assets",
284
+ path_params=_path_params,
285
+ query_params=_query_params,
286
+ header_params=_header_params,
287
+ body=_body_params,
288
+ post_params=_form_params,
289
+ files=_files,
290
+ auth_settings=_auth_settings,
291
+ collection_formats=_collection_formats,
292
+ _host=_host,
293
+ _request_auth=_request_auth,
294
+ )
295
+
296
+ @validate_call
297
+ async def create_tag(
298
+ self,
299
+ tag_create_dto: TagCreateDto,
300
+ _request_timeout: Union[
301
+ None,
302
+ Annotated[StrictFloat, Field(gt=0)],
303
+ Tuple[
304
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
305
+ ],
306
+ ] = None,
307
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
308
+ _content_type: Optional[StrictStr] = None,
309
+ _headers: Optional[Dict[StrictStr, Any]] = None,
310
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
311
+ ) -> TagResponseDto:
312
+ """Create a tag
313
+
314
+ Create a new tag by providing a name and optional color.
315
+
316
+ :param tag_create_dto: (required)
317
+ :type tag_create_dto: TagCreateDto
318
+ :param _request_timeout: timeout setting for this request. If one
319
+ number provided, it will be total request
320
+ timeout. It can also be a pair (tuple) of
321
+ (connection, read) timeouts.
322
+ :type _request_timeout: int, tuple(int, int), optional
323
+ :param _request_auth: set to override the auth_settings for an a single
324
+ request; this effectively ignores the
325
+ authentication in the spec for a single request.
326
+ :type _request_auth: dict, optional
327
+ :param _content_type: force content-type for the request.
328
+ :type _content_type: str, Optional
329
+ :param _headers: set to override the headers for a single
330
+ request; this effectively ignores the headers
331
+ in the spec for a single request.
332
+ :type _headers: dict, optional
333
+ :param _host_index: set to override the host_index for a single
334
+ request; this effectively ignores the host_index
335
+ in the spec for a single request.
336
+ :type _host_index: int, optional
337
+ :return: Returns the result object.
338
+ """ # noqa: E501
339
+
340
+ _param = self._create_tag_serialize(
341
+ tag_create_dto=tag_create_dto,
342
+ _request_auth=_request_auth,
343
+ _content_type=_content_type,
344
+ _headers=_headers,
345
+ _host_index=_host_index,
346
+ )
347
+
348
+ _response_types_map: Dict[str, Optional[str]] = {
349
+ "201": "TagResponseDto",
350
+ }
351
+ response_data = await self.api_client.call_api(
352
+ *_param, _request_timeout=_request_timeout
353
+ )
354
+ await response_data.read()
355
+ return self.api_client.response_deserialize(
356
+ response_data=response_data,
357
+ response_types_map=_response_types_map,
358
+ ).data
359
+
360
+ @validate_call
361
+ async def create_tag_with_http_info(
362
+ self,
363
+ tag_create_dto: TagCreateDto,
364
+ _request_timeout: Union[
365
+ None,
366
+ Annotated[StrictFloat, Field(gt=0)],
367
+ Tuple[
368
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
369
+ ],
370
+ ] = None,
371
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
372
+ _content_type: Optional[StrictStr] = None,
373
+ _headers: Optional[Dict[StrictStr, Any]] = None,
374
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
375
+ ) -> ApiResponse[TagResponseDto]:
376
+ """Create a tag
377
+
378
+ Create a new tag by providing a name and optional color.
379
+
380
+ :param tag_create_dto: (required)
381
+ :type tag_create_dto: TagCreateDto
382
+ :param _request_timeout: timeout setting for this request. If one
383
+ number provided, it will be total request
384
+ timeout. It can also be a pair (tuple) of
385
+ (connection, read) timeouts.
386
+ :type _request_timeout: int, tuple(int, int), optional
387
+ :param _request_auth: set to override the auth_settings for an a single
388
+ request; this effectively ignores the
389
+ authentication in the spec for a single request.
390
+ :type _request_auth: dict, optional
391
+ :param _content_type: force content-type for the request.
392
+ :type _content_type: str, Optional
393
+ :param _headers: set to override the headers for a single
394
+ request; this effectively ignores the headers
395
+ in the spec for a single request.
396
+ :type _headers: dict, optional
397
+ :param _host_index: set to override the host_index for a single
398
+ request; this effectively ignores the host_index
399
+ in the spec for a single request.
400
+ :type _host_index: int, optional
401
+ :return: Returns the result object.
402
+ """ # noqa: E501
403
+
404
+ _param = self._create_tag_serialize(
405
+ tag_create_dto=tag_create_dto,
406
+ _request_auth=_request_auth,
407
+ _content_type=_content_type,
408
+ _headers=_headers,
409
+ _host_index=_host_index,
410
+ )
411
+
412
+ _response_types_map: Dict[str, Optional[str]] = {
413
+ "201": "TagResponseDto",
414
+ }
415
+ response_data = await self.api_client.call_api(
416
+ *_param, _request_timeout=_request_timeout
417
+ )
418
+ await response_data.read()
419
+ return self.api_client.response_deserialize(
420
+ response_data=response_data,
421
+ response_types_map=_response_types_map,
422
+ )
423
+
424
+ @validate_call
425
+ async def create_tag_without_preload_content(
426
+ self,
427
+ tag_create_dto: TagCreateDto,
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
+ ) -> RESTResponseType:
440
+ """Create a tag
441
+
442
+ Create a new tag by providing a name and optional color.
443
+
444
+ :param tag_create_dto: (required)
445
+ :type tag_create_dto: TagCreateDto
446
+ :param _request_timeout: timeout setting for this request. If one
447
+ number provided, it will be total request
448
+ timeout. It can also be a pair (tuple) of
449
+ (connection, read) timeouts.
450
+ :type _request_timeout: int, tuple(int, int), optional
451
+ :param _request_auth: set to override the auth_settings for an a single
452
+ request; this effectively ignores the
453
+ authentication in the spec for a single request.
454
+ :type _request_auth: dict, optional
455
+ :param _content_type: force content-type for the request.
456
+ :type _content_type: str, Optional
457
+ :param _headers: set to override the headers for a single
458
+ request; this effectively ignores the headers
459
+ in the spec for a single request.
460
+ :type _headers: dict, optional
461
+ :param _host_index: set to override the host_index for a single
462
+ request; this effectively ignores the host_index
463
+ in the spec for a single request.
464
+ :type _host_index: int, optional
465
+ :return: Returns the result object.
466
+ """ # noqa: E501
467
+
468
+ _param = self._create_tag_serialize(
469
+ tag_create_dto=tag_create_dto,
470
+ _request_auth=_request_auth,
471
+ _content_type=_content_type,
472
+ _headers=_headers,
473
+ _host_index=_host_index,
474
+ )
475
+
476
+ _response_types_map: Dict[str, Optional[str]] = {
477
+ "201": "TagResponseDto",
478
+ }
479
+ response_data = await self.api_client.call_api(
480
+ *_param, _request_timeout=_request_timeout
481
+ )
482
+ return response_data.response
483
+
484
+ def _create_tag_serialize(
485
+ self,
486
+ tag_create_dto,
487
+ _request_auth,
488
+ _content_type,
489
+ _headers,
490
+ _host_index,
491
+ ) -> RequestSerialized:
492
+ _host = None
493
+
494
+ _collection_formats: Dict[str, str] = {}
495
+
496
+ _path_params: Dict[str, str] = {}
497
+ _query_params: List[Tuple[str, str]] = []
498
+ _header_params: Dict[str, Optional[str]] = _headers or {}
499
+ _form_params: List[Tuple[str, str]] = []
500
+ _files: Dict[
501
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
502
+ ] = {}
503
+ _body_params: Optional[bytes] = None
504
+
505
+ # process the path parameters
506
+ # process the query parameters
507
+ # process the header parameters
508
+ # process the form parameters
509
+ # process the body parameter
510
+ if tag_create_dto is not None:
511
+ _body_params = tag_create_dto
512
+
513
+ # set the HTTP header `Accept`
514
+ if "Accept" not in _header_params:
515
+ _header_params["Accept"] = self.api_client.select_header_accept(
516
+ ["application/json"]
517
+ )
518
+
519
+ # set the HTTP header `Content-Type`
520
+ if _content_type:
521
+ _header_params["Content-Type"] = _content_type
522
+ else:
523
+ _default_content_type = self.api_client.select_header_content_type(
524
+ ["application/json"]
525
+ )
526
+ if _default_content_type is not None:
527
+ _header_params["Content-Type"] = _default_content_type
528
+
529
+ # authentication setting
530
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
531
+
532
+ return self.api_client.param_serialize(
533
+ method="POST",
534
+ resource_path="/tags",
535
+ path_params=_path_params,
536
+ query_params=_query_params,
537
+ header_params=_header_params,
538
+ body=_body_params,
539
+ post_params=_form_params,
540
+ files=_files,
541
+ auth_settings=_auth_settings,
542
+ collection_formats=_collection_formats,
543
+ _host=_host,
544
+ _request_auth=_request_auth,
545
+ )
546
+
547
+ @validate_call
548
+ async def delete_tag(
549
+ self,
550
+ id: UUID,
551
+ _request_timeout: Union[
552
+ None,
553
+ Annotated[StrictFloat, Field(gt=0)],
554
+ Tuple[
555
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
556
+ ],
557
+ ] = None,
558
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
559
+ _content_type: Optional[StrictStr] = None,
560
+ _headers: Optional[Dict[StrictStr, Any]] = None,
561
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
562
+ ) -> None:
563
+ """Delete a tag
564
+
565
+ Delete a specific tag by its ID.
566
+
567
+ :param id: (required)
568
+ :type id: UUID
569
+ :param _request_timeout: timeout setting for this request. If one
570
+ number provided, it will be total request
571
+ timeout. It can also be a pair (tuple) of
572
+ (connection, read) timeouts.
573
+ :type _request_timeout: int, tuple(int, int), optional
574
+ :param _request_auth: set to override the auth_settings for an a single
575
+ request; this effectively ignores the
576
+ authentication in the spec for a single request.
577
+ :type _request_auth: dict, optional
578
+ :param _content_type: force content-type for the request.
579
+ :type _content_type: str, Optional
580
+ :param _headers: set to override the headers for a single
581
+ request; this effectively ignores the headers
582
+ in the spec for a single request.
583
+ :type _headers: dict, optional
584
+ :param _host_index: set to override the host_index for a single
585
+ request; this effectively ignores the host_index
586
+ in the spec for a single request.
587
+ :type _host_index: int, optional
588
+ :return: Returns the result object.
589
+ """ # noqa: E501
590
+
591
+ _param = self._delete_tag_serialize(
592
+ id=id,
593
+ _request_auth=_request_auth,
594
+ _content_type=_content_type,
595
+ _headers=_headers,
596
+ _host_index=_host_index,
597
+ )
598
+
599
+ _response_types_map: Dict[str, Optional[str]] = {
600
+ "204": None,
601
+ }
602
+ response_data = await self.api_client.call_api(
603
+ *_param, _request_timeout=_request_timeout
604
+ )
605
+ await response_data.read()
606
+ return self.api_client.response_deserialize(
607
+ response_data=response_data,
608
+ response_types_map=_response_types_map,
609
+ ).data
610
+
611
+ @validate_call
612
+ async def delete_tag_with_http_info(
613
+ self,
614
+ id: UUID,
615
+ _request_timeout: Union[
616
+ None,
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Tuple[
619
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
620
+ ],
621
+ ] = None,
622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
623
+ _content_type: Optional[StrictStr] = None,
624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
626
+ ) -> ApiResponse[None]:
627
+ """Delete a tag
628
+
629
+ Delete a specific tag by its ID.
630
+
631
+ :param id: (required)
632
+ :type id: UUID
633
+ :param _request_timeout: timeout setting for this request. If one
634
+ number provided, it will be total request
635
+ timeout. It can also be a pair (tuple) of
636
+ (connection, read) timeouts.
637
+ :type _request_timeout: int, tuple(int, int), optional
638
+ :param _request_auth: set to override the auth_settings for an a single
639
+ request; this effectively ignores the
640
+ authentication in the spec for a single request.
641
+ :type _request_auth: dict, optional
642
+ :param _content_type: force content-type for the request.
643
+ :type _content_type: str, Optional
644
+ :param _headers: set to override the headers for a single
645
+ request; this effectively ignores the headers
646
+ in the spec for a single request.
647
+ :type _headers: dict, optional
648
+ :param _host_index: set to override the host_index for a single
649
+ request; this effectively ignores the host_index
650
+ in the spec for a single request.
651
+ :type _host_index: int, optional
652
+ :return: Returns the result object.
653
+ """ # noqa: E501
654
+
655
+ _param = self._delete_tag_serialize(
656
+ id=id,
657
+ _request_auth=_request_auth,
658
+ _content_type=_content_type,
659
+ _headers=_headers,
660
+ _host_index=_host_index,
661
+ )
662
+
663
+ _response_types_map: Dict[str, Optional[str]] = {
664
+ "204": None,
665
+ }
666
+ response_data = await self.api_client.call_api(
667
+ *_param, _request_timeout=_request_timeout
668
+ )
669
+ await response_data.read()
670
+ return self.api_client.response_deserialize(
671
+ response_data=response_data,
672
+ response_types_map=_response_types_map,
673
+ )
674
+
675
+ @validate_call
676
+ async def delete_tag_without_preload_content(
677
+ self,
678
+ id: UUID,
679
+ _request_timeout: Union[
680
+ None,
681
+ Annotated[StrictFloat, Field(gt=0)],
682
+ Tuple[
683
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
684
+ ],
685
+ ] = None,
686
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
687
+ _content_type: Optional[StrictStr] = None,
688
+ _headers: Optional[Dict[StrictStr, Any]] = None,
689
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
690
+ ) -> RESTResponseType:
691
+ """Delete a tag
692
+
693
+ Delete a specific tag by its ID.
694
+
695
+ :param id: (required)
696
+ :type id: UUID
697
+ :param _request_timeout: timeout setting for this request. If one
698
+ number provided, it will be total request
699
+ timeout. It can also be a pair (tuple) of
700
+ (connection, read) timeouts.
701
+ :type _request_timeout: int, tuple(int, int), optional
702
+ :param _request_auth: set to override the auth_settings for an a single
703
+ request; this effectively ignores the
704
+ authentication in the spec for a single request.
705
+ :type _request_auth: dict, optional
706
+ :param _content_type: force content-type for the request.
707
+ :type _content_type: str, Optional
708
+ :param _headers: set to override the headers for a single
709
+ request; this effectively ignores the headers
710
+ in the spec for a single request.
711
+ :type _headers: dict, optional
712
+ :param _host_index: set to override the host_index for a single
713
+ request; this effectively ignores the host_index
714
+ in the spec for a single request.
715
+ :type _host_index: int, optional
716
+ :return: Returns the result object.
717
+ """ # noqa: E501
718
+
719
+ _param = self._delete_tag_serialize(
720
+ id=id,
721
+ _request_auth=_request_auth,
722
+ _content_type=_content_type,
723
+ _headers=_headers,
724
+ _host_index=_host_index,
725
+ )
726
+
727
+ _response_types_map: Dict[str, Optional[str]] = {
728
+ "204": None,
729
+ }
730
+ response_data = await self.api_client.call_api(
731
+ *_param, _request_timeout=_request_timeout
732
+ )
733
+ return response_data.response
734
+
735
+ def _delete_tag_serialize(
736
+ self,
737
+ id,
738
+ _request_auth,
739
+ _content_type,
740
+ _headers,
741
+ _host_index,
742
+ ) -> RequestSerialized:
743
+ _host = None
744
+
745
+ _collection_formats: Dict[str, str] = {}
746
+
747
+ _path_params: Dict[str, str] = {}
748
+ _query_params: List[Tuple[str, str]] = []
749
+ _header_params: Dict[str, Optional[str]] = _headers or {}
750
+ _form_params: List[Tuple[str, str]] = []
751
+ _files: Dict[
752
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
753
+ ] = {}
754
+ _body_params: Optional[bytes] = None
755
+
756
+ # process the path parameters
757
+ if id is not None:
758
+ _path_params["id"] = id
759
+ # process the query parameters
760
+ # process the header parameters
761
+ # process the form parameters
762
+ # process the body parameter
763
+
764
+ # authentication setting
765
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
766
+
767
+ return self.api_client.param_serialize(
768
+ method="DELETE",
769
+ resource_path="/tags/{id}",
770
+ path_params=_path_params,
771
+ query_params=_query_params,
772
+ header_params=_header_params,
773
+ body=_body_params,
774
+ post_params=_form_params,
775
+ files=_files,
776
+ auth_settings=_auth_settings,
777
+ collection_formats=_collection_formats,
778
+ _host=_host,
779
+ _request_auth=_request_auth,
780
+ )
781
+
782
+ @validate_call
783
+ async def get_all_tags(
784
+ self,
785
+ _request_timeout: Union[
786
+ None,
787
+ Annotated[StrictFloat, Field(gt=0)],
788
+ Tuple[
789
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
790
+ ],
791
+ ] = None,
792
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
793
+ _content_type: Optional[StrictStr] = None,
794
+ _headers: Optional[Dict[StrictStr, Any]] = None,
795
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
796
+ ) -> List[TagResponseDto]:
797
+ """Retrieve tags
798
+
799
+ Retrieve a list of all tags.
800
+
801
+ :param _request_timeout: timeout setting for this request. If one
802
+ number provided, it will be total request
803
+ timeout. It can also be a pair (tuple) of
804
+ (connection, read) timeouts.
805
+ :type _request_timeout: int, tuple(int, int), optional
806
+ :param _request_auth: set to override the auth_settings for an a single
807
+ request; this effectively ignores the
808
+ authentication in the spec for a single request.
809
+ :type _request_auth: dict, optional
810
+ :param _content_type: force content-type for the request.
811
+ :type _content_type: str, Optional
812
+ :param _headers: set to override the headers for a single
813
+ request; this effectively ignores the headers
814
+ in the spec for a single request.
815
+ :type _headers: dict, optional
816
+ :param _host_index: set to override the host_index for a single
817
+ request; this effectively ignores the host_index
818
+ in the spec for a single request.
819
+ :type _host_index: int, optional
820
+ :return: Returns the result object.
821
+ """ # noqa: E501
822
+
823
+ _param = self._get_all_tags_serialize(
824
+ _request_auth=_request_auth,
825
+ _content_type=_content_type,
826
+ _headers=_headers,
827
+ _host_index=_host_index,
828
+ )
829
+
830
+ _response_types_map: Dict[str, Optional[str]] = {
831
+ "200": "List[TagResponseDto]",
832
+ }
833
+ response_data = await self.api_client.call_api(
834
+ *_param, _request_timeout=_request_timeout
835
+ )
836
+ await response_data.read()
837
+ return self.api_client.response_deserialize(
838
+ response_data=response_data,
839
+ response_types_map=_response_types_map,
840
+ ).data
841
+
842
+ @validate_call
843
+ async def get_all_tags_with_http_info(
844
+ self,
845
+ _request_timeout: Union[
846
+ None,
847
+ Annotated[StrictFloat, Field(gt=0)],
848
+ Tuple[
849
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
850
+ ],
851
+ ] = None,
852
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
853
+ _content_type: Optional[StrictStr] = None,
854
+ _headers: Optional[Dict[StrictStr, Any]] = None,
855
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
856
+ ) -> ApiResponse[List[TagResponseDto]]:
857
+ """Retrieve tags
858
+
859
+ Retrieve a list of all tags.
860
+
861
+ :param _request_timeout: timeout setting for this request. If one
862
+ number provided, it will be total request
863
+ timeout. It can also be a pair (tuple) of
864
+ (connection, read) timeouts.
865
+ :type _request_timeout: int, tuple(int, int), optional
866
+ :param _request_auth: set to override the auth_settings for an a single
867
+ request; this effectively ignores the
868
+ authentication in the spec for a single request.
869
+ :type _request_auth: dict, optional
870
+ :param _content_type: force content-type for the request.
871
+ :type _content_type: str, Optional
872
+ :param _headers: set to override the headers for a single
873
+ request; this effectively ignores the headers
874
+ in the spec for a single request.
875
+ :type _headers: dict, optional
876
+ :param _host_index: set to override the host_index for a single
877
+ request; this effectively ignores the host_index
878
+ in the spec for a single request.
879
+ :type _host_index: int, optional
880
+ :return: Returns the result object.
881
+ """ # noqa: E501
882
+
883
+ _param = self._get_all_tags_serialize(
884
+ _request_auth=_request_auth,
885
+ _content_type=_content_type,
886
+ _headers=_headers,
887
+ _host_index=_host_index,
888
+ )
889
+
890
+ _response_types_map: Dict[str, Optional[str]] = {
891
+ "200": "List[TagResponseDto]",
892
+ }
893
+ response_data = await self.api_client.call_api(
894
+ *_param, _request_timeout=_request_timeout
895
+ )
896
+ await response_data.read()
897
+ return self.api_client.response_deserialize(
898
+ response_data=response_data,
899
+ response_types_map=_response_types_map,
900
+ )
901
+
902
+ @validate_call
903
+ async def get_all_tags_without_preload_content(
904
+ self,
905
+ _request_timeout: Union[
906
+ None,
907
+ Annotated[StrictFloat, Field(gt=0)],
908
+ Tuple[
909
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
910
+ ],
911
+ ] = None,
912
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
913
+ _content_type: Optional[StrictStr] = None,
914
+ _headers: Optional[Dict[StrictStr, Any]] = None,
915
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
916
+ ) -> RESTResponseType:
917
+ """Retrieve tags
918
+
919
+ Retrieve a list of all tags.
920
+
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._get_all_tags_serialize(
944
+ _request_auth=_request_auth,
945
+ _content_type=_content_type,
946
+ _headers=_headers,
947
+ _host_index=_host_index,
948
+ )
949
+
950
+ _response_types_map: Dict[str, Optional[str]] = {
951
+ "200": "List[TagResponseDto]",
952
+ }
953
+ response_data = await self.api_client.call_api(
954
+ *_param, _request_timeout=_request_timeout
955
+ )
956
+ return response_data.response
957
+
958
+ def _get_all_tags_serialize(
959
+ self,
960
+ _request_auth,
961
+ _content_type,
962
+ _headers,
963
+ _host_index,
964
+ ) -> RequestSerialized:
965
+ _host = None
966
+
967
+ _collection_formats: Dict[str, str] = {}
968
+
969
+ _path_params: Dict[str, str] = {}
970
+ _query_params: List[Tuple[str, str]] = []
971
+ _header_params: Dict[str, Optional[str]] = _headers or {}
972
+ _form_params: List[Tuple[str, str]] = []
973
+ _files: Dict[
974
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
975
+ ] = {}
976
+ _body_params: Optional[bytes] = None
977
+
978
+ # process the path parameters
979
+ # process the query parameters
980
+ # process the header parameters
981
+ # process the form parameters
982
+ # process the body parameter
983
+
984
+ # set the HTTP header `Accept`
985
+ if "Accept" not in _header_params:
986
+ _header_params["Accept"] = self.api_client.select_header_accept(
987
+ ["application/json"]
988
+ )
989
+
990
+ # authentication setting
991
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
992
+
993
+ return self.api_client.param_serialize(
994
+ method="GET",
995
+ resource_path="/tags",
996
+ path_params=_path_params,
997
+ query_params=_query_params,
998
+ header_params=_header_params,
999
+ body=_body_params,
1000
+ post_params=_form_params,
1001
+ files=_files,
1002
+ auth_settings=_auth_settings,
1003
+ collection_formats=_collection_formats,
1004
+ _host=_host,
1005
+ _request_auth=_request_auth,
1006
+ )
1007
+
1008
+ @validate_call
1009
+ async def get_tag_by_id(
1010
+ self,
1011
+ id: UUID,
1012
+ _request_timeout: Union[
1013
+ None,
1014
+ Annotated[StrictFloat, Field(gt=0)],
1015
+ Tuple[
1016
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1017
+ ],
1018
+ ] = None,
1019
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1020
+ _content_type: Optional[StrictStr] = None,
1021
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1022
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1023
+ ) -> TagResponseDto:
1024
+ """Retrieve a tag
1025
+
1026
+ Retrieve a specific tag by its ID.
1027
+
1028
+ :param id: (required)
1029
+ :type id: UUID
1030
+ :param _request_timeout: timeout setting for this request. If one
1031
+ number provided, it will be total request
1032
+ timeout. It can also be a pair (tuple) of
1033
+ (connection, read) timeouts.
1034
+ :type _request_timeout: int, tuple(int, int), optional
1035
+ :param _request_auth: set to override the auth_settings for an a single
1036
+ request; this effectively ignores the
1037
+ authentication in the spec for a single request.
1038
+ :type _request_auth: dict, optional
1039
+ :param _content_type: force content-type for the request.
1040
+ :type _content_type: str, Optional
1041
+ :param _headers: set to override the headers for a single
1042
+ request; this effectively ignores the headers
1043
+ in the spec for a single request.
1044
+ :type _headers: dict, optional
1045
+ :param _host_index: set to override the host_index for a single
1046
+ request; this effectively ignores the host_index
1047
+ in the spec for a single request.
1048
+ :type _host_index: int, optional
1049
+ :return: Returns the result object.
1050
+ """ # noqa: E501
1051
+
1052
+ _param = self._get_tag_by_id_serialize(
1053
+ id=id,
1054
+ _request_auth=_request_auth,
1055
+ _content_type=_content_type,
1056
+ _headers=_headers,
1057
+ _host_index=_host_index,
1058
+ )
1059
+
1060
+ _response_types_map: Dict[str, Optional[str]] = {
1061
+ "200": "TagResponseDto",
1062
+ }
1063
+ response_data = await self.api_client.call_api(
1064
+ *_param, _request_timeout=_request_timeout
1065
+ )
1066
+ await response_data.read()
1067
+ return self.api_client.response_deserialize(
1068
+ response_data=response_data,
1069
+ response_types_map=_response_types_map,
1070
+ ).data
1071
+
1072
+ @validate_call
1073
+ async def get_tag_by_id_with_http_info(
1074
+ self,
1075
+ id: UUID,
1076
+ _request_timeout: Union[
1077
+ None,
1078
+ Annotated[StrictFloat, Field(gt=0)],
1079
+ Tuple[
1080
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1081
+ ],
1082
+ ] = None,
1083
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1084
+ _content_type: Optional[StrictStr] = None,
1085
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1086
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1087
+ ) -> ApiResponse[TagResponseDto]:
1088
+ """Retrieve a tag
1089
+
1090
+ Retrieve a specific tag by its ID.
1091
+
1092
+ :param id: (required)
1093
+ :type id: UUID
1094
+ :param _request_timeout: timeout setting for this request. If one
1095
+ number provided, it will be total request
1096
+ timeout. It can also be a pair (tuple) of
1097
+ (connection, read) timeouts.
1098
+ :type _request_timeout: int, tuple(int, int), optional
1099
+ :param _request_auth: set to override the auth_settings for an a single
1100
+ request; this effectively ignores the
1101
+ authentication in the spec for a single request.
1102
+ :type _request_auth: dict, optional
1103
+ :param _content_type: force content-type for the request.
1104
+ :type _content_type: str, Optional
1105
+ :param _headers: set to override the headers for a single
1106
+ request; this effectively ignores the headers
1107
+ in the spec for a single request.
1108
+ :type _headers: dict, optional
1109
+ :param _host_index: set to override the host_index for a single
1110
+ request; this effectively ignores the host_index
1111
+ in the spec for a single request.
1112
+ :type _host_index: int, optional
1113
+ :return: Returns the result object.
1114
+ """ # noqa: E501
1115
+
1116
+ _param = self._get_tag_by_id_serialize(
1117
+ id=id,
1118
+ _request_auth=_request_auth,
1119
+ _content_type=_content_type,
1120
+ _headers=_headers,
1121
+ _host_index=_host_index,
1122
+ )
1123
+
1124
+ _response_types_map: Dict[str, Optional[str]] = {
1125
+ "200": "TagResponseDto",
1126
+ }
1127
+ response_data = await self.api_client.call_api(
1128
+ *_param, _request_timeout=_request_timeout
1129
+ )
1130
+ await response_data.read()
1131
+ return self.api_client.response_deserialize(
1132
+ response_data=response_data,
1133
+ response_types_map=_response_types_map,
1134
+ )
1135
+
1136
+ @validate_call
1137
+ async def get_tag_by_id_without_preload_content(
1138
+ self,
1139
+ id: UUID,
1140
+ _request_timeout: Union[
1141
+ None,
1142
+ Annotated[StrictFloat, Field(gt=0)],
1143
+ Tuple[
1144
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1145
+ ],
1146
+ ] = None,
1147
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1148
+ _content_type: Optional[StrictStr] = None,
1149
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1150
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1151
+ ) -> RESTResponseType:
1152
+ """Retrieve a tag
1153
+
1154
+ Retrieve a specific tag by its ID.
1155
+
1156
+ :param id: (required)
1157
+ :type id: UUID
1158
+ :param _request_timeout: timeout setting for this request. If one
1159
+ number provided, it will be total request
1160
+ timeout. It can also be a pair (tuple) of
1161
+ (connection, read) timeouts.
1162
+ :type _request_timeout: int, tuple(int, int), optional
1163
+ :param _request_auth: set to override the auth_settings for an a single
1164
+ request; this effectively ignores the
1165
+ authentication in the spec for a single request.
1166
+ :type _request_auth: dict, optional
1167
+ :param _content_type: force content-type for the request.
1168
+ :type _content_type: str, Optional
1169
+ :param _headers: set to override the headers for a single
1170
+ request; this effectively ignores the headers
1171
+ in the spec for a single request.
1172
+ :type _headers: dict, optional
1173
+ :param _host_index: set to override the host_index for a single
1174
+ request; this effectively ignores the host_index
1175
+ in the spec for a single request.
1176
+ :type _host_index: int, optional
1177
+ :return: Returns the result object.
1178
+ """ # noqa: E501
1179
+
1180
+ _param = self._get_tag_by_id_serialize(
1181
+ id=id,
1182
+ _request_auth=_request_auth,
1183
+ _content_type=_content_type,
1184
+ _headers=_headers,
1185
+ _host_index=_host_index,
1186
+ )
1187
+
1188
+ _response_types_map: Dict[str, Optional[str]] = {
1189
+ "200": "TagResponseDto",
1190
+ }
1191
+ response_data = await self.api_client.call_api(
1192
+ *_param, _request_timeout=_request_timeout
1193
+ )
1194
+ return response_data.response
1195
+
1196
+ def _get_tag_by_id_serialize(
1197
+ self,
1198
+ id,
1199
+ _request_auth,
1200
+ _content_type,
1201
+ _headers,
1202
+ _host_index,
1203
+ ) -> RequestSerialized:
1204
+ _host = None
1205
+
1206
+ _collection_formats: Dict[str, str] = {}
1207
+
1208
+ _path_params: Dict[str, str] = {}
1209
+ _query_params: List[Tuple[str, str]] = []
1210
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1211
+ _form_params: List[Tuple[str, str]] = []
1212
+ _files: Dict[
1213
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1214
+ ] = {}
1215
+ _body_params: Optional[bytes] = None
1216
+
1217
+ # process the path parameters
1218
+ if id is not None:
1219
+ _path_params["id"] = id
1220
+ # process the query parameters
1221
+ # process the header parameters
1222
+ # process the form parameters
1223
+ # process the body parameter
1224
+
1225
+ # set the HTTP header `Accept`
1226
+ if "Accept" not in _header_params:
1227
+ _header_params["Accept"] = self.api_client.select_header_accept(
1228
+ ["application/json"]
1229
+ )
1230
+
1231
+ # authentication setting
1232
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1233
+
1234
+ return self.api_client.param_serialize(
1235
+ method="GET",
1236
+ resource_path="/tags/{id}",
1237
+ path_params=_path_params,
1238
+ query_params=_query_params,
1239
+ header_params=_header_params,
1240
+ body=_body_params,
1241
+ post_params=_form_params,
1242
+ files=_files,
1243
+ auth_settings=_auth_settings,
1244
+ collection_formats=_collection_formats,
1245
+ _host=_host,
1246
+ _request_auth=_request_auth,
1247
+ )
1248
+
1249
+ @validate_call
1250
+ async def tag_assets(
1251
+ self,
1252
+ id: UUID,
1253
+ bulk_ids_dto: BulkIdsDto,
1254
+ _request_timeout: Union[
1255
+ None,
1256
+ Annotated[StrictFloat, Field(gt=0)],
1257
+ Tuple[
1258
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1259
+ ],
1260
+ ] = None,
1261
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1262
+ _content_type: Optional[StrictStr] = None,
1263
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1264
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1265
+ ) -> List[BulkIdResponseDto]:
1266
+ """Tag assets
1267
+
1268
+ Add a tag to all the specified assets.
1269
+
1270
+ :param id: (required)
1271
+ :type id: UUID
1272
+ :param bulk_ids_dto: (required)
1273
+ :type bulk_ids_dto: BulkIdsDto
1274
+ :param _request_timeout: timeout setting for this request. If one
1275
+ number provided, it will be total request
1276
+ timeout. It can also be a pair (tuple) of
1277
+ (connection, read) timeouts.
1278
+ :type _request_timeout: int, tuple(int, int), optional
1279
+ :param _request_auth: set to override the auth_settings for an a single
1280
+ request; this effectively ignores the
1281
+ authentication in the spec for a single request.
1282
+ :type _request_auth: dict, optional
1283
+ :param _content_type: force content-type for the request.
1284
+ :type _content_type: str, Optional
1285
+ :param _headers: set to override the headers for a single
1286
+ request; this effectively ignores the headers
1287
+ in the spec for a single request.
1288
+ :type _headers: dict, optional
1289
+ :param _host_index: set to override the host_index for a single
1290
+ request; this effectively ignores the host_index
1291
+ in the spec for a single request.
1292
+ :type _host_index: int, optional
1293
+ :return: Returns the result object.
1294
+ """ # noqa: E501
1295
+
1296
+ _param = self._tag_assets_serialize(
1297
+ id=id,
1298
+ bulk_ids_dto=bulk_ids_dto,
1299
+ _request_auth=_request_auth,
1300
+ _content_type=_content_type,
1301
+ _headers=_headers,
1302
+ _host_index=_host_index,
1303
+ )
1304
+
1305
+ _response_types_map: Dict[str, Optional[str]] = {
1306
+ "200": "List[BulkIdResponseDto]",
1307
+ }
1308
+ response_data = await self.api_client.call_api(
1309
+ *_param, _request_timeout=_request_timeout
1310
+ )
1311
+ await response_data.read()
1312
+ return self.api_client.response_deserialize(
1313
+ response_data=response_data,
1314
+ response_types_map=_response_types_map,
1315
+ ).data
1316
+
1317
+ @validate_call
1318
+ async def tag_assets_with_http_info(
1319
+ self,
1320
+ id: UUID,
1321
+ bulk_ids_dto: BulkIdsDto,
1322
+ _request_timeout: Union[
1323
+ None,
1324
+ Annotated[StrictFloat, Field(gt=0)],
1325
+ Tuple[
1326
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1327
+ ],
1328
+ ] = None,
1329
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1330
+ _content_type: Optional[StrictStr] = None,
1331
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1332
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1333
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
1334
+ """Tag assets
1335
+
1336
+ Add a tag to all the specified assets.
1337
+
1338
+ :param id: (required)
1339
+ :type id: UUID
1340
+ :param bulk_ids_dto: (required)
1341
+ :type bulk_ids_dto: BulkIdsDto
1342
+ :param _request_timeout: timeout setting for this request. If one
1343
+ number provided, it will be total request
1344
+ timeout. It can also be a pair (tuple) of
1345
+ (connection, read) timeouts.
1346
+ :type _request_timeout: int, tuple(int, int), optional
1347
+ :param _request_auth: set to override the auth_settings for an a single
1348
+ request; this effectively ignores the
1349
+ authentication in the spec for a single request.
1350
+ :type _request_auth: dict, optional
1351
+ :param _content_type: force content-type for the request.
1352
+ :type _content_type: str, Optional
1353
+ :param _headers: set to override the headers for a single
1354
+ request; this effectively ignores the headers
1355
+ in the spec for a single request.
1356
+ :type _headers: dict, optional
1357
+ :param _host_index: set to override the host_index for a single
1358
+ request; this effectively ignores the host_index
1359
+ in the spec for a single request.
1360
+ :type _host_index: int, optional
1361
+ :return: Returns the result object.
1362
+ """ # noqa: E501
1363
+
1364
+ _param = self._tag_assets_serialize(
1365
+ id=id,
1366
+ bulk_ids_dto=bulk_ids_dto,
1367
+ _request_auth=_request_auth,
1368
+ _content_type=_content_type,
1369
+ _headers=_headers,
1370
+ _host_index=_host_index,
1371
+ )
1372
+
1373
+ _response_types_map: Dict[str, Optional[str]] = {
1374
+ "200": "List[BulkIdResponseDto]",
1375
+ }
1376
+ response_data = await self.api_client.call_api(
1377
+ *_param, _request_timeout=_request_timeout
1378
+ )
1379
+ await response_data.read()
1380
+ return self.api_client.response_deserialize(
1381
+ response_data=response_data,
1382
+ response_types_map=_response_types_map,
1383
+ )
1384
+
1385
+ @validate_call
1386
+ async def tag_assets_without_preload_content(
1387
+ self,
1388
+ id: UUID,
1389
+ bulk_ids_dto: BulkIdsDto,
1390
+ _request_timeout: Union[
1391
+ None,
1392
+ Annotated[StrictFloat, Field(gt=0)],
1393
+ Tuple[
1394
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1395
+ ],
1396
+ ] = None,
1397
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1398
+ _content_type: Optional[StrictStr] = None,
1399
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1400
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1401
+ ) -> RESTResponseType:
1402
+ """Tag assets
1403
+
1404
+ Add a tag to all the specified assets.
1405
+
1406
+ :param id: (required)
1407
+ :type id: UUID
1408
+ :param bulk_ids_dto: (required)
1409
+ :type bulk_ids_dto: BulkIdsDto
1410
+ :param _request_timeout: timeout setting for this request. If one
1411
+ number provided, it will be total request
1412
+ timeout. It can also be a pair (tuple) of
1413
+ (connection, read) timeouts.
1414
+ :type _request_timeout: int, tuple(int, int), optional
1415
+ :param _request_auth: set to override the auth_settings for an a single
1416
+ request; this effectively ignores the
1417
+ authentication in the spec for a single request.
1418
+ :type _request_auth: dict, optional
1419
+ :param _content_type: force content-type for the request.
1420
+ :type _content_type: str, Optional
1421
+ :param _headers: set to override the headers for a single
1422
+ request; this effectively ignores the headers
1423
+ in the spec for a single request.
1424
+ :type _headers: dict, optional
1425
+ :param _host_index: set to override the host_index for a single
1426
+ request; this effectively ignores the host_index
1427
+ in the spec for a single request.
1428
+ :type _host_index: int, optional
1429
+ :return: Returns the result object.
1430
+ """ # noqa: E501
1431
+
1432
+ _param = self._tag_assets_serialize(
1433
+ id=id,
1434
+ bulk_ids_dto=bulk_ids_dto,
1435
+ _request_auth=_request_auth,
1436
+ _content_type=_content_type,
1437
+ _headers=_headers,
1438
+ _host_index=_host_index,
1439
+ )
1440
+
1441
+ _response_types_map: Dict[str, Optional[str]] = {
1442
+ "200": "List[BulkIdResponseDto]",
1443
+ }
1444
+ response_data = await self.api_client.call_api(
1445
+ *_param, _request_timeout=_request_timeout
1446
+ )
1447
+ return response_data.response
1448
+
1449
+ def _tag_assets_serialize(
1450
+ self,
1451
+ id,
1452
+ bulk_ids_dto,
1453
+ _request_auth,
1454
+ _content_type,
1455
+ _headers,
1456
+ _host_index,
1457
+ ) -> RequestSerialized:
1458
+ _host = None
1459
+
1460
+ _collection_formats: Dict[str, str] = {}
1461
+
1462
+ _path_params: Dict[str, str] = {}
1463
+ _query_params: List[Tuple[str, str]] = []
1464
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1465
+ _form_params: List[Tuple[str, str]] = []
1466
+ _files: Dict[
1467
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1468
+ ] = {}
1469
+ _body_params: Optional[bytes] = None
1470
+
1471
+ # process the path parameters
1472
+ if id is not None:
1473
+ _path_params["id"] = id
1474
+ # process the query parameters
1475
+ # process the header parameters
1476
+ # process the form parameters
1477
+ # process the body parameter
1478
+ if bulk_ids_dto is not None:
1479
+ _body_params = bulk_ids_dto
1480
+
1481
+ # set the HTTP header `Accept`
1482
+ if "Accept" not in _header_params:
1483
+ _header_params["Accept"] = self.api_client.select_header_accept(
1484
+ ["application/json"]
1485
+ )
1486
+
1487
+ # set the HTTP header `Content-Type`
1488
+ if _content_type:
1489
+ _header_params["Content-Type"] = _content_type
1490
+ else:
1491
+ _default_content_type = self.api_client.select_header_content_type(
1492
+ ["application/json"]
1493
+ )
1494
+ if _default_content_type is not None:
1495
+ _header_params["Content-Type"] = _default_content_type
1496
+
1497
+ # authentication setting
1498
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1499
+
1500
+ return self.api_client.param_serialize(
1501
+ method="PUT",
1502
+ resource_path="/tags/{id}/assets",
1503
+ path_params=_path_params,
1504
+ query_params=_query_params,
1505
+ header_params=_header_params,
1506
+ body=_body_params,
1507
+ post_params=_form_params,
1508
+ files=_files,
1509
+ auth_settings=_auth_settings,
1510
+ collection_formats=_collection_formats,
1511
+ _host=_host,
1512
+ _request_auth=_request_auth,
1513
+ )
1514
+
1515
+ @validate_call
1516
+ async def untag_assets(
1517
+ self,
1518
+ id: UUID,
1519
+ bulk_ids_dto: BulkIdsDto,
1520
+ _request_timeout: Union[
1521
+ None,
1522
+ Annotated[StrictFloat, Field(gt=0)],
1523
+ Tuple[
1524
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1525
+ ],
1526
+ ] = None,
1527
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1528
+ _content_type: Optional[StrictStr] = None,
1529
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1530
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1531
+ ) -> List[BulkIdResponseDto]:
1532
+ """Untag assets
1533
+
1534
+ Remove a tag from all the specified assets.
1535
+
1536
+ :param id: (required)
1537
+ :type id: UUID
1538
+ :param bulk_ids_dto: (required)
1539
+ :type bulk_ids_dto: BulkIdsDto
1540
+ :param _request_timeout: timeout setting for this request. If one
1541
+ number provided, it will be total request
1542
+ timeout. It can also be a pair (tuple) of
1543
+ (connection, read) timeouts.
1544
+ :type _request_timeout: int, tuple(int, int), optional
1545
+ :param _request_auth: set to override the auth_settings for an a single
1546
+ request; this effectively ignores the
1547
+ authentication in the spec for a single request.
1548
+ :type _request_auth: dict, optional
1549
+ :param _content_type: force content-type for the request.
1550
+ :type _content_type: str, Optional
1551
+ :param _headers: set to override the headers for a single
1552
+ request; this effectively ignores the headers
1553
+ in the spec for a single request.
1554
+ :type _headers: dict, optional
1555
+ :param _host_index: set to override the host_index for a single
1556
+ request; this effectively ignores the host_index
1557
+ in the spec for a single request.
1558
+ :type _host_index: int, optional
1559
+ :return: Returns the result object.
1560
+ """ # noqa: E501
1561
+
1562
+ _param = self._untag_assets_serialize(
1563
+ id=id,
1564
+ bulk_ids_dto=bulk_ids_dto,
1565
+ _request_auth=_request_auth,
1566
+ _content_type=_content_type,
1567
+ _headers=_headers,
1568
+ _host_index=_host_index,
1569
+ )
1570
+
1571
+ _response_types_map: Dict[str, Optional[str]] = {
1572
+ "200": "List[BulkIdResponseDto]",
1573
+ }
1574
+ response_data = await self.api_client.call_api(
1575
+ *_param, _request_timeout=_request_timeout
1576
+ )
1577
+ await response_data.read()
1578
+ return self.api_client.response_deserialize(
1579
+ response_data=response_data,
1580
+ response_types_map=_response_types_map,
1581
+ ).data
1582
+
1583
+ @validate_call
1584
+ async def untag_assets_with_http_info(
1585
+ self,
1586
+ id: UUID,
1587
+ bulk_ids_dto: BulkIdsDto,
1588
+ _request_timeout: Union[
1589
+ None,
1590
+ Annotated[StrictFloat, Field(gt=0)],
1591
+ Tuple[
1592
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1593
+ ],
1594
+ ] = None,
1595
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1596
+ _content_type: Optional[StrictStr] = None,
1597
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1598
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1599
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
1600
+ """Untag assets
1601
+
1602
+ Remove a tag from all the specified assets.
1603
+
1604
+ :param id: (required)
1605
+ :type id: UUID
1606
+ :param bulk_ids_dto: (required)
1607
+ :type bulk_ids_dto: BulkIdsDto
1608
+ :param _request_timeout: timeout setting for this request. If one
1609
+ number provided, it will be total request
1610
+ timeout. It can also be a pair (tuple) of
1611
+ (connection, read) timeouts.
1612
+ :type _request_timeout: int, tuple(int, int), optional
1613
+ :param _request_auth: set to override the auth_settings for an a single
1614
+ request; this effectively ignores the
1615
+ authentication in the spec for a single request.
1616
+ :type _request_auth: dict, optional
1617
+ :param _content_type: force content-type for the request.
1618
+ :type _content_type: str, Optional
1619
+ :param _headers: set to override the headers for a single
1620
+ request; this effectively ignores the headers
1621
+ in the spec for a single request.
1622
+ :type _headers: dict, optional
1623
+ :param _host_index: set to override the host_index for a single
1624
+ request; this effectively ignores the host_index
1625
+ in the spec for a single request.
1626
+ :type _host_index: int, optional
1627
+ :return: Returns the result object.
1628
+ """ # noqa: E501
1629
+
1630
+ _param = self._untag_assets_serialize(
1631
+ id=id,
1632
+ bulk_ids_dto=bulk_ids_dto,
1633
+ _request_auth=_request_auth,
1634
+ _content_type=_content_type,
1635
+ _headers=_headers,
1636
+ _host_index=_host_index,
1637
+ )
1638
+
1639
+ _response_types_map: Dict[str, Optional[str]] = {
1640
+ "200": "List[BulkIdResponseDto]",
1641
+ }
1642
+ response_data = await self.api_client.call_api(
1643
+ *_param, _request_timeout=_request_timeout
1644
+ )
1645
+ await response_data.read()
1646
+ return self.api_client.response_deserialize(
1647
+ response_data=response_data,
1648
+ response_types_map=_response_types_map,
1649
+ )
1650
+
1651
+ @validate_call
1652
+ async def untag_assets_without_preload_content(
1653
+ self,
1654
+ id: UUID,
1655
+ bulk_ids_dto: BulkIdsDto,
1656
+ _request_timeout: Union[
1657
+ None,
1658
+ Annotated[StrictFloat, Field(gt=0)],
1659
+ Tuple[
1660
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1661
+ ],
1662
+ ] = None,
1663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1664
+ _content_type: Optional[StrictStr] = None,
1665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1667
+ ) -> RESTResponseType:
1668
+ """Untag assets
1669
+
1670
+ Remove a tag from all the specified assets.
1671
+
1672
+ :param id: (required)
1673
+ :type id: UUID
1674
+ :param bulk_ids_dto: (required)
1675
+ :type bulk_ids_dto: BulkIdsDto
1676
+ :param _request_timeout: timeout setting for this request. If one
1677
+ number provided, it will be total request
1678
+ timeout. It can also be a pair (tuple) of
1679
+ (connection, read) timeouts.
1680
+ :type _request_timeout: int, tuple(int, int), optional
1681
+ :param _request_auth: set to override the auth_settings for an a single
1682
+ request; this effectively ignores the
1683
+ authentication in the spec for a single request.
1684
+ :type _request_auth: dict, optional
1685
+ :param _content_type: force content-type for the request.
1686
+ :type _content_type: str, Optional
1687
+ :param _headers: set to override the headers for a single
1688
+ request; this effectively ignores the headers
1689
+ in the spec for a single request.
1690
+ :type _headers: dict, optional
1691
+ :param _host_index: set to override the host_index for a single
1692
+ request; this effectively ignores the host_index
1693
+ in the spec for a single request.
1694
+ :type _host_index: int, optional
1695
+ :return: Returns the result object.
1696
+ """ # noqa: E501
1697
+
1698
+ _param = self._untag_assets_serialize(
1699
+ id=id,
1700
+ bulk_ids_dto=bulk_ids_dto,
1701
+ _request_auth=_request_auth,
1702
+ _content_type=_content_type,
1703
+ _headers=_headers,
1704
+ _host_index=_host_index,
1705
+ )
1706
+
1707
+ _response_types_map: Dict[str, Optional[str]] = {
1708
+ "200": "List[BulkIdResponseDto]",
1709
+ }
1710
+ response_data = await self.api_client.call_api(
1711
+ *_param, _request_timeout=_request_timeout
1712
+ )
1713
+ return response_data.response
1714
+
1715
+ def _untag_assets_serialize(
1716
+ self,
1717
+ id,
1718
+ bulk_ids_dto,
1719
+ _request_auth,
1720
+ _content_type,
1721
+ _headers,
1722
+ _host_index,
1723
+ ) -> RequestSerialized:
1724
+ _host = None
1725
+
1726
+ _collection_formats: Dict[str, str] = {}
1727
+
1728
+ _path_params: Dict[str, str] = {}
1729
+ _query_params: List[Tuple[str, str]] = []
1730
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1731
+ _form_params: List[Tuple[str, str]] = []
1732
+ _files: Dict[
1733
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1734
+ ] = {}
1735
+ _body_params: Optional[bytes] = None
1736
+
1737
+ # process the path parameters
1738
+ if id is not None:
1739
+ _path_params["id"] = id
1740
+ # process the query parameters
1741
+ # process the header parameters
1742
+ # process the form parameters
1743
+ # process the body parameter
1744
+ if bulk_ids_dto is not None:
1745
+ _body_params = bulk_ids_dto
1746
+
1747
+ # set the HTTP header `Accept`
1748
+ if "Accept" not in _header_params:
1749
+ _header_params["Accept"] = self.api_client.select_header_accept(
1750
+ ["application/json"]
1751
+ )
1752
+
1753
+ # set the HTTP header `Content-Type`
1754
+ if _content_type:
1755
+ _header_params["Content-Type"] = _content_type
1756
+ else:
1757
+ _default_content_type = self.api_client.select_header_content_type(
1758
+ ["application/json"]
1759
+ )
1760
+ if _default_content_type is not None:
1761
+ _header_params["Content-Type"] = _default_content_type
1762
+
1763
+ # authentication setting
1764
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1765
+
1766
+ return self.api_client.param_serialize(
1767
+ method="DELETE",
1768
+ resource_path="/tags/{id}/assets",
1769
+ path_params=_path_params,
1770
+ query_params=_query_params,
1771
+ header_params=_header_params,
1772
+ body=_body_params,
1773
+ post_params=_form_params,
1774
+ files=_files,
1775
+ auth_settings=_auth_settings,
1776
+ collection_formats=_collection_formats,
1777
+ _host=_host,
1778
+ _request_auth=_request_auth,
1779
+ )
1780
+
1781
+ @validate_call
1782
+ async def update_tag(
1783
+ self,
1784
+ id: UUID,
1785
+ tag_update_dto: TagUpdateDto,
1786
+ _request_timeout: Union[
1787
+ None,
1788
+ Annotated[StrictFloat, Field(gt=0)],
1789
+ Tuple[
1790
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1791
+ ],
1792
+ ] = None,
1793
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1794
+ _content_type: Optional[StrictStr] = None,
1795
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1796
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1797
+ ) -> TagResponseDto:
1798
+ """Update a tag
1799
+
1800
+ Update an existing tag identified by its ID.
1801
+
1802
+ :param id: (required)
1803
+ :type id: UUID
1804
+ :param tag_update_dto: (required)
1805
+ :type tag_update_dto: TagUpdateDto
1806
+ :param _request_timeout: timeout setting for this request. If one
1807
+ number provided, it will be total request
1808
+ timeout. It can also be a pair (tuple) of
1809
+ (connection, read) timeouts.
1810
+ :type _request_timeout: int, tuple(int, int), optional
1811
+ :param _request_auth: set to override the auth_settings for an a single
1812
+ request; this effectively ignores the
1813
+ authentication in the spec for a single request.
1814
+ :type _request_auth: dict, optional
1815
+ :param _content_type: force content-type for the request.
1816
+ :type _content_type: str, Optional
1817
+ :param _headers: set to override the headers for a single
1818
+ request; this effectively ignores the headers
1819
+ in the spec for a single request.
1820
+ :type _headers: dict, optional
1821
+ :param _host_index: set to override the host_index for a single
1822
+ request; this effectively ignores the host_index
1823
+ in the spec for a single request.
1824
+ :type _host_index: int, optional
1825
+ :return: Returns the result object.
1826
+ """ # noqa: E501
1827
+
1828
+ _param = self._update_tag_serialize(
1829
+ id=id,
1830
+ tag_update_dto=tag_update_dto,
1831
+ _request_auth=_request_auth,
1832
+ _content_type=_content_type,
1833
+ _headers=_headers,
1834
+ _host_index=_host_index,
1835
+ )
1836
+
1837
+ _response_types_map: Dict[str, Optional[str]] = {
1838
+ "200": "TagResponseDto",
1839
+ }
1840
+ response_data = await self.api_client.call_api(
1841
+ *_param, _request_timeout=_request_timeout
1842
+ )
1843
+ await response_data.read()
1844
+ return self.api_client.response_deserialize(
1845
+ response_data=response_data,
1846
+ response_types_map=_response_types_map,
1847
+ ).data
1848
+
1849
+ @validate_call
1850
+ async def update_tag_with_http_info(
1851
+ self,
1852
+ id: UUID,
1853
+ tag_update_dto: TagUpdateDto,
1854
+ _request_timeout: Union[
1855
+ None,
1856
+ Annotated[StrictFloat, Field(gt=0)],
1857
+ Tuple[
1858
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1859
+ ],
1860
+ ] = None,
1861
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1862
+ _content_type: Optional[StrictStr] = None,
1863
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1864
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1865
+ ) -> ApiResponse[TagResponseDto]:
1866
+ """Update a tag
1867
+
1868
+ Update an existing tag identified by its ID.
1869
+
1870
+ :param id: (required)
1871
+ :type id: UUID
1872
+ :param tag_update_dto: (required)
1873
+ :type tag_update_dto: TagUpdateDto
1874
+ :param _request_timeout: timeout setting for this request. If one
1875
+ number provided, it will be total request
1876
+ timeout. It can also be a pair (tuple) of
1877
+ (connection, read) timeouts.
1878
+ :type _request_timeout: int, tuple(int, int), optional
1879
+ :param _request_auth: set to override the auth_settings for an a single
1880
+ request; this effectively ignores the
1881
+ authentication in the spec for a single request.
1882
+ :type _request_auth: dict, optional
1883
+ :param _content_type: force content-type for the request.
1884
+ :type _content_type: str, Optional
1885
+ :param _headers: set to override the headers for a single
1886
+ request; this effectively ignores the headers
1887
+ in the spec for a single request.
1888
+ :type _headers: dict, optional
1889
+ :param _host_index: set to override the host_index for a single
1890
+ request; this effectively ignores the host_index
1891
+ in the spec for a single request.
1892
+ :type _host_index: int, optional
1893
+ :return: Returns the result object.
1894
+ """ # noqa: E501
1895
+
1896
+ _param = self._update_tag_serialize(
1897
+ id=id,
1898
+ tag_update_dto=tag_update_dto,
1899
+ _request_auth=_request_auth,
1900
+ _content_type=_content_type,
1901
+ _headers=_headers,
1902
+ _host_index=_host_index,
1903
+ )
1904
+
1905
+ _response_types_map: Dict[str, Optional[str]] = {
1906
+ "200": "TagResponseDto",
1907
+ }
1908
+ response_data = await self.api_client.call_api(
1909
+ *_param, _request_timeout=_request_timeout
1910
+ )
1911
+ await response_data.read()
1912
+ return self.api_client.response_deserialize(
1913
+ response_data=response_data,
1914
+ response_types_map=_response_types_map,
1915
+ )
1916
+
1917
+ @validate_call
1918
+ async def update_tag_without_preload_content(
1919
+ self,
1920
+ id: UUID,
1921
+ tag_update_dto: TagUpdateDto,
1922
+ _request_timeout: Union[
1923
+ None,
1924
+ Annotated[StrictFloat, Field(gt=0)],
1925
+ Tuple[
1926
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1927
+ ],
1928
+ ] = None,
1929
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1930
+ _content_type: Optional[StrictStr] = None,
1931
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1932
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1933
+ ) -> RESTResponseType:
1934
+ """Update a tag
1935
+
1936
+ Update an existing tag identified by its ID.
1937
+
1938
+ :param id: (required)
1939
+ :type id: UUID
1940
+ :param tag_update_dto: (required)
1941
+ :type tag_update_dto: TagUpdateDto
1942
+ :param _request_timeout: timeout setting for this request. If one
1943
+ number provided, it will be total request
1944
+ timeout. It can also be a pair (tuple) of
1945
+ (connection, read) timeouts.
1946
+ :type _request_timeout: int, tuple(int, int), optional
1947
+ :param _request_auth: set to override the auth_settings for an a single
1948
+ request; this effectively ignores the
1949
+ authentication in the spec for a single request.
1950
+ :type _request_auth: dict, optional
1951
+ :param _content_type: force content-type for the request.
1952
+ :type _content_type: str, Optional
1953
+ :param _headers: set to override the headers for a single
1954
+ request; this effectively ignores the headers
1955
+ in the spec for a single request.
1956
+ :type _headers: dict, optional
1957
+ :param _host_index: set to override the host_index for a single
1958
+ request; this effectively ignores the host_index
1959
+ in the spec for a single request.
1960
+ :type _host_index: int, optional
1961
+ :return: Returns the result object.
1962
+ """ # noqa: E501
1963
+
1964
+ _param = self._update_tag_serialize(
1965
+ id=id,
1966
+ tag_update_dto=tag_update_dto,
1967
+ _request_auth=_request_auth,
1968
+ _content_type=_content_type,
1969
+ _headers=_headers,
1970
+ _host_index=_host_index,
1971
+ )
1972
+
1973
+ _response_types_map: Dict[str, Optional[str]] = {
1974
+ "200": "TagResponseDto",
1975
+ }
1976
+ response_data = await self.api_client.call_api(
1977
+ *_param, _request_timeout=_request_timeout
1978
+ )
1979
+ return response_data.response
1980
+
1981
+ def _update_tag_serialize(
1982
+ self,
1983
+ id,
1984
+ tag_update_dto,
1985
+ _request_auth,
1986
+ _content_type,
1987
+ _headers,
1988
+ _host_index,
1989
+ ) -> RequestSerialized:
1990
+ _host = None
1991
+
1992
+ _collection_formats: Dict[str, str] = {}
1993
+
1994
+ _path_params: Dict[str, str] = {}
1995
+ _query_params: List[Tuple[str, str]] = []
1996
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1997
+ _form_params: List[Tuple[str, str]] = []
1998
+ _files: Dict[
1999
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2000
+ ] = {}
2001
+ _body_params: Optional[bytes] = None
2002
+
2003
+ # process the path parameters
2004
+ if id is not None:
2005
+ _path_params["id"] = id
2006
+ # process the query parameters
2007
+ # process the header parameters
2008
+ # process the form parameters
2009
+ # process the body parameter
2010
+ if tag_update_dto is not None:
2011
+ _body_params = tag_update_dto
2012
+
2013
+ # set the HTTP header `Accept`
2014
+ if "Accept" not in _header_params:
2015
+ _header_params["Accept"] = self.api_client.select_header_accept(
2016
+ ["application/json"]
2017
+ )
2018
+
2019
+ # set the HTTP header `Content-Type`
2020
+ if _content_type:
2021
+ _header_params["Content-Type"] = _content_type
2022
+ else:
2023
+ _default_content_type = self.api_client.select_header_content_type(
2024
+ ["application/json"]
2025
+ )
2026
+ if _default_content_type is not None:
2027
+ _header_params["Content-Type"] = _default_content_type
2028
+
2029
+ # authentication setting
2030
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2031
+
2032
+ return self.api_client.param_serialize(
2033
+ method="PUT",
2034
+ resource_path="/tags/{id}",
2035
+ path_params=_path_params,
2036
+ query_params=_query_params,
2037
+ header_params=_header_params,
2038
+ body=_body_params,
2039
+ post_params=_form_params,
2040
+ files=_files,
2041
+ auth_settings=_auth_settings,
2042
+ collection_formats=_collection_formats,
2043
+ _host=_host,
2044
+ _request_auth=_request_auth,
2045
+ )
2046
+
2047
+ @validate_call
2048
+ async def upsert_tags(
2049
+ self,
2050
+ tag_upsert_dto: TagUpsertDto,
2051
+ _request_timeout: Union[
2052
+ None,
2053
+ Annotated[StrictFloat, Field(gt=0)],
2054
+ Tuple[
2055
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2056
+ ],
2057
+ ] = None,
2058
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2059
+ _content_type: Optional[StrictStr] = None,
2060
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2061
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2062
+ ) -> List[TagResponseDto]:
2063
+ """Upsert tags
2064
+
2065
+ Create or update multiple tags in a single request.
2066
+
2067
+ :param tag_upsert_dto: (required)
2068
+ :type tag_upsert_dto: TagUpsertDto
2069
+ :param _request_timeout: timeout setting for this request. If one
2070
+ number provided, it will be total request
2071
+ timeout. It can also be a pair (tuple) of
2072
+ (connection, read) timeouts.
2073
+ :type _request_timeout: int, tuple(int, int), optional
2074
+ :param _request_auth: set to override the auth_settings for an a single
2075
+ request; this effectively ignores the
2076
+ authentication in the spec for a single request.
2077
+ :type _request_auth: dict, optional
2078
+ :param _content_type: force content-type for the request.
2079
+ :type _content_type: str, Optional
2080
+ :param _headers: set to override the headers for a single
2081
+ request; this effectively ignores the headers
2082
+ in the spec for a single request.
2083
+ :type _headers: dict, optional
2084
+ :param _host_index: set to override the host_index for a single
2085
+ request; this effectively ignores the host_index
2086
+ in the spec for a single request.
2087
+ :type _host_index: int, optional
2088
+ :return: Returns the result object.
2089
+ """ # noqa: E501
2090
+
2091
+ _param = self._upsert_tags_serialize(
2092
+ tag_upsert_dto=tag_upsert_dto,
2093
+ _request_auth=_request_auth,
2094
+ _content_type=_content_type,
2095
+ _headers=_headers,
2096
+ _host_index=_host_index,
2097
+ )
2098
+
2099
+ _response_types_map: Dict[str, Optional[str]] = {
2100
+ "200": "List[TagResponseDto]",
2101
+ }
2102
+ response_data = await self.api_client.call_api(
2103
+ *_param, _request_timeout=_request_timeout
2104
+ )
2105
+ await response_data.read()
2106
+ return self.api_client.response_deserialize(
2107
+ response_data=response_data,
2108
+ response_types_map=_response_types_map,
2109
+ ).data
2110
+
2111
+ @validate_call
2112
+ async def upsert_tags_with_http_info(
2113
+ self,
2114
+ tag_upsert_dto: TagUpsertDto,
2115
+ _request_timeout: Union[
2116
+ None,
2117
+ Annotated[StrictFloat, Field(gt=0)],
2118
+ Tuple[
2119
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2120
+ ],
2121
+ ] = None,
2122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2123
+ _content_type: Optional[StrictStr] = None,
2124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2126
+ ) -> ApiResponse[List[TagResponseDto]]:
2127
+ """Upsert tags
2128
+
2129
+ Create or update multiple tags in a single request.
2130
+
2131
+ :param tag_upsert_dto: (required)
2132
+ :type tag_upsert_dto: TagUpsertDto
2133
+ :param _request_timeout: timeout setting for this request. If one
2134
+ number provided, it will be total request
2135
+ timeout. It can also be a pair (tuple) of
2136
+ (connection, read) timeouts.
2137
+ :type _request_timeout: int, tuple(int, int), optional
2138
+ :param _request_auth: set to override the auth_settings for an a single
2139
+ request; this effectively ignores the
2140
+ authentication in the spec for a single request.
2141
+ :type _request_auth: dict, optional
2142
+ :param _content_type: force content-type for the request.
2143
+ :type _content_type: str, Optional
2144
+ :param _headers: set to override the headers for a single
2145
+ request; this effectively ignores the headers
2146
+ in the spec for a single request.
2147
+ :type _headers: dict, optional
2148
+ :param _host_index: set to override the host_index for a single
2149
+ request; this effectively ignores the host_index
2150
+ in the spec for a single request.
2151
+ :type _host_index: int, optional
2152
+ :return: Returns the result object.
2153
+ """ # noqa: E501
2154
+
2155
+ _param = self._upsert_tags_serialize(
2156
+ tag_upsert_dto=tag_upsert_dto,
2157
+ _request_auth=_request_auth,
2158
+ _content_type=_content_type,
2159
+ _headers=_headers,
2160
+ _host_index=_host_index,
2161
+ )
2162
+
2163
+ _response_types_map: Dict[str, Optional[str]] = {
2164
+ "200": "List[TagResponseDto]",
2165
+ }
2166
+ response_data = await self.api_client.call_api(
2167
+ *_param, _request_timeout=_request_timeout
2168
+ )
2169
+ await response_data.read()
2170
+ return self.api_client.response_deserialize(
2171
+ response_data=response_data,
2172
+ response_types_map=_response_types_map,
2173
+ )
2174
+
2175
+ @validate_call
2176
+ async def upsert_tags_without_preload_content(
2177
+ self,
2178
+ tag_upsert_dto: TagUpsertDto,
2179
+ _request_timeout: Union[
2180
+ None,
2181
+ Annotated[StrictFloat, Field(gt=0)],
2182
+ Tuple[
2183
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2184
+ ],
2185
+ ] = None,
2186
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2187
+ _content_type: Optional[StrictStr] = None,
2188
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2189
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2190
+ ) -> RESTResponseType:
2191
+ """Upsert tags
2192
+
2193
+ Create or update multiple tags in a single request.
2194
+
2195
+ :param tag_upsert_dto: (required)
2196
+ :type tag_upsert_dto: TagUpsertDto
2197
+ :param _request_timeout: timeout setting for this request. If one
2198
+ number provided, it will be total request
2199
+ timeout. It can also be a pair (tuple) of
2200
+ (connection, read) timeouts.
2201
+ :type _request_timeout: int, tuple(int, int), optional
2202
+ :param _request_auth: set to override the auth_settings for an a single
2203
+ request; this effectively ignores the
2204
+ authentication in the spec for a single request.
2205
+ :type _request_auth: dict, optional
2206
+ :param _content_type: force content-type for the request.
2207
+ :type _content_type: str, Optional
2208
+ :param _headers: set to override the headers for a single
2209
+ request; this effectively ignores the headers
2210
+ in the spec for a single request.
2211
+ :type _headers: dict, optional
2212
+ :param _host_index: set to override the host_index for a single
2213
+ request; this effectively ignores the host_index
2214
+ in the spec for a single request.
2215
+ :type _host_index: int, optional
2216
+ :return: Returns the result object.
2217
+ """ # noqa: E501
2218
+
2219
+ _param = self._upsert_tags_serialize(
2220
+ tag_upsert_dto=tag_upsert_dto,
2221
+ _request_auth=_request_auth,
2222
+ _content_type=_content_type,
2223
+ _headers=_headers,
2224
+ _host_index=_host_index,
2225
+ )
2226
+
2227
+ _response_types_map: Dict[str, Optional[str]] = {
2228
+ "200": "List[TagResponseDto]",
2229
+ }
2230
+ response_data = await self.api_client.call_api(
2231
+ *_param, _request_timeout=_request_timeout
2232
+ )
2233
+ return response_data.response
2234
+
2235
+ def _upsert_tags_serialize(
2236
+ self,
2237
+ tag_upsert_dto,
2238
+ _request_auth,
2239
+ _content_type,
2240
+ _headers,
2241
+ _host_index,
2242
+ ) -> RequestSerialized:
2243
+ _host = None
2244
+
2245
+ _collection_formats: Dict[str, str] = {}
2246
+
2247
+ _path_params: Dict[str, str] = {}
2248
+ _query_params: List[Tuple[str, str]] = []
2249
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2250
+ _form_params: List[Tuple[str, str]] = []
2251
+ _files: Dict[
2252
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2253
+ ] = {}
2254
+ _body_params: Optional[bytes] = None
2255
+
2256
+ # process the path parameters
2257
+ # process the query parameters
2258
+ # process the header parameters
2259
+ # process the form parameters
2260
+ # process the body parameter
2261
+ if tag_upsert_dto is not None:
2262
+ _body_params = tag_upsert_dto
2263
+
2264
+ # set the HTTP header `Accept`
2265
+ if "Accept" not in _header_params:
2266
+ _header_params["Accept"] = self.api_client.select_header_accept(
2267
+ ["application/json"]
2268
+ )
2269
+
2270
+ # set the HTTP header `Content-Type`
2271
+ if _content_type:
2272
+ _header_params["Content-Type"] = _content_type
2273
+ else:
2274
+ _default_content_type = self.api_client.select_header_content_type(
2275
+ ["application/json"]
2276
+ )
2277
+ if _default_content_type is not None:
2278
+ _header_params["Content-Type"] = _default_content_type
2279
+
2280
+ # authentication setting
2281
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2282
+
2283
+ return self.api_client.param_serialize(
2284
+ method="PUT",
2285
+ resource_path="/tags",
2286
+ path_params=_path_params,
2287
+ query_params=_query_params,
2288
+ header_params=_header_params,
2289
+ body=_body_params,
2290
+ post_params=_form_params,
2291
+ files=_files,
2292
+ auth_settings=_auth_settings,
2293
+ collection_formats=_collection_formats,
2294
+ _host=_host,
2295
+ _request_auth=_request_auth,
2296
+ )