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,2905 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Immich
5
+
6
+ Immich API
7
+
8
+ The version of the OpenAPI document: 2.4.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from pydantic import StrictBool
19
+ from uuid import UUID
20
+ from immich.client.models.asset_face_update_dto import AssetFaceUpdateDto
21
+ from immich.client.models.bulk_id_response_dto import BulkIdResponseDto
22
+ from immich.client.models.bulk_ids_dto import BulkIdsDto
23
+ from immich.client.models.merge_person_dto import MergePersonDto
24
+ from immich.client.models.people_response_dto import PeopleResponseDto
25
+ from immich.client.models.people_update_dto import PeopleUpdateDto
26
+ from immich.client.models.person_create_dto import PersonCreateDto
27
+ from immich.client.models.person_response_dto import PersonResponseDto
28
+ from immich.client.models.person_statistics_response_dto import (
29
+ PersonStatisticsResponseDto,
30
+ )
31
+ from immich.client.models.person_update_dto import PersonUpdateDto
32
+
33
+ from immich.client.api_client import ApiClient, RequestSerialized
34
+ from immich.client.api_response import ApiResponse
35
+ from immich.client.rest import RESTResponseType
36
+
37
+
38
+ class PeopleApi:
39
+ """NOTE: This class is auto generated by OpenAPI Generator
40
+ Ref: https://openapi-generator.tech
41
+
42
+ Do not edit the class manually.
43
+ """
44
+
45
+ def __init__(self, api_client=None) -> None:
46
+ if api_client is None:
47
+ api_client = ApiClient.get_default()
48
+ self.api_client = api_client
49
+
50
+ @validate_call
51
+ async def create_person(
52
+ self,
53
+ person_create_dto: PersonCreateDto,
54
+ _request_timeout: Union[
55
+ None,
56
+ Annotated[StrictFloat, Field(gt=0)],
57
+ Tuple[
58
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
59
+ ],
60
+ ] = None,
61
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
62
+ _content_type: Optional[StrictStr] = None,
63
+ _headers: Optional[Dict[StrictStr, Any]] = None,
64
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
65
+ ) -> PersonResponseDto:
66
+ """Create a person
67
+
68
+ Create a new person that can have multiple faces assigned to them.
69
+
70
+ :param person_create_dto: (required)
71
+ :type person_create_dto: PersonCreateDto
72
+ :param _request_timeout: timeout setting for this request. If one
73
+ number provided, it will be total request
74
+ timeout. It can also be a pair (tuple) of
75
+ (connection, read) timeouts.
76
+ :type _request_timeout: int, tuple(int, int), optional
77
+ :param _request_auth: set to override the auth_settings for an a single
78
+ request; this effectively ignores the
79
+ authentication in the spec for a single request.
80
+ :type _request_auth: dict, optional
81
+ :param _content_type: force content-type for the request.
82
+ :type _content_type: str, Optional
83
+ :param _headers: set to override the headers for a single
84
+ request; this effectively ignores the headers
85
+ in the spec for a single request.
86
+ :type _headers: dict, optional
87
+ :param _host_index: set to override the host_index for a single
88
+ request; this effectively ignores the host_index
89
+ in the spec for a single request.
90
+ :type _host_index: int, optional
91
+ :return: Returns the result object.
92
+ """ # noqa: E501
93
+
94
+ _param = self._create_person_serialize(
95
+ person_create_dto=person_create_dto,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index,
100
+ )
101
+
102
+ _response_types_map: Dict[str, Optional[str]] = {
103
+ "201": "PersonResponseDto",
104
+ }
105
+ response_data = await self.api_client.call_api(
106
+ *_param, _request_timeout=_request_timeout
107
+ )
108
+ await response_data.read()
109
+ return self.api_client.response_deserialize(
110
+ response_data=response_data,
111
+ response_types_map=_response_types_map,
112
+ ).data
113
+
114
+ @validate_call
115
+ async def create_person_with_http_info(
116
+ self,
117
+ person_create_dto: PersonCreateDto,
118
+ _request_timeout: Union[
119
+ None,
120
+ Annotated[StrictFloat, Field(gt=0)],
121
+ Tuple[
122
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
123
+ ],
124
+ ] = None,
125
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
126
+ _content_type: Optional[StrictStr] = None,
127
+ _headers: Optional[Dict[StrictStr, Any]] = None,
128
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
129
+ ) -> ApiResponse[PersonResponseDto]:
130
+ """Create a person
131
+
132
+ Create a new person that can have multiple faces assigned to them.
133
+
134
+ :param person_create_dto: (required)
135
+ :type person_create_dto: PersonCreateDto
136
+ :param _request_timeout: timeout setting for this request. If one
137
+ number provided, it will be total request
138
+ timeout. It can also be a pair (tuple) of
139
+ (connection, read) timeouts.
140
+ :type _request_timeout: int, tuple(int, int), optional
141
+ :param _request_auth: set to override the auth_settings for an a single
142
+ request; this effectively ignores the
143
+ authentication in the spec for a single request.
144
+ :type _request_auth: dict, optional
145
+ :param _content_type: force content-type for the request.
146
+ :type _content_type: str, Optional
147
+ :param _headers: set to override the headers for a single
148
+ request; this effectively ignores the headers
149
+ in the spec for a single request.
150
+ :type _headers: dict, optional
151
+ :param _host_index: set to override the host_index for a single
152
+ request; this effectively ignores the host_index
153
+ in the spec for a single request.
154
+ :type _host_index: int, optional
155
+ :return: Returns the result object.
156
+ """ # noqa: E501
157
+
158
+ _param = self._create_person_serialize(
159
+ person_create_dto=person_create_dto,
160
+ _request_auth=_request_auth,
161
+ _content_type=_content_type,
162
+ _headers=_headers,
163
+ _host_index=_host_index,
164
+ )
165
+
166
+ _response_types_map: Dict[str, Optional[str]] = {
167
+ "201": "PersonResponseDto",
168
+ }
169
+ response_data = await self.api_client.call_api(
170
+ *_param, _request_timeout=_request_timeout
171
+ )
172
+ await response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+ @validate_call
179
+ async def create_person_without_preload_content(
180
+ self,
181
+ person_create_dto: PersonCreateDto,
182
+ _request_timeout: Union[
183
+ None,
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Tuple[
186
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
187
+ ],
188
+ ] = None,
189
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
190
+ _content_type: Optional[StrictStr] = None,
191
+ _headers: Optional[Dict[StrictStr, Any]] = None,
192
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
193
+ ) -> RESTResponseType:
194
+ """Create a person
195
+
196
+ Create a new person that can have multiple faces assigned to them.
197
+
198
+ :param person_create_dto: (required)
199
+ :type person_create_dto: PersonCreateDto
200
+ :param _request_timeout: timeout setting for this request. If one
201
+ number provided, it will be total request
202
+ timeout. It can also be a pair (tuple) of
203
+ (connection, read) timeouts.
204
+ :type _request_timeout: int, tuple(int, int), optional
205
+ :param _request_auth: set to override the auth_settings for an a single
206
+ request; this effectively ignores the
207
+ authentication in the spec for a single request.
208
+ :type _request_auth: dict, optional
209
+ :param _content_type: force content-type for the request.
210
+ :type _content_type: str, Optional
211
+ :param _headers: set to override the headers for a single
212
+ request; this effectively ignores the headers
213
+ in the spec for a single request.
214
+ :type _headers: dict, optional
215
+ :param _host_index: set to override the host_index for a single
216
+ request; this effectively ignores the host_index
217
+ in the spec for a single request.
218
+ :type _host_index: int, optional
219
+ :return: Returns the result object.
220
+ """ # noqa: E501
221
+
222
+ _param = self._create_person_serialize(
223
+ person_create_dto=person_create_dto,
224
+ _request_auth=_request_auth,
225
+ _content_type=_content_type,
226
+ _headers=_headers,
227
+ _host_index=_host_index,
228
+ )
229
+
230
+ _response_types_map: Dict[str, Optional[str]] = {
231
+ "201": "PersonResponseDto",
232
+ }
233
+ response_data = await self.api_client.call_api(
234
+ *_param, _request_timeout=_request_timeout
235
+ )
236
+ return response_data.response
237
+
238
+ def _create_person_serialize(
239
+ self,
240
+ person_create_dto,
241
+ _request_auth,
242
+ _content_type,
243
+ _headers,
244
+ _host_index,
245
+ ) -> RequestSerialized:
246
+ _host = None
247
+
248
+ _collection_formats: Dict[str, str] = {}
249
+
250
+ _path_params: Dict[str, str] = {}
251
+ _query_params: List[Tuple[str, str]] = []
252
+ _header_params: Dict[str, Optional[str]] = _headers or {}
253
+ _form_params: List[Tuple[str, str]] = []
254
+ _files: Dict[
255
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
256
+ ] = {}
257
+ _body_params: Optional[bytes] = None
258
+
259
+ # process the path parameters
260
+ # process the query parameters
261
+ # process the header parameters
262
+ # process the form parameters
263
+ # process the body parameter
264
+ if person_create_dto is not None:
265
+ _body_params = person_create_dto
266
+
267
+ # set the HTTP header `Accept`
268
+ if "Accept" not in _header_params:
269
+ _header_params["Accept"] = self.api_client.select_header_accept(
270
+ ["application/json"]
271
+ )
272
+
273
+ # set the HTTP header `Content-Type`
274
+ if _content_type:
275
+ _header_params["Content-Type"] = _content_type
276
+ else:
277
+ _default_content_type = self.api_client.select_header_content_type(
278
+ ["application/json"]
279
+ )
280
+ if _default_content_type is not None:
281
+ _header_params["Content-Type"] = _default_content_type
282
+
283
+ # authentication setting
284
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
285
+
286
+ return self.api_client.param_serialize(
287
+ method="POST",
288
+ resource_path="/people",
289
+ path_params=_path_params,
290
+ query_params=_query_params,
291
+ header_params=_header_params,
292
+ body=_body_params,
293
+ post_params=_form_params,
294
+ files=_files,
295
+ auth_settings=_auth_settings,
296
+ collection_formats=_collection_formats,
297
+ _host=_host,
298
+ _request_auth=_request_auth,
299
+ )
300
+
301
+ @validate_call
302
+ async def delete_people(
303
+ self,
304
+ bulk_ids_dto: BulkIdsDto,
305
+ _request_timeout: Union[
306
+ None,
307
+ Annotated[StrictFloat, Field(gt=0)],
308
+ Tuple[
309
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
310
+ ],
311
+ ] = None,
312
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
313
+ _content_type: Optional[StrictStr] = None,
314
+ _headers: Optional[Dict[StrictStr, Any]] = None,
315
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
316
+ ) -> None:
317
+ """Delete people
318
+
319
+ Bulk delete a list of people at once.
320
+
321
+ :param bulk_ids_dto: (required)
322
+ :type bulk_ids_dto: BulkIdsDto
323
+ :param _request_timeout: timeout setting for this request. If one
324
+ number provided, it will be total request
325
+ timeout. It can also be a pair (tuple) of
326
+ (connection, read) timeouts.
327
+ :type _request_timeout: int, tuple(int, int), optional
328
+ :param _request_auth: set to override the auth_settings for an a single
329
+ request; this effectively ignores the
330
+ authentication in the spec for a single request.
331
+ :type _request_auth: dict, optional
332
+ :param _content_type: force content-type for the request.
333
+ :type _content_type: str, Optional
334
+ :param _headers: set to override the headers for a single
335
+ request; this effectively ignores the headers
336
+ in the spec for a single request.
337
+ :type _headers: dict, optional
338
+ :param _host_index: set to override the host_index for a single
339
+ request; this effectively ignores the host_index
340
+ in the spec for a single request.
341
+ :type _host_index: int, optional
342
+ :return: Returns the result object.
343
+ """ # noqa: E501
344
+
345
+ _param = self._delete_people_serialize(
346
+ bulk_ids_dto=bulk_ids_dto,
347
+ _request_auth=_request_auth,
348
+ _content_type=_content_type,
349
+ _headers=_headers,
350
+ _host_index=_host_index,
351
+ )
352
+
353
+ _response_types_map: Dict[str, Optional[str]] = {
354
+ "204": None,
355
+ }
356
+ response_data = await self.api_client.call_api(
357
+ *_param, _request_timeout=_request_timeout
358
+ )
359
+ await response_data.read()
360
+ return self.api_client.response_deserialize(
361
+ response_data=response_data,
362
+ response_types_map=_response_types_map,
363
+ ).data
364
+
365
+ @validate_call
366
+ async def delete_people_with_http_info(
367
+ self,
368
+ bulk_ids_dto: BulkIdsDto,
369
+ _request_timeout: Union[
370
+ None,
371
+ Annotated[StrictFloat, Field(gt=0)],
372
+ Tuple[
373
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
374
+ ],
375
+ ] = None,
376
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
377
+ _content_type: Optional[StrictStr] = None,
378
+ _headers: Optional[Dict[StrictStr, Any]] = None,
379
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
380
+ ) -> ApiResponse[None]:
381
+ """Delete people
382
+
383
+ Bulk delete a list of people at once.
384
+
385
+ :param bulk_ids_dto: (required)
386
+ :type bulk_ids_dto: BulkIdsDto
387
+ :param _request_timeout: timeout setting for this request. If one
388
+ number provided, it will be total request
389
+ timeout. It can also be a pair (tuple) of
390
+ (connection, read) timeouts.
391
+ :type _request_timeout: int, tuple(int, int), optional
392
+ :param _request_auth: set to override the auth_settings for an a single
393
+ request; this effectively ignores the
394
+ authentication in the spec for a single request.
395
+ :type _request_auth: dict, optional
396
+ :param _content_type: force content-type for the request.
397
+ :type _content_type: str, Optional
398
+ :param _headers: set to override the headers for a single
399
+ request; this effectively ignores the headers
400
+ in the spec for a single request.
401
+ :type _headers: dict, optional
402
+ :param _host_index: set to override the host_index for a single
403
+ request; this effectively ignores the host_index
404
+ in the spec for a single request.
405
+ :type _host_index: int, optional
406
+ :return: Returns the result object.
407
+ """ # noqa: E501
408
+
409
+ _param = self._delete_people_serialize(
410
+ bulk_ids_dto=bulk_ids_dto,
411
+ _request_auth=_request_auth,
412
+ _content_type=_content_type,
413
+ _headers=_headers,
414
+ _host_index=_host_index,
415
+ )
416
+
417
+ _response_types_map: Dict[str, Optional[str]] = {
418
+ "204": None,
419
+ }
420
+ response_data = await self.api_client.call_api(
421
+ *_param, _request_timeout=_request_timeout
422
+ )
423
+ await response_data.read()
424
+ return self.api_client.response_deserialize(
425
+ response_data=response_data,
426
+ response_types_map=_response_types_map,
427
+ )
428
+
429
+ @validate_call
430
+ async def delete_people_without_preload_content(
431
+ self,
432
+ bulk_ids_dto: BulkIdsDto,
433
+ _request_timeout: Union[
434
+ None,
435
+ Annotated[StrictFloat, Field(gt=0)],
436
+ Tuple[
437
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
438
+ ],
439
+ ] = None,
440
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
441
+ _content_type: Optional[StrictStr] = None,
442
+ _headers: Optional[Dict[StrictStr, Any]] = None,
443
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
444
+ ) -> RESTResponseType:
445
+ """Delete people
446
+
447
+ Bulk delete a list of people at once.
448
+
449
+ :param bulk_ids_dto: (required)
450
+ :type bulk_ids_dto: BulkIdsDto
451
+ :param _request_timeout: timeout setting for this request. If one
452
+ number provided, it will be total request
453
+ timeout. It can also be a pair (tuple) of
454
+ (connection, read) timeouts.
455
+ :type _request_timeout: int, tuple(int, int), optional
456
+ :param _request_auth: set to override the auth_settings for an a single
457
+ request; this effectively ignores the
458
+ authentication in the spec for a single request.
459
+ :type _request_auth: dict, optional
460
+ :param _content_type: force content-type for the request.
461
+ :type _content_type: str, Optional
462
+ :param _headers: set to override the headers for a single
463
+ request; this effectively ignores the headers
464
+ in the spec for a single request.
465
+ :type _headers: dict, optional
466
+ :param _host_index: set to override the host_index for a single
467
+ request; this effectively ignores the host_index
468
+ in the spec for a single request.
469
+ :type _host_index: int, optional
470
+ :return: Returns the result object.
471
+ """ # noqa: E501
472
+
473
+ _param = self._delete_people_serialize(
474
+ bulk_ids_dto=bulk_ids_dto,
475
+ _request_auth=_request_auth,
476
+ _content_type=_content_type,
477
+ _headers=_headers,
478
+ _host_index=_host_index,
479
+ )
480
+
481
+ _response_types_map: Dict[str, Optional[str]] = {
482
+ "204": None,
483
+ }
484
+ response_data = await self.api_client.call_api(
485
+ *_param, _request_timeout=_request_timeout
486
+ )
487
+ return response_data.response
488
+
489
+ def _delete_people_serialize(
490
+ self,
491
+ bulk_ids_dto,
492
+ _request_auth,
493
+ _content_type,
494
+ _headers,
495
+ _host_index,
496
+ ) -> RequestSerialized:
497
+ _host = None
498
+
499
+ _collection_formats: Dict[str, str] = {}
500
+
501
+ _path_params: Dict[str, str] = {}
502
+ _query_params: List[Tuple[str, str]] = []
503
+ _header_params: Dict[str, Optional[str]] = _headers or {}
504
+ _form_params: List[Tuple[str, str]] = []
505
+ _files: Dict[
506
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
507
+ ] = {}
508
+ _body_params: Optional[bytes] = None
509
+
510
+ # process the path parameters
511
+ # process the query parameters
512
+ # process the header parameters
513
+ # process the form parameters
514
+ # process the body parameter
515
+ if bulk_ids_dto is not None:
516
+ _body_params = bulk_ids_dto
517
+
518
+ # set the HTTP header `Content-Type`
519
+ if _content_type:
520
+ _header_params["Content-Type"] = _content_type
521
+ else:
522
+ _default_content_type = self.api_client.select_header_content_type(
523
+ ["application/json"]
524
+ )
525
+ if _default_content_type is not None:
526
+ _header_params["Content-Type"] = _default_content_type
527
+
528
+ # authentication setting
529
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
530
+
531
+ return self.api_client.param_serialize(
532
+ method="DELETE",
533
+ resource_path="/people",
534
+ path_params=_path_params,
535
+ query_params=_query_params,
536
+ header_params=_header_params,
537
+ body=_body_params,
538
+ post_params=_form_params,
539
+ files=_files,
540
+ auth_settings=_auth_settings,
541
+ collection_formats=_collection_formats,
542
+ _host=_host,
543
+ _request_auth=_request_auth,
544
+ )
545
+
546
+ @validate_call
547
+ async def delete_person(
548
+ self,
549
+ id: UUID,
550
+ _request_timeout: Union[
551
+ None,
552
+ Annotated[StrictFloat, Field(gt=0)],
553
+ Tuple[
554
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
555
+ ],
556
+ ] = None,
557
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
558
+ _content_type: Optional[StrictStr] = None,
559
+ _headers: Optional[Dict[StrictStr, Any]] = None,
560
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
561
+ ) -> None:
562
+ """Delete person
563
+
564
+ Delete an individual person.
565
+
566
+ :param id: (required)
567
+ :type id: UUID
568
+ :param _request_timeout: timeout setting for this request. If one
569
+ number provided, it will be total request
570
+ timeout. It can also be a pair (tuple) of
571
+ (connection, read) timeouts.
572
+ :type _request_timeout: int, tuple(int, int), optional
573
+ :param _request_auth: set to override the auth_settings for an a single
574
+ request; this effectively ignores the
575
+ authentication in the spec for a single request.
576
+ :type _request_auth: dict, optional
577
+ :param _content_type: force content-type for the request.
578
+ :type _content_type: str, Optional
579
+ :param _headers: set to override the headers for a single
580
+ request; this effectively ignores the headers
581
+ in the spec for a single request.
582
+ :type _headers: dict, optional
583
+ :param _host_index: set to override the host_index for a single
584
+ request; this effectively ignores the host_index
585
+ in the spec for a single request.
586
+ :type _host_index: int, optional
587
+ :return: Returns the result object.
588
+ """ # noqa: E501
589
+
590
+ _param = self._delete_person_serialize(
591
+ id=id,
592
+ _request_auth=_request_auth,
593
+ _content_type=_content_type,
594
+ _headers=_headers,
595
+ _host_index=_host_index,
596
+ )
597
+
598
+ _response_types_map: Dict[str, Optional[str]] = {
599
+ "204": None,
600
+ }
601
+ response_data = await self.api_client.call_api(
602
+ *_param, _request_timeout=_request_timeout
603
+ )
604
+ await response_data.read()
605
+ return self.api_client.response_deserialize(
606
+ response_data=response_data,
607
+ response_types_map=_response_types_map,
608
+ ).data
609
+
610
+ @validate_call
611
+ async def delete_person_with_http_info(
612
+ self,
613
+ id: UUID,
614
+ _request_timeout: Union[
615
+ None,
616
+ Annotated[StrictFloat, Field(gt=0)],
617
+ Tuple[
618
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
619
+ ],
620
+ ] = None,
621
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
622
+ _content_type: Optional[StrictStr] = None,
623
+ _headers: Optional[Dict[StrictStr, Any]] = None,
624
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
625
+ ) -> ApiResponse[None]:
626
+ """Delete person
627
+
628
+ Delete an individual person.
629
+
630
+ :param id: (required)
631
+ :type id: UUID
632
+ :param _request_timeout: timeout setting for this request. If one
633
+ number provided, it will be total request
634
+ timeout. It can also be a pair (tuple) of
635
+ (connection, read) timeouts.
636
+ :type _request_timeout: int, tuple(int, int), optional
637
+ :param _request_auth: set to override the auth_settings for an a single
638
+ request; this effectively ignores the
639
+ authentication in the spec for a single request.
640
+ :type _request_auth: dict, optional
641
+ :param _content_type: force content-type for the request.
642
+ :type _content_type: str, Optional
643
+ :param _headers: set to override the headers for a single
644
+ request; this effectively ignores the headers
645
+ in the spec for a single request.
646
+ :type _headers: dict, optional
647
+ :param _host_index: set to override the host_index for a single
648
+ request; this effectively ignores the host_index
649
+ in the spec for a single request.
650
+ :type _host_index: int, optional
651
+ :return: Returns the result object.
652
+ """ # noqa: E501
653
+
654
+ _param = self._delete_person_serialize(
655
+ id=id,
656
+ _request_auth=_request_auth,
657
+ _content_type=_content_type,
658
+ _headers=_headers,
659
+ _host_index=_host_index,
660
+ )
661
+
662
+ _response_types_map: Dict[str, Optional[str]] = {
663
+ "204": None,
664
+ }
665
+ response_data = await self.api_client.call_api(
666
+ *_param, _request_timeout=_request_timeout
667
+ )
668
+ await response_data.read()
669
+ return self.api_client.response_deserialize(
670
+ response_data=response_data,
671
+ response_types_map=_response_types_map,
672
+ )
673
+
674
+ @validate_call
675
+ async def delete_person_without_preload_content(
676
+ self,
677
+ id: UUID,
678
+ _request_timeout: Union[
679
+ None,
680
+ Annotated[StrictFloat, Field(gt=0)],
681
+ Tuple[
682
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
683
+ ],
684
+ ] = None,
685
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
686
+ _content_type: Optional[StrictStr] = None,
687
+ _headers: Optional[Dict[StrictStr, Any]] = None,
688
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
689
+ ) -> RESTResponseType:
690
+ """Delete person
691
+
692
+ Delete an individual person.
693
+
694
+ :param id: (required)
695
+ :type id: UUID
696
+ :param _request_timeout: timeout setting for this request. If one
697
+ number provided, it will be total request
698
+ timeout. It can also be a pair (tuple) of
699
+ (connection, read) timeouts.
700
+ :type _request_timeout: int, tuple(int, int), optional
701
+ :param _request_auth: set to override the auth_settings for an a single
702
+ request; this effectively ignores the
703
+ authentication in the spec for a single request.
704
+ :type _request_auth: dict, optional
705
+ :param _content_type: force content-type for the request.
706
+ :type _content_type: str, Optional
707
+ :param _headers: set to override the headers for a single
708
+ request; this effectively ignores the headers
709
+ in the spec for a single request.
710
+ :type _headers: dict, optional
711
+ :param _host_index: set to override the host_index for a single
712
+ request; this effectively ignores the host_index
713
+ in the spec for a single request.
714
+ :type _host_index: int, optional
715
+ :return: Returns the result object.
716
+ """ # noqa: E501
717
+
718
+ _param = self._delete_person_serialize(
719
+ id=id,
720
+ _request_auth=_request_auth,
721
+ _content_type=_content_type,
722
+ _headers=_headers,
723
+ _host_index=_host_index,
724
+ )
725
+
726
+ _response_types_map: Dict[str, Optional[str]] = {
727
+ "204": None,
728
+ }
729
+ response_data = await self.api_client.call_api(
730
+ *_param, _request_timeout=_request_timeout
731
+ )
732
+ return response_data.response
733
+
734
+ def _delete_person_serialize(
735
+ self,
736
+ id,
737
+ _request_auth,
738
+ _content_type,
739
+ _headers,
740
+ _host_index,
741
+ ) -> RequestSerialized:
742
+ _host = None
743
+
744
+ _collection_formats: Dict[str, str] = {}
745
+
746
+ _path_params: Dict[str, str] = {}
747
+ _query_params: List[Tuple[str, str]] = []
748
+ _header_params: Dict[str, Optional[str]] = _headers or {}
749
+ _form_params: List[Tuple[str, str]] = []
750
+ _files: Dict[
751
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
752
+ ] = {}
753
+ _body_params: Optional[bytes] = None
754
+
755
+ # process the path parameters
756
+ if id is not None:
757
+ _path_params["id"] = id
758
+ # process the query parameters
759
+ # process the header parameters
760
+ # process the form parameters
761
+ # process the body parameter
762
+
763
+ # authentication setting
764
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
765
+
766
+ return self.api_client.param_serialize(
767
+ method="DELETE",
768
+ resource_path="/people/{id}",
769
+ path_params=_path_params,
770
+ query_params=_query_params,
771
+ header_params=_header_params,
772
+ body=_body_params,
773
+ post_params=_form_params,
774
+ files=_files,
775
+ auth_settings=_auth_settings,
776
+ collection_formats=_collection_formats,
777
+ _host=_host,
778
+ _request_auth=_request_auth,
779
+ )
780
+
781
+ @validate_call
782
+ async def get_all_people(
783
+ self,
784
+ closest_asset_id: Optional[UUID] = None,
785
+ closest_person_id: Optional[UUID] = None,
786
+ page: Annotated[
787
+ Optional[
788
+ Union[
789
+ Annotated[float, Field(strict=True, ge=1)],
790
+ Annotated[int, Field(strict=True, ge=1)],
791
+ ]
792
+ ],
793
+ Field(description="Page number for pagination"),
794
+ ] = None,
795
+ size: Annotated[
796
+ Optional[
797
+ Union[
798
+ Annotated[float, Field(le=1000, strict=True, ge=1)],
799
+ Annotated[int, Field(le=1000, strict=True, ge=1)],
800
+ ]
801
+ ],
802
+ Field(description="Number of items per page"),
803
+ ] = None,
804
+ with_hidden: Optional[StrictBool] = None,
805
+ _request_timeout: Union[
806
+ None,
807
+ Annotated[StrictFloat, Field(gt=0)],
808
+ Tuple[
809
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
810
+ ],
811
+ ] = None,
812
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
813
+ _content_type: Optional[StrictStr] = None,
814
+ _headers: Optional[Dict[StrictStr, Any]] = None,
815
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
816
+ ) -> PeopleResponseDto:
817
+ """Get all people
818
+
819
+ Retrieve a list of all people.
820
+
821
+ :param closest_asset_id:
822
+ :type closest_asset_id: UUID
823
+ :param closest_person_id:
824
+ :type closest_person_id: UUID
825
+ :param page: Page number for pagination
826
+ :type page: float
827
+ :param size: Number of items per page
828
+ :type size: float
829
+ :param with_hidden:
830
+ :type with_hidden: bool
831
+ :param _request_timeout: timeout setting for this request. If one
832
+ number provided, it will be total request
833
+ timeout. It can also be a pair (tuple) of
834
+ (connection, read) timeouts.
835
+ :type _request_timeout: int, tuple(int, int), optional
836
+ :param _request_auth: set to override the auth_settings for an a single
837
+ request; this effectively ignores the
838
+ authentication in the spec for a single request.
839
+ :type _request_auth: dict, optional
840
+ :param _content_type: force content-type for the request.
841
+ :type _content_type: str, Optional
842
+ :param _headers: set to override the headers for a single
843
+ request; this effectively ignores the headers
844
+ in the spec for a single request.
845
+ :type _headers: dict, optional
846
+ :param _host_index: set to override the host_index for a single
847
+ request; this effectively ignores the host_index
848
+ in the spec for a single request.
849
+ :type _host_index: int, optional
850
+ :return: Returns the result object.
851
+ """ # noqa: E501
852
+
853
+ _param = self._get_all_people_serialize(
854
+ closest_asset_id=closest_asset_id,
855
+ closest_person_id=closest_person_id,
856
+ page=page,
857
+ size=size,
858
+ with_hidden=with_hidden,
859
+ _request_auth=_request_auth,
860
+ _content_type=_content_type,
861
+ _headers=_headers,
862
+ _host_index=_host_index,
863
+ )
864
+
865
+ _response_types_map: Dict[str, Optional[str]] = {
866
+ "200": "PeopleResponseDto",
867
+ }
868
+ response_data = await self.api_client.call_api(
869
+ *_param, _request_timeout=_request_timeout
870
+ )
871
+ await response_data.read()
872
+ return self.api_client.response_deserialize(
873
+ response_data=response_data,
874
+ response_types_map=_response_types_map,
875
+ ).data
876
+
877
+ @validate_call
878
+ async def get_all_people_with_http_info(
879
+ self,
880
+ closest_asset_id: Optional[UUID] = None,
881
+ closest_person_id: Optional[UUID] = None,
882
+ page: Annotated[
883
+ Optional[
884
+ Union[
885
+ Annotated[float, Field(strict=True, ge=1)],
886
+ Annotated[int, Field(strict=True, ge=1)],
887
+ ]
888
+ ],
889
+ Field(description="Page number for pagination"),
890
+ ] = None,
891
+ size: Annotated[
892
+ Optional[
893
+ Union[
894
+ Annotated[float, Field(le=1000, strict=True, ge=1)],
895
+ Annotated[int, Field(le=1000, strict=True, ge=1)],
896
+ ]
897
+ ],
898
+ Field(description="Number of items per page"),
899
+ ] = None,
900
+ with_hidden: Optional[StrictBool] = None,
901
+ _request_timeout: Union[
902
+ None,
903
+ Annotated[StrictFloat, Field(gt=0)],
904
+ Tuple[
905
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
906
+ ],
907
+ ] = None,
908
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
909
+ _content_type: Optional[StrictStr] = None,
910
+ _headers: Optional[Dict[StrictStr, Any]] = None,
911
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
912
+ ) -> ApiResponse[PeopleResponseDto]:
913
+ """Get all people
914
+
915
+ Retrieve a list of all people.
916
+
917
+ :param closest_asset_id:
918
+ :type closest_asset_id: UUID
919
+ :param closest_person_id:
920
+ :type closest_person_id: UUID
921
+ :param page: Page number for pagination
922
+ :type page: float
923
+ :param size: Number of items per page
924
+ :type size: float
925
+ :param with_hidden:
926
+ :type with_hidden: bool
927
+ :param _request_timeout: timeout setting for this request. If one
928
+ number provided, it will be total request
929
+ timeout. It can also be a pair (tuple) of
930
+ (connection, read) timeouts.
931
+ :type _request_timeout: int, tuple(int, int), optional
932
+ :param _request_auth: set to override the auth_settings for an a single
933
+ request; this effectively ignores the
934
+ authentication in the spec for a single request.
935
+ :type _request_auth: dict, optional
936
+ :param _content_type: force content-type for the request.
937
+ :type _content_type: str, Optional
938
+ :param _headers: set to override the headers for a single
939
+ request; this effectively ignores the headers
940
+ in the spec for a single request.
941
+ :type _headers: dict, optional
942
+ :param _host_index: set to override the host_index for a single
943
+ request; this effectively ignores the host_index
944
+ in the spec for a single request.
945
+ :type _host_index: int, optional
946
+ :return: Returns the result object.
947
+ """ # noqa: E501
948
+
949
+ _param = self._get_all_people_serialize(
950
+ closest_asset_id=closest_asset_id,
951
+ closest_person_id=closest_person_id,
952
+ page=page,
953
+ size=size,
954
+ with_hidden=with_hidden,
955
+ _request_auth=_request_auth,
956
+ _content_type=_content_type,
957
+ _headers=_headers,
958
+ _host_index=_host_index,
959
+ )
960
+
961
+ _response_types_map: Dict[str, Optional[str]] = {
962
+ "200": "PeopleResponseDto",
963
+ }
964
+ response_data = await self.api_client.call_api(
965
+ *_param, _request_timeout=_request_timeout
966
+ )
967
+ await response_data.read()
968
+ return self.api_client.response_deserialize(
969
+ response_data=response_data,
970
+ response_types_map=_response_types_map,
971
+ )
972
+
973
+ @validate_call
974
+ async def get_all_people_without_preload_content(
975
+ self,
976
+ closest_asset_id: Optional[UUID] = None,
977
+ closest_person_id: Optional[UUID] = None,
978
+ page: Annotated[
979
+ Optional[
980
+ Union[
981
+ Annotated[float, Field(strict=True, ge=1)],
982
+ Annotated[int, Field(strict=True, ge=1)],
983
+ ]
984
+ ],
985
+ Field(description="Page number for pagination"),
986
+ ] = None,
987
+ size: Annotated[
988
+ Optional[
989
+ Union[
990
+ Annotated[float, Field(le=1000, strict=True, ge=1)],
991
+ Annotated[int, Field(le=1000, strict=True, ge=1)],
992
+ ]
993
+ ],
994
+ Field(description="Number of items per page"),
995
+ ] = None,
996
+ with_hidden: Optional[StrictBool] = None,
997
+ _request_timeout: Union[
998
+ None,
999
+ Annotated[StrictFloat, Field(gt=0)],
1000
+ Tuple[
1001
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1002
+ ],
1003
+ ] = None,
1004
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1005
+ _content_type: Optional[StrictStr] = None,
1006
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1007
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1008
+ ) -> RESTResponseType:
1009
+ """Get all people
1010
+
1011
+ Retrieve a list of all people.
1012
+
1013
+ :param closest_asset_id:
1014
+ :type closest_asset_id: UUID
1015
+ :param closest_person_id:
1016
+ :type closest_person_id: UUID
1017
+ :param page: Page number for pagination
1018
+ :type page: float
1019
+ :param size: Number of items per page
1020
+ :type size: float
1021
+ :param with_hidden:
1022
+ :type with_hidden: bool
1023
+ :param _request_timeout: timeout setting for this request. If one
1024
+ number provided, it will be total request
1025
+ timeout. It can also be a pair (tuple) of
1026
+ (connection, read) timeouts.
1027
+ :type _request_timeout: int, tuple(int, int), optional
1028
+ :param _request_auth: set to override the auth_settings for an a single
1029
+ request; this effectively ignores the
1030
+ authentication in the spec for a single request.
1031
+ :type _request_auth: dict, optional
1032
+ :param _content_type: force content-type for the request.
1033
+ :type _content_type: str, Optional
1034
+ :param _headers: set to override the headers for a single
1035
+ request; this effectively ignores the headers
1036
+ in the spec for a single request.
1037
+ :type _headers: dict, optional
1038
+ :param _host_index: set to override the host_index for a single
1039
+ request; this effectively ignores the host_index
1040
+ in the spec for a single request.
1041
+ :type _host_index: int, optional
1042
+ :return: Returns the result object.
1043
+ """ # noqa: E501
1044
+
1045
+ _param = self._get_all_people_serialize(
1046
+ closest_asset_id=closest_asset_id,
1047
+ closest_person_id=closest_person_id,
1048
+ page=page,
1049
+ size=size,
1050
+ with_hidden=with_hidden,
1051
+ _request_auth=_request_auth,
1052
+ _content_type=_content_type,
1053
+ _headers=_headers,
1054
+ _host_index=_host_index,
1055
+ )
1056
+
1057
+ _response_types_map: Dict[str, Optional[str]] = {
1058
+ "200": "PeopleResponseDto",
1059
+ }
1060
+ response_data = await self.api_client.call_api(
1061
+ *_param, _request_timeout=_request_timeout
1062
+ )
1063
+ return response_data.response
1064
+
1065
+ def _get_all_people_serialize(
1066
+ self,
1067
+ closest_asset_id,
1068
+ closest_person_id,
1069
+ page,
1070
+ size,
1071
+ with_hidden,
1072
+ _request_auth,
1073
+ _content_type,
1074
+ _headers,
1075
+ _host_index,
1076
+ ) -> RequestSerialized:
1077
+ _host = None
1078
+
1079
+ _collection_formats: Dict[str, str] = {}
1080
+
1081
+ _path_params: Dict[str, str] = {}
1082
+ _query_params: List[Tuple[str, str]] = []
1083
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1084
+ _form_params: List[Tuple[str, str]] = []
1085
+ _files: Dict[
1086
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1087
+ ] = {}
1088
+ _body_params: Optional[bytes] = None
1089
+
1090
+ # process the path parameters
1091
+ # process the query parameters
1092
+ if closest_asset_id is not None:
1093
+ _query_params.append(("closestAssetId", closest_asset_id))
1094
+
1095
+ if closest_person_id is not None:
1096
+ _query_params.append(("closestPersonId", closest_person_id))
1097
+
1098
+ if page is not None:
1099
+ _query_params.append(("page", page))
1100
+
1101
+ if size is not None:
1102
+ _query_params.append(("size", size))
1103
+
1104
+ if with_hidden is not None:
1105
+ _query_params.append(("withHidden", with_hidden))
1106
+
1107
+ # process the header parameters
1108
+ # process the form parameters
1109
+ # process the body parameter
1110
+
1111
+ # set the HTTP header `Accept`
1112
+ if "Accept" not in _header_params:
1113
+ _header_params["Accept"] = self.api_client.select_header_accept(
1114
+ ["application/json"]
1115
+ )
1116
+
1117
+ # authentication setting
1118
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1119
+
1120
+ return self.api_client.param_serialize(
1121
+ method="GET",
1122
+ resource_path="/people",
1123
+ path_params=_path_params,
1124
+ query_params=_query_params,
1125
+ header_params=_header_params,
1126
+ body=_body_params,
1127
+ post_params=_form_params,
1128
+ files=_files,
1129
+ auth_settings=_auth_settings,
1130
+ collection_formats=_collection_formats,
1131
+ _host=_host,
1132
+ _request_auth=_request_auth,
1133
+ )
1134
+
1135
+ @validate_call
1136
+ async def get_person(
1137
+ self,
1138
+ id: UUID,
1139
+ _request_timeout: Union[
1140
+ None,
1141
+ Annotated[StrictFloat, Field(gt=0)],
1142
+ Tuple[
1143
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1144
+ ],
1145
+ ] = None,
1146
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1147
+ _content_type: Optional[StrictStr] = None,
1148
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1149
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1150
+ ) -> PersonResponseDto:
1151
+ """Get a person
1152
+
1153
+ Retrieve a person by id.
1154
+
1155
+ :param id: (required)
1156
+ :type id: UUID
1157
+ :param _request_timeout: timeout setting for this request. If one
1158
+ number provided, it will be total request
1159
+ timeout. It can also be a pair (tuple) of
1160
+ (connection, read) timeouts.
1161
+ :type _request_timeout: int, tuple(int, int), optional
1162
+ :param _request_auth: set to override the auth_settings for an a single
1163
+ request; this effectively ignores the
1164
+ authentication in the spec for a single request.
1165
+ :type _request_auth: dict, optional
1166
+ :param _content_type: force content-type for the request.
1167
+ :type _content_type: str, Optional
1168
+ :param _headers: set to override the headers for a single
1169
+ request; this effectively ignores the headers
1170
+ in the spec for a single request.
1171
+ :type _headers: dict, optional
1172
+ :param _host_index: set to override the host_index for a single
1173
+ request; this effectively ignores the host_index
1174
+ in the spec for a single request.
1175
+ :type _host_index: int, optional
1176
+ :return: Returns the result object.
1177
+ """ # noqa: E501
1178
+
1179
+ _param = self._get_person_serialize(
1180
+ id=id,
1181
+ _request_auth=_request_auth,
1182
+ _content_type=_content_type,
1183
+ _headers=_headers,
1184
+ _host_index=_host_index,
1185
+ )
1186
+
1187
+ _response_types_map: Dict[str, Optional[str]] = {
1188
+ "200": "PersonResponseDto",
1189
+ }
1190
+ response_data = await self.api_client.call_api(
1191
+ *_param, _request_timeout=_request_timeout
1192
+ )
1193
+ await response_data.read()
1194
+ return self.api_client.response_deserialize(
1195
+ response_data=response_data,
1196
+ response_types_map=_response_types_map,
1197
+ ).data
1198
+
1199
+ @validate_call
1200
+ async def get_person_with_http_info(
1201
+ self,
1202
+ id: UUID,
1203
+ _request_timeout: Union[
1204
+ None,
1205
+ Annotated[StrictFloat, Field(gt=0)],
1206
+ Tuple[
1207
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1208
+ ],
1209
+ ] = None,
1210
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1211
+ _content_type: Optional[StrictStr] = None,
1212
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1213
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1214
+ ) -> ApiResponse[PersonResponseDto]:
1215
+ """Get a person
1216
+
1217
+ Retrieve a person by id.
1218
+
1219
+ :param id: (required)
1220
+ :type id: UUID
1221
+ :param _request_timeout: timeout setting for this request. If one
1222
+ number provided, it will be total request
1223
+ timeout. It can also be a pair (tuple) of
1224
+ (connection, read) timeouts.
1225
+ :type _request_timeout: int, tuple(int, int), optional
1226
+ :param _request_auth: set to override the auth_settings for an a single
1227
+ request; this effectively ignores the
1228
+ authentication in the spec for a single request.
1229
+ :type _request_auth: dict, optional
1230
+ :param _content_type: force content-type for the request.
1231
+ :type _content_type: str, Optional
1232
+ :param _headers: set to override the headers for a single
1233
+ request; this effectively ignores the headers
1234
+ in the spec for a single request.
1235
+ :type _headers: dict, optional
1236
+ :param _host_index: set to override the host_index for a single
1237
+ request; this effectively ignores the host_index
1238
+ in the spec for a single request.
1239
+ :type _host_index: int, optional
1240
+ :return: Returns the result object.
1241
+ """ # noqa: E501
1242
+
1243
+ _param = self._get_person_serialize(
1244
+ id=id,
1245
+ _request_auth=_request_auth,
1246
+ _content_type=_content_type,
1247
+ _headers=_headers,
1248
+ _host_index=_host_index,
1249
+ )
1250
+
1251
+ _response_types_map: Dict[str, Optional[str]] = {
1252
+ "200": "PersonResponseDto",
1253
+ }
1254
+ response_data = await self.api_client.call_api(
1255
+ *_param, _request_timeout=_request_timeout
1256
+ )
1257
+ await response_data.read()
1258
+ return self.api_client.response_deserialize(
1259
+ response_data=response_data,
1260
+ response_types_map=_response_types_map,
1261
+ )
1262
+
1263
+ @validate_call
1264
+ async def get_person_without_preload_content(
1265
+ self,
1266
+ id: UUID,
1267
+ _request_timeout: Union[
1268
+ None,
1269
+ Annotated[StrictFloat, Field(gt=0)],
1270
+ Tuple[
1271
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1272
+ ],
1273
+ ] = None,
1274
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1275
+ _content_type: Optional[StrictStr] = None,
1276
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1277
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1278
+ ) -> RESTResponseType:
1279
+ """Get a person
1280
+
1281
+ Retrieve a person by id.
1282
+
1283
+ :param id: (required)
1284
+ :type id: UUID
1285
+ :param _request_timeout: timeout setting for this request. If one
1286
+ number provided, it will be total request
1287
+ timeout. It can also be a pair (tuple) of
1288
+ (connection, read) timeouts.
1289
+ :type _request_timeout: int, tuple(int, int), optional
1290
+ :param _request_auth: set to override the auth_settings for an a single
1291
+ request; this effectively ignores the
1292
+ authentication in the spec for a single request.
1293
+ :type _request_auth: dict, optional
1294
+ :param _content_type: force content-type for the request.
1295
+ :type _content_type: str, Optional
1296
+ :param _headers: set to override the headers for a single
1297
+ request; this effectively ignores the headers
1298
+ in the spec for a single request.
1299
+ :type _headers: dict, optional
1300
+ :param _host_index: set to override the host_index for a single
1301
+ request; this effectively ignores the host_index
1302
+ in the spec for a single request.
1303
+ :type _host_index: int, optional
1304
+ :return: Returns the result object.
1305
+ """ # noqa: E501
1306
+
1307
+ _param = self._get_person_serialize(
1308
+ id=id,
1309
+ _request_auth=_request_auth,
1310
+ _content_type=_content_type,
1311
+ _headers=_headers,
1312
+ _host_index=_host_index,
1313
+ )
1314
+
1315
+ _response_types_map: Dict[str, Optional[str]] = {
1316
+ "200": "PersonResponseDto",
1317
+ }
1318
+ response_data = await self.api_client.call_api(
1319
+ *_param, _request_timeout=_request_timeout
1320
+ )
1321
+ return response_data.response
1322
+
1323
+ def _get_person_serialize(
1324
+ self,
1325
+ id,
1326
+ _request_auth,
1327
+ _content_type,
1328
+ _headers,
1329
+ _host_index,
1330
+ ) -> RequestSerialized:
1331
+ _host = None
1332
+
1333
+ _collection_formats: Dict[str, str] = {}
1334
+
1335
+ _path_params: Dict[str, str] = {}
1336
+ _query_params: List[Tuple[str, str]] = []
1337
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1338
+ _form_params: List[Tuple[str, str]] = []
1339
+ _files: Dict[
1340
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1341
+ ] = {}
1342
+ _body_params: Optional[bytes] = None
1343
+
1344
+ # process the path parameters
1345
+ if id is not None:
1346
+ _path_params["id"] = id
1347
+ # process the query parameters
1348
+ # process the header parameters
1349
+ # process the form parameters
1350
+ # process the body parameter
1351
+
1352
+ # set the HTTP header `Accept`
1353
+ if "Accept" not in _header_params:
1354
+ _header_params["Accept"] = self.api_client.select_header_accept(
1355
+ ["application/json"]
1356
+ )
1357
+
1358
+ # authentication setting
1359
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1360
+
1361
+ return self.api_client.param_serialize(
1362
+ method="GET",
1363
+ resource_path="/people/{id}",
1364
+ path_params=_path_params,
1365
+ query_params=_query_params,
1366
+ header_params=_header_params,
1367
+ body=_body_params,
1368
+ post_params=_form_params,
1369
+ files=_files,
1370
+ auth_settings=_auth_settings,
1371
+ collection_formats=_collection_formats,
1372
+ _host=_host,
1373
+ _request_auth=_request_auth,
1374
+ )
1375
+
1376
+ @validate_call
1377
+ async def get_person_statistics(
1378
+ self,
1379
+ id: UUID,
1380
+ _request_timeout: Union[
1381
+ None,
1382
+ Annotated[StrictFloat, Field(gt=0)],
1383
+ Tuple[
1384
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1385
+ ],
1386
+ ] = None,
1387
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1388
+ _content_type: Optional[StrictStr] = None,
1389
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1390
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1391
+ ) -> PersonStatisticsResponseDto:
1392
+ """Get person statistics
1393
+
1394
+ Retrieve statistics about a specific person.
1395
+
1396
+ :param id: (required)
1397
+ :type id: UUID
1398
+ :param _request_timeout: timeout setting for this request. If one
1399
+ number provided, it will be total request
1400
+ timeout. It can also be a pair (tuple) of
1401
+ (connection, read) timeouts.
1402
+ :type _request_timeout: int, tuple(int, int), optional
1403
+ :param _request_auth: set to override the auth_settings for an a single
1404
+ request; this effectively ignores the
1405
+ authentication in the spec for a single request.
1406
+ :type _request_auth: dict, optional
1407
+ :param _content_type: force content-type for the request.
1408
+ :type _content_type: str, Optional
1409
+ :param _headers: set to override the headers for a single
1410
+ request; this effectively ignores the headers
1411
+ in the spec for a single request.
1412
+ :type _headers: dict, optional
1413
+ :param _host_index: set to override the host_index for a single
1414
+ request; this effectively ignores the host_index
1415
+ in the spec for a single request.
1416
+ :type _host_index: int, optional
1417
+ :return: Returns the result object.
1418
+ """ # noqa: E501
1419
+
1420
+ _param = self._get_person_statistics_serialize(
1421
+ id=id,
1422
+ _request_auth=_request_auth,
1423
+ _content_type=_content_type,
1424
+ _headers=_headers,
1425
+ _host_index=_host_index,
1426
+ )
1427
+
1428
+ _response_types_map: Dict[str, Optional[str]] = {
1429
+ "200": "PersonStatisticsResponseDto",
1430
+ }
1431
+ response_data = await self.api_client.call_api(
1432
+ *_param, _request_timeout=_request_timeout
1433
+ )
1434
+ await response_data.read()
1435
+ return self.api_client.response_deserialize(
1436
+ response_data=response_data,
1437
+ response_types_map=_response_types_map,
1438
+ ).data
1439
+
1440
+ @validate_call
1441
+ async def get_person_statistics_with_http_info(
1442
+ self,
1443
+ id: UUID,
1444
+ _request_timeout: Union[
1445
+ None,
1446
+ Annotated[StrictFloat, Field(gt=0)],
1447
+ Tuple[
1448
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1449
+ ],
1450
+ ] = None,
1451
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1452
+ _content_type: Optional[StrictStr] = None,
1453
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1454
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1455
+ ) -> ApiResponse[PersonStatisticsResponseDto]:
1456
+ """Get person statistics
1457
+
1458
+ Retrieve statistics about a specific person.
1459
+
1460
+ :param id: (required)
1461
+ :type id: UUID
1462
+ :param _request_timeout: timeout setting for this request. If one
1463
+ number provided, it will be total request
1464
+ timeout. It can also be a pair (tuple) of
1465
+ (connection, read) timeouts.
1466
+ :type _request_timeout: int, tuple(int, int), optional
1467
+ :param _request_auth: set to override the auth_settings for an a single
1468
+ request; this effectively ignores the
1469
+ authentication in the spec for a single request.
1470
+ :type _request_auth: dict, optional
1471
+ :param _content_type: force content-type for the request.
1472
+ :type _content_type: str, Optional
1473
+ :param _headers: set to override the headers for a single
1474
+ request; this effectively ignores the headers
1475
+ in the spec for a single request.
1476
+ :type _headers: dict, optional
1477
+ :param _host_index: set to override the host_index for a single
1478
+ request; this effectively ignores the host_index
1479
+ in the spec for a single request.
1480
+ :type _host_index: int, optional
1481
+ :return: Returns the result object.
1482
+ """ # noqa: E501
1483
+
1484
+ _param = self._get_person_statistics_serialize(
1485
+ id=id,
1486
+ _request_auth=_request_auth,
1487
+ _content_type=_content_type,
1488
+ _headers=_headers,
1489
+ _host_index=_host_index,
1490
+ )
1491
+
1492
+ _response_types_map: Dict[str, Optional[str]] = {
1493
+ "200": "PersonStatisticsResponseDto",
1494
+ }
1495
+ response_data = await self.api_client.call_api(
1496
+ *_param, _request_timeout=_request_timeout
1497
+ )
1498
+ await response_data.read()
1499
+ return self.api_client.response_deserialize(
1500
+ response_data=response_data,
1501
+ response_types_map=_response_types_map,
1502
+ )
1503
+
1504
+ @validate_call
1505
+ async def get_person_statistics_without_preload_content(
1506
+ self,
1507
+ id: UUID,
1508
+ _request_timeout: Union[
1509
+ None,
1510
+ Annotated[StrictFloat, Field(gt=0)],
1511
+ Tuple[
1512
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1513
+ ],
1514
+ ] = None,
1515
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1516
+ _content_type: Optional[StrictStr] = None,
1517
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1518
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1519
+ ) -> RESTResponseType:
1520
+ """Get person statistics
1521
+
1522
+ Retrieve statistics about a specific person.
1523
+
1524
+ :param id: (required)
1525
+ :type id: UUID
1526
+ :param _request_timeout: timeout setting for this request. If one
1527
+ number provided, it will be total request
1528
+ timeout. It can also be a pair (tuple) of
1529
+ (connection, read) timeouts.
1530
+ :type _request_timeout: int, tuple(int, int), optional
1531
+ :param _request_auth: set to override the auth_settings for an a single
1532
+ request; this effectively ignores the
1533
+ authentication in the spec for a single request.
1534
+ :type _request_auth: dict, optional
1535
+ :param _content_type: force content-type for the request.
1536
+ :type _content_type: str, Optional
1537
+ :param _headers: set to override the headers for a single
1538
+ request; this effectively ignores the headers
1539
+ in the spec for a single request.
1540
+ :type _headers: dict, optional
1541
+ :param _host_index: set to override the host_index for a single
1542
+ request; this effectively ignores the host_index
1543
+ in the spec for a single request.
1544
+ :type _host_index: int, optional
1545
+ :return: Returns the result object.
1546
+ """ # noqa: E501
1547
+
1548
+ _param = self._get_person_statistics_serialize(
1549
+ id=id,
1550
+ _request_auth=_request_auth,
1551
+ _content_type=_content_type,
1552
+ _headers=_headers,
1553
+ _host_index=_host_index,
1554
+ )
1555
+
1556
+ _response_types_map: Dict[str, Optional[str]] = {
1557
+ "200": "PersonStatisticsResponseDto",
1558
+ }
1559
+ response_data = await self.api_client.call_api(
1560
+ *_param, _request_timeout=_request_timeout
1561
+ )
1562
+ return response_data.response
1563
+
1564
+ def _get_person_statistics_serialize(
1565
+ self,
1566
+ id,
1567
+ _request_auth,
1568
+ _content_type,
1569
+ _headers,
1570
+ _host_index,
1571
+ ) -> RequestSerialized:
1572
+ _host = None
1573
+
1574
+ _collection_formats: Dict[str, str] = {}
1575
+
1576
+ _path_params: Dict[str, str] = {}
1577
+ _query_params: List[Tuple[str, str]] = []
1578
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1579
+ _form_params: List[Tuple[str, str]] = []
1580
+ _files: Dict[
1581
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1582
+ ] = {}
1583
+ _body_params: Optional[bytes] = None
1584
+
1585
+ # process the path parameters
1586
+ if id is not None:
1587
+ _path_params["id"] = id
1588
+ # process the query parameters
1589
+ # process the header parameters
1590
+ # process the form parameters
1591
+ # process the body parameter
1592
+
1593
+ # set the HTTP header `Accept`
1594
+ if "Accept" not in _header_params:
1595
+ _header_params["Accept"] = self.api_client.select_header_accept(
1596
+ ["application/json"]
1597
+ )
1598
+
1599
+ # authentication setting
1600
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1601
+
1602
+ return self.api_client.param_serialize(
1603
+ method="GET",
1604
+ resource_path="/people/{id}/statistics",
1605
+ path_params=_path_params,
1606
+ query_params=_query_params,
1607
+ header_params=_header_params,
1608
+ body=_body_params,
1609
+ post_params=_form_params,
1610
+ files=_files,
1611
+ auth_settings=_auth_settings,
1612
+ collection_formats=_collection_formats,
1613
+ _host=_host,
1614
+ _request_auth=_request_auth,
1615
+ )
1616
+
1617
+ @validate_call
1618
+ async def get_person_thumbnail(
1619
+ self,
1620
+ id: UUID,
1621
+ _request_timeout: Union[
1622
+ None,
1623
+ Annotated[StrictFloat, Field(gt=0)],
1624
+ Tuple[
1625
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1626
+ ],
1627
+ ] = None,
1628
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1629
+ _content_type: Optional[StrictStr] = None,
1630
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1631
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1632
+ ) -> bytearray:
1633
+ """Get person thumbnail
1634
+
1635
+ Retrieve the thumbnail file for a person.
1636
+
1637
+ :param id: (required)
1638
+ :type id: UUID
1639
+ :param _request_timeout: timeout setting for this request. If one
1640
+ number provided, it will be total request
1641
+ timeout. It can also be a pair (tuple) of
1642
+ (connection, read) timeouts.
1643
+ :type _request_timeout: int, tuple(int, int), optional
1644
+ :param _request_auth: set to override the auth_settings for an a single
1645
+ request; this effectively ignores the
1646
+ authentication in the spec for a single request.
1647
+ :type _request_auth: dict, optional
1648
+ :param _content_type: force content-type for the request.
1649
+ :type _content_type: str, Optional
1650
+ :param _headers: set to override the headers for a single
1651
+ request; this effectively ignores the headers
1652
+ in the spec for a single request.
1653
+ :type _headers: dict, optional
1654
+ :param _host_index: set to override the host_index for a single
1655
+ request; this effectively ignores the host_index
1656
+ in the spec for a single request.
1657
+ :type _host_index: int, optional
1658
+ :return: Returns the result object.
1659
+ """ # noqa: E501
1660
+
1661
+ _param = self._get_person_thumbnail_serialize(
1662
+ id=id,
1663
+ _request_auth=_request_auth,
1664
+ _content_type=_content_type,
1665
+ _headers=_headers,
1666
+ _host_index=_host_index,
1667
+ )
1668
+
1669
+ _response_types_map: Dict[str, Optional[str]] = {
1670
+ "200": "bytearray",
1671
+ }
1672
+ response_data = await self.api_client.call_api(
1673
+ *_param, _request_timeout=_request_timeout
1674
+ )
1675
+ await response_data.read()
1676
+ return self.api_client.response_deserialize(
1677
+ response_data=response_data,
1678
+ response_types_map=_response_types_map,
1679
+ ).data
1680
+
1681
+ @validate_call
1682
+ async def get_person_thumbnail_with_http_info(
1683
+ self,
1684
+ id: UUID,
1685
+ _request_timeout: Union[
1686
+ None,
1687
+ Annotated[StrictFloat, Field(gt=0)],
1688
+ Tuple[
1689
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1690
+ ],
1691
+ ] = None,
1692
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1693
+ _content_type: Optional[StrictStr] = None,
1694
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1695
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1696
+ ) -> ApiResponse[bytearray]:
1697
+ """Get person thumbnail
1698
+
1699
+ Retrieve the thumbnail file for a person.
1700
+
1701
+ :param id: (required)
1702
+ :type id: UUID
1703
+ :param _request_timeout: timeout setting for this request. If one
1704
+ number provided, it will be total request
1705
+ timeout. It can also be a pair (tuple) of
1706
+ (connection, read) timeouts.
1707
+ :type _request_timeout: int, tuple(int, int), optional
1708
+ :param _request_auth: set to override the auth_settings for an a single
1709
+ request; this effectively ignores the
1710
+ authentication in the spec for a single request.
1711
+ :type _request_auth: dict, optional
1712
+ :param _content_type: force content-type for the request.
1713
+ :type _content_type: str, Optional
1714
+ :param _headers: set to override the headers for a single
1715
+ request; this effectively ignores the headers
1716
+ in the spec for a single request.
1717
+ :type _headers: dict, optional
1718
+ :param _host_index: set to override the host_index for a single
1719
+ request; this effectively ignores the host_index
1720
+ in the spec for a single request.
1721
+ :type _host_index: int, optional
1722
+ :return: Returns the result object.
1723
+ """ # noqa: E501
1724
+
1725
+ _param = self._get_person_thumbnail_serialize(
1726
+ id=id,
1727
+ _request_auth=_request_auth,
1728
+ _content_type=_content_type,
1729
+ _headers=_headers,
1730
+ _host_index=_host_index,
1731
+ )
1732
+
1733
+ _response_types_map: Dict[str, Optional[str]] = {
1734
+ "200": "bytearray",
1735
+ }
1736
+ response_data = await self.api_client.call_api(
1737
+ *_param, _request_timeout=_request_timeout
1738
+ )
1739
+ await response_data.read()
1740
+ return self.api_client.response_deserialize(
1741
+ response_data=response_data,
1742
+ response_types_map=_response_types_map,
1743
+ )
1744
+
1745
+ @validate_call
1746
+ async def get_person_thumbnail_without_preload_content(
1747
+ self,
1748
+ id: UUID,
1749
+ _request_timeout: Union[
1750
+ None,
1751
+ Annotated[StrictFloat, Field(gt=0)],
1752
+ Tuple[
1753
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1754
+ ],
1755
+ ] = None,
1756
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1757
+ _content_type: Optional[StrictStr] = None,
1758
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1759
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1760
+ ) -> RESTResponseType:
1761
+ """Get person thumbnail
1762
+
1763
+ Retrieve the thumbnail file for a person.
1764
+
1765
+ :param id: (required)
1766
+ :type id: UUID
1767
+ :param _request_timeout: timeout setting for this request. If one
1768
+ number provided, it will be total request
1769
+ timeout. It can also be a pair (tuple) of
1770
+ (connection, read) timeouts.
1771
+ :type _request_timeout: int, tuple(int, int), optional
1772
+ :param _request_auth: set to override the auth_settings for an a single
1773
+ request; this effectively ignores the
1774
+ authentication in the spec for a single request.
1775
+ :type _request_auth: dict, optional
1776
+ :param _content_type: force content-type for the request.
1777
+ :type _content_type: str, Optional
1778
+ :param _headers: set to override the headers for a single
1779
+ request; this effectively ignores the headers
1780
+ in the spec for a single request.
1781
+ :type _headers: dict, optional
1782
+ :param _host_index: set to override the host_index for a single
1783
+ request; this effectively ignores the host_index
1784
+ in the spec for a single request.
1785
+ :type _host_index: int, optional
1786
+ :return: Returns the result object.
1787
+ """ # noqa: E501
1788
+
1789
+ _param = self._get_person_thumbnail_serialize(
1790
+ id=id,
1791
+ _request_auth=_request_auth,
1792
+ _content_type=_content_type,
1793
+ _headers=_headers,
1794
+ _host_index=_host_index,
1795
+ )
1796
+
1797
+ _response_types_map: Dict[str, Optional[str]] = {
1798
+ "200": "bytearray",
1799
+ }
1800
+ response_data = await self.api_client.call_api(
1801
+ *_param, _request_timeout=_request_timeout
1802
+ )
1803
+ return response_data.response
1804
+
1805
+ def _get_person_thumbnail_serialize(
1806
+ self,
1807
+ id,
1808
+ _request_auth,
1809
+ _content_type,
1810
+ _headers,
1811
+ _host_index,
1812
+ ) -> RequestSerialized:
1813
+ _host = None
1814
+
1815
+ _collection_formats: Dict[str, str] = {}
1816
+
1817
+ _path_params: Dict[str, str] = {}
1818
+ _query_params: List[Tuple[str, str]] = []
1819
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1820
+ _form_params: List[Tuple[str, str]] = []
1821
+ _files: Dict[
1822
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1823
+ ] = {}
1824
+ _body_params: Optional[bytes] = None
1825
+
1826
+ # process the path parameters
1827
+ if id is not None:
1828
+ _path_params["id"] = id
1829
+ # process the query parameters
1830
+ # process the header parameters
1831
+ # process the form parameters
1832
+ # process the body parameter
1833
+
1834
+ # set the HTTP header `Accept`
1835
+ if "Accept" not in _header_params:
1836
+ _header_params["Accept"] = self.api_client.select_header_accept(
1837
+ ["application/octet-stream"]
1838
+ )
1839
+
1840
+ # authentication setting
1841
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1842
+
1843
+ return self.api_client.param_serialize(
1844
+ method="GET",
1845
+ resource_path="/people/{id}/thumbnail",
1846
+ path_params=_path_params,
1847
+ query_params=_query_params,
1848
+ header_params=_header_params,
1849
+ body=_body_params,
1850
+ post_params=_form_params,
1851
+ files=_files,
1852
+ auth_settings=_auth_settings,
1853
+ collection_formats=_collection_formats,
1854
+ _host=_host,
1855
+ _request_auth=_request_auth,
1856
+ )
1857
+
1858
+ @validate_call
1859
+ async def merge_person(
1860
+ self,
1861
+ id: UUID,
1862
+ merge_person_dto: MergePersonDto,
1863
+ _request_timeout: Union[
1864
+ None,
1865
+ Annotated[StrictFloat, Field(gt=0)],
1866
+ Tuple[
1867
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1868
+ ],
1869
+ ] = None,
1870
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1871
+ _content_type: Optional[StrictStr] = None,
1872
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1873
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1874
+ ) -> List[BulkIdResponseDto]:
1875
+ """Merge people
1876
+
1877
+ Merge a list of people into the person specified in the path parameter.
1878
+
1879
+ :param id: (required)
1880
+ :type id: UUID
1881
+ :param merge_person_dto: (required)
1882
+ :type merge_person_dto: MergePersonDto
1883
+ :param _request_timeout: timeout setting for this request. If one
1884
+ number provided, it will be total request
1885
+ timeout. It can also be a pair (tuple) of
1886
+ (connection, read) timeouts.
1887
+ :type _request_timeout: int, tuple(int, int), optional
1888
+ :param _request_auth: set to override the auth_settings for an a single
1889
+ request; this effectively ignores the
1890
+ authentication in the spec for a single request.
1891
+ :type _request_auth: dict, optional
1892
+ :param _content_type: force content-type for the request.
1893
+ :type _content_type: str, Optional
1894
+ :param _headers: set to override the headers for a single
1895
+ request; this effectively ignores the headers
1896
+ in the spec for a single request.
1897
+ :type _headers: dict, optional
1898
+ :param _host_index: set to override the host_index for a single
1899
+ request; this effectively ignores the host_index
1900
+ in the spec for a single request.
1901
+ :type _host_index: int, optional
1902
+ :return: Returns the result object.
1903
+ """ # noqa: E501
1904
+
1905
+ _param = self._merge_person_serialize(
1906
+ id=id,
1907
+ merge_person_dto=merge_person_dto,
1908
+ _request_auth=_request_auth,
1909
+ _content_type=_content_type,
1910
+ _headers=_headers,
1911
+ _host_index=_host_index,
1912
+ )
1913
+
1914
+ _response_types_map: Dict[str, Optional[str]] = {
1915
+ "200": "List[BulkIdResponseDto]",
1916
+ }
1917
+ response_data = await self.api_client.call_api(
1918
+ *_param, _request_timeout=_request_timeout
1919
+ )
1920
+ await response_data.read()
1921
+ return self.api_client.response_deserialize(
1922
+ response_data=response_data,
1923
+ response_types_map=_response_types_map,
1924
+ ).data
1925
+
1926
+ @validate_call
1927
+ async def merge_person_with_http_info(
1928
+ self,
1929
+ id: UUID,
1930
+ merge_person_dto: MergePersonDto,
1931
+ _request_timeout: Union[
1932
+ None,
1933
+ Annotated[StrictFloat, Field(gt=0)],
1934
+ Tuple[
1935
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1936
+ ],
1937
+ ] = None,
1938
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1939
+ _content_type: Optional[StrictStr] = None,
1940
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1941
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1942
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
1943
+ """Merge people
1944
+
1945
+ Merge a list of people into the person specified in the path parameter.
1946
+
1947
+ :param id: (required)
1948
+ :type id: UUID
1949
+ :param merge_person_dto: (required)
1950
+ :type merge_person_dto: MergePersonDto
1951
+ :param _request_timeout: timeout setting for this request. If one
1952
+ number provided, it will be total request
1953
+ timeout. It can also be a pair (tuple) of
1954
+ (connection, read) timeouts.
1955
+ :type _request_timeout: int, tuple(int, int), optional
1956
+ :param _request_auth: set to override the auth_settings for an a single
1957
+ request; this effectively ignores the
1958
+ authentication in the spec for a single request.
1959
+ :type _request_auth: dict, optional
1960
+ :param _content_type: force content-type for the request.
1961
+ :type _content_type: str, Optional
1962
+ :param _headers: set to override the headers for a single
1963
+ request; this effectively ignores the headers
1964
+ in the spec for a single request.
1965
+ :type _headers: dict, optional
1966
+ :param _host_index: set to override the host_index for a single
1967
+ request; this effectively ignores the host_index
1968
+ in the spec for a single request.
1969
+ :type _host_index: int, optional
1970
+ :return: Returns the result object.
1971
+ """ # noqa: E501
1972
+
1973
+ _param = self._merge_person_serialize(
1974
+ id=id,
1975
+ merge_person_dto=merge_person_dto,
1976
+ _request_auth=_request_auth,
1977
+ _content_type=_content_type,
1978
+ _headers=_headers,
1979
+ _host_index=_host_index,
1980
+ )
1981
+
1982
+ _response_types_map: Dict[str, Optional[str]] = {
1983
+ "200": "List[BulkIdResponseDto]",
1984
+ }
1985
+ response_data = await self.api_client.call_api(
1986
+ *_param, _request_timeout=_request_timeout
1987
+ )
1988
+ await response_data.read()
1989
+ return self.api_client.response_deserialize(
1990
+ response_data=response_data,
1991
+ response_types_map=_response_types_map,
1992
+ )
1993
+
1994
+ @validate_call
1995
+ async def merge_person_without_preload_content(
1996
+ self,
1997
+ id: UUID,
1998
+ merge_person_dto: MergePersonDto,
1999
+ _request_timeout: Union[
2000
+ None,
2001
+ Annotated[StrictFloat, Field(gt=0)],
2002
+ Tuple[
2003
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2004
+ ],
2005
+ ] = None,
2006
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2007
+ _content_type: Optional[StrictStr] = None,
2008
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2009
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2010
+ ) -> RESTResponseType:
2011
+ """Merge people
2012
+
2013
+ Merge a list of people into the person specified in the path parameter.
2014
+
2015
+ :param id: (required)
2016
+ :type id: UUID
2017
+ :param merge_person_dto: (required)
2018
+ :type merge_person_dto: MergePersonDto
2019
+ :param _request_timeout: timeout setting for this request. If one
2020
+ number provided, it will be total request
2021
+ timeout. It can also be a pair (tuple) of
2022
+ (connection, read) timeouts.
2023
+ :type _request_timeout: int, tuple(int, int), optional
2024
+ :param _request_auth: set to override the auth_settings for an a single
2025
+ request; this effectively ignores the
2026
+ authentication in the spec for a single request.
2027
+ :type _request_auth: dict, optional
2028
+ :param _content_type: force content-type for the request.
2029
+ :type _content_type: str, Optional
2030
+ :param _headers: set to override the headers for a single
2031
+ request; this effectively ignores the headers
2032
+ in the spec for a single request.
2033
+ :type _headers: dict, optional
2034
+ :param _host_index: set to override the host_index for a single
2035
+ request; this effectively ignores the host_index
2036
+ in the spec for a single request.
2037
+ :type _host_index: int, optional
2038
+ :return: Returns the result object.
2039
+ """ # noqa: E501
2040
+
2041
+ _param = self._merge_person_serialize(
2042
+ id=id,
2043
+ merge_person_dto=merge_person_dto,
2044
+ _request_auth=_request_auth,
2045
+ _content_type=_content_type,
2046
+ _headers=_headers,
2047
+ _host_index=_host_index,
2048
+ )
2049
+
2050
+ _response_types_map: Dict[str, Optional[str]] = {
2051
+ "200": "List[BulkIdResponseDto]",
2052
+ }
2053
+ response_data = await self.api_client.call_api(
2054
+ *_param, _request_timeout=_request_timeout
2055
+ )
2056
+ return response_data.response
2057
+
2058
+ def _merge_person_serialize(
2059
+ self,
2060
+ id,
2061
+ merge_person_dto,
2062
+ _request_auth,
2063
+ _content_type,
2064
+ _headers,
2065
+ _host_index,
2066
+ ) -> RequestSerialized:
2067
+ _host = None
2068
+
2069
+ _collection_formats: Dict[str, str] = {}
2070
+
2071
+ _path_params: Dict[str, str] = {}
2072
+ _query_params: List[Tuple[str, str]] = []
2073
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2074
+ _form_params: List[Tuple[str, str]] = []
2075
+ _files: Dict[
2076
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2077
+ ] = {}
2078
+ _body_params: Optional[bytes] = None
2079
+
2080
+ # process the path parameters
2081
+ if id is not None:
2082
+ _path_params["id"] = id
2083
+ # process the query parameters
2084
+ # process the header parameters
2085
+ # process the form parameters
2086
+ # process the body parameter
2087
+ if merge_person_dto is not None:
2088
+ _body_params = merge_person_dto
2089
+
2090
+ # set the HTTP header `Accept`
2091
+ if "Accept" not in _header_params:
2092
+ _header_params["Accept"] = self.api_client.select_header_accept(
2093
+ ["application/json"]
2094
+ )
2095
+
2096
+ # set the HTTP header `Content-Type`
2097
+ if _content_type:
2098
+ _header_params["Content-Type"] = _content_type
2099
+ else:
2100
+ _default_content_type = self.api_client.select_header_content_type(
2101
+ ["application/json"]
2102
+ )
2103
+ if _default_content_type is not None:
2104
+ _header_params["Content-Type"] = _default_content_type
2105
+
2106
+ # authentication setting
2107
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2108
+
2109
+ return self.api_client.param_serialize(
2110
+ method="POST",
2111
+ resource_path="/people/{id}/merge",
2112
+ path_params=_path_params,
2113
+ query_params=_query_params,
2114
+ header_params=_header_params,
2115
+ body=_body_params,
2116
+ post_params=_form_params,
2117
+ files=_files,
2118
+ auth_settings=_auth_settings,
2119
+ collection_formats=_collection_formats,
2120
+ _host=_host,
2121
+ _request_auth=_request_auth,
2122
+ )
2123
+
2124
+ @validate_call
2125
+ async def reassign_faces(
2126
+ self,
2127
+ id: UUID,
2128
+ asset_face_update_dto: AssetFaceUpdateDto,
2129
+ _request_timeout: Union[
2130
+ None,
2131
+ Annotated[StrictFloat, Field(gt=0)],
2132
+ Tuple[
2133
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2134
+ ],
2135
+ ] = None,
2136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2137
+ _content_type: Optional[StrictStr] = None,
2138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2140
+ ) -> List[PersonResponseDto]:
2141
+ """Reassign faces
2142
+
2143
+ Bulk reassign a list of faces to a different person.
2144
+
2145
+ :param id: (required)
2146
+ :type id: UUID
2147
+ :param asset_face_update_dto: (required)
2148
+ :type asset_face_update_dto: AssetFaceUpdateDto
2149
+ :param _request_timeout: timeout setting for this request. If one
2150
+ number provided, it will be total request
2151
+ timeout. It can also be a pair (tuple) of
2152
+ (connection, read) timeouts.
2153
+ :type _request_timeout: int, tuple(int, int), optional
2154
+ :param _request_auth: set to override the auth_settings for an a single
2155
+ request; this effectively ignores the
2156
+ authentication in the spec for a single request.
2157
+ :type _request_auth: dict, optional
2158
+ :param _content_type: force content-type for the request.
2159
+ :type _content_type: str, Optional
2160
+ :param _headers: set to override the headers for a single
2161
+ request; this effectively ignores the headers
2162
+ in the spec for a single request.
2163
+ :type _headers: dict, optional
2164
+ :param _host_index: set to override the host_index for a single
2165
+ request; this effectively ignores the host_index
2166
+ in the spec for a single request.
2167
+ :type _host_index: int, optional
2168
+ :return: Returns the result object.
2169
+ """ # noqa: E501
2170
+
2171
+ _param = self._reassign_faces_serialize(
2172
+ id=id,
2173
+ asset_face_update_dto=asset_face_update_dto,
2174
+ _request_auth=_request_auth,
2175
+ _content_type=_content_type,
2176
+ _headers=_headers,
2177
+ _host_index=_host_index,
2178
+ )
2179
+
2180
+ _response_types_map: Dict[str, Optional[str]] = {
2181
+ "200": "List[PersonResponseDto]",
2182
+ }
2183
+ response_data = await self.api_client.call_api(
2184
+ *_param, _request_timeout=_request_timeout
2185
+ )
2186
+ await response_data.read()
2187
+ return self.api_client.response_deserialize(
2188
+ response_data=response_data,
2189
+ response_types_map=_response_types_map,
2190
+ ).data
2191
+
2192
+ @validate_call
2193
+ async def reassign_faces_with_http_info(
2194
+ self,
2195
+ id: UUID,
2196
+ asset_face_update_dto: AssetFaceUpdateDto,
2197
+ _request_timeout: Union[
2198
+ None,
2199
+ Annotated[StrictFloat, Field(gt=0)],
2200
+ Tuple[
2201
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2202
+ ],
2203
+ ] = None,
2204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2205
+ _content_type: Optional[StrictStr] = None,
2206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2208
+ ) -> ApiResponse[List[PersonResponseDto]]:
2209
+ """Reassign faces
2210
+
2211
+ Bulk reassign a list of faces to a different person.
2212
+
2213
+ :param id: (required)
2214
+ :type id: UUID
2215
+ :param asset_face_update_dto: (required)
2216
+ :type asset_face_update_dto: AssetFaceUpdateDto
2217
+ :param _request_timeout: timeout setting for this request. If one
2218
+ number provided, it will be total request
2219
+ timeout. It can also be a pair (tuple) of
2220
+ (connection, read) timeouts.
2221
+ :type _request_timeout: int, tuple(int, int), optional
2222
+ :param _request_auth: set to override the auth_settings for an a single
2223
+ request; this effectively ignores the
2224
+ authentication in the spec for a single request.
2225
+ :type _request_auth: dict, optional
2226
+ :param _content_type: force content-type for the request.
2227
+ :type _content_type: str, Optional
2228
+ :param _headers: set to override the headers for a single
2229
+ request; this effectively ignores the headers
2230
+ in the spec for a single request.
2231
+ :type _headers: dict, optional
2232
+ :param _host_index: set to override the host_index for a single
2233
+ request; this effectively ignores the host_index
2234
+ in the spec for a single request.
2235
+ :type _host_index: int, optional
2236
+ :return: Returns the result object.
2237
+ """ # noqa: E501
2238
+
2239
+ _param = self._reassign_faces_serialize(
2240
+ id=id,
2241
+ asset_face_update_dto=asset_face_update_dto,
2242
+ _request_auth=_request_auth,
2243
+ _content_type=_content_type,
2244
+ _headers=_headers,
2245
+ _host_index=_host_index,
2246
+ )
2247
+
2248
+ _response_types_map: Dict[str, Optional[str]] = {
2249
+ "200": "List[PersonResponseDto]",
2250
+ }
2251
+ response_data = await self.api_client.call_api(
2252
+ *_param, _request_timeout=_request_timeout
2253
+ )
2254
+ await response_data.read()
2255
+ return self.api_client.response_deserialize(
2256
+ response_data=response_data,
2257
+ response_types_map=_response_types_map,
2258
+ )
2259
+
2260
+ @validate_call
2261
+ async def reassign_faces_without_preload_content(
2262
+ self,
2263
+ id: UUID,
2264
+ asset_face_update_dto: AssetFaceUpdateDto,
2265
+ _request_timeout: Union[
2266
+ None,
2267
+ Annotated[StrictFloat, Field(gt=0)],
2268
+ Tuple[
2269
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2270
+ ],
2271
+ ] = None,
2272
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2273
+ _content_type: Optional[StrictStr] = None,
2274
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2275
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2276
+ ) -> RESTResponseType:
2277
+ """Reassign faces
2278
+
2279
+ Bulk reassign a list of faces to a different person.
2280
+
2281
+ :param id: (required)
2282
+ :type id: UUID
2283
+ :param asset_face_update_dto: (required)
2284
+ :type asset_face_update_dto: AssetFaceUpdateDto
2285
+ :param _request_timeout: timeout setting for this request. If one
2286
+ number provided, it will be total request
2287
+ timeout. It can also be a pair (tuple) of
2288
+ (connection, read) timeouts.
2289
+ :type _request_timeout: int, tuple(int, int), optional
2290
+ :param _request_auth: set to override the auth_settings for an a single
2291
+ request; this effectively ignores the
2292
+ authentication in the spec for a single request.
2293
+ :type _request_auth: dict, optional
2294
+ :param _content_type: force content-type for the request.
2295
+ :type _content_type: str, Optional
2296
+ :param _headers: set to override the headers for a single
2297
+ request; this effectively ignores the headers
2298
+ in the spec for a single request.
2299
+ :type _headers: dict, optional
2300
+ :param _host_index: set to override the host_index for a single
2301
+ request; this effectively ignores the host_index
2302
+ in the spec for a single request.
2303
+ :type _host_index: int, optional
2304
+ :return: Returns the result object.
2305
+ """ # noqa: E501
2306
+
2307
+ _param = self._reassign_faces_serialize(
2308
+ id=id,
2309
+ asset_face_update_dto=asset_face_update_dto,
2310
+ _request_auth=_request_auth,
2311
+ _content_type=_content_type,
2312
+ _headers=_headers,
2313
+ _host_index=_host_index,
2314
+ )
2315
+
2316
+ _response_types_map: Dict[str, Optional[str]] = {
2317
+ "200": "List[PersonResponseDto]",
2318
+ }
2319
+ response_data = await self.api_client.call_api(
2320
+ *_param, _request_timeout=_request_timeout
2321
+ )
2322
+ return response_data.response
2323
+
2324
+ def _reassign_faces_serialize(
2325
+ self,
2326
+ id,
2327
+ asset_face_update_dto,
2328
+ _request_auth,
2329
+ _content_type,
2330
+ _headers,
2331
+ _host_index,
2332
+ ) -> RequestSerialized:
2333
+ _host = None
2334
+
2335
+ _collection_formats: Dict[str, str] = {}
2336
+
2337
+ _path_params: Dict[str, str] = {}
2338
+ _query_params: List[Tuple[str, str]] = []
2339
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2340
+ _form_params: List[Tuple[str, str]] = []
2341
+ _files: Dict[
2342
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2343
+ ] = {}
2344
+ _body_params: Optional[bytes] = None
2345
+
2346
+ # process the path parameters
2347
+ if id is not None:
2348
+ _path_params["id"] = id
2349
+ # process the query parameters
2350
+ # process the header parameters
2351
+ # process the form parameters
2352
+ # process the body parameter
2353
+ if asset_face_update_dto is not None:
2354
+ _body_params = asset_face_update_dto
2355
+
2356
+ # set the HTTP header `Accept`
2357
+ if "Accept" not in _header_params:
2358
+ _header_params["Accept"] = self.api_client.select_header_accept(
2359
+ ["application/json"]
2360
+ )
2361
+
2362
+ # set the HTTP header `Content-Type`
2363
+ if _content_type:
2364
+ _header_params["Content-Type"] = _content_type
2365
+ else:
2366
+ _default_content_type = self.api_client.select_header_content_type(
2367
+ ["application/json"]
2368
+ )
2369
+ if _default_content_type is not None:
2370
+ _header_params["Content-Type"] = _default_content_type
2371
+
2372
+ # authentication setting
2373
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2374
+
2375
+ return self.api_client.param_serialize(
2376
+ method="PUT",
2377
+ resource_path="/people/{id}/reassign",
2378
+ path_params=_path_params,
2379
+ query_params=_query_params,
2380
+ header_params=_header_params,
2381
+ body=_body_params,
2382
+ post_params=_form_params,
2383
+ files=_files,
2384
+ auth_settings=_auth_settings,
2385
+ collection_formats=_collection_formats,
2386
+ _host=_host,
2387
+ _request_auth=_request_auth,
2388
+ )
2389
+
2390
+ @validate_call
2391
+ async def update_people(
2392
+ self,
2393
+ people_update_dto: PeopleUpdateDto,
2394
+ _request_timeout: Union[
2395
+ None,
2396
+ Annotated[StrictFloat, Field(gt=0)],
2397
+ Tuple[
2398
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2399
+ ],
2400
+ ] = None,
2401
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2402
+ _content_type: Optional[StrictStr] = None,
2403
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2404
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2405
+ ) -> List[BulkIdResponseDto]:
2406
+ """Update people
2407
+
2408
+ Bulk update multiple people at once.
2409
+
2410
+ :param people_update_dto: (required)
2411
+ :type people_update_dto: PeopleUpdateDto
2412
+ :param _request_timeout: timeout setting for this request. If one
2413
+ number provided, it will be total request
2414
+ timeout. It can also be a pair (tuple) of
2415
+ (connection, read) timeouts.
2416
+ :type _request_timeout: int, tuple(int, int), optional
2417
+ :param _request_auth: set to override the auth_settings for an a single
2418
+ request; this effectively ignores the
2419
+ authentication in the spec for a single request.
2420
+ :type _request_auth: dict, optional
2421
+ :param _content_type: force content-type for the request.
2422
+ :type _content_type: str, Optional
2423
+ :param _headers: set to override the headers for a single
2424
+ request; this effectively ignores the headers
2425
+ in the spec for a single request.
2426
+ :type _headers: dict, optional
2427
+ :param _host_index: set to override the host_index for a single
2428
+ request; this effectively ignores the host_index
2429
+ in the spec for a single request.
2430
+ :type _host_index: int, optional
2431
+ :return: Returns the result object.
2432
+ """ # noqa: E501
2433
+
2434
+ _param = self._update_people_serialize(
2435
+ people_update_dto=people_update_dto,
2436
+ _request_auth=_request_auth,
2437
+ _content_type=_content_type,
2438
+ _headers=_headers,
2439
+ _host_index=_host_index,
2440
+ )
2441
+
2442
+ _response_types_map: Dict[str, Optional[str]] = {
2443
+ "200": "List[BulkIdResponseDto]",
2444
+ }
2445
+ response_data = await self.api_client.call_api(
2446
+ *_param, _request_timeout=_request_timeout
2447
+ )
2448
+ await response_data.read()
2449
+ return self.api_client.response_deserialize(
2450
+ response_data=response_data,
2451
+ response_types_map=_response_types_map,
2452
+ ).data
2453
+
2454
+ @validate_call
2455
+ async def update_people_with_http_info(
2456
+ self,
2457
+ people_update_dto: PeopleUpdateDto,
2458
+ _request_timeout: Union[
2459
+ None,
2460
+ Annotated[StrictFloat, Field(gt=0)],
2461
+ Tuple[
2462
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2463
+ ],
2464
+ ] = None,
2465
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2466
+ _content_type: Optional[StrictStr] = None,
2467
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2468
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2469
+ ) -> ApiResponse[List[BulkIdResponseDto]]:
2470
+ """Update people
2471
+
2472
+ Bulk update multiple people at once.
2473
+
2474
+ :param people_update_dto: (required)
2475
+ :type people_update_dto: PeopleUpdateDto
2476
+ :param _request_timeout: timeout setting for this request. If one
2477
+ number provided, it will be total request
2478
+ timeout. It can also be a pair (tuple) of
2479
+ (connection, read) timeouts.
2480
+ :type _request_timeout: int, tuple(int, int), optional
2481
+ :param _request_auth: set to override the auth_settings for an a single
2482
+ request; this effectively ignores the
2483
+ authentication in the spec for a single request.
2484
+ :type _request_auth: dict, optional
2485
+ :param _content_type: force content-type for the request.
2486
+ :type _content_type: str, Optional
2487
+ :param _headers: set to override the headers for a single
2488
+ request; this effectively ignores the headers
2489
+ in the spec for a single request.
2490
+ :type _headers: dict, optional
2491
+ :param _host_index: set to override the host_index for a single
2492
+ request; this effectively ignores the host_index
2493
+ in the spec for a single request.
2494
+ :type _host_index: int, optional
2495
+ :return: Returns the result object.
2496
+ """ # noqa: E501
2497
+
2498
+ _param = self._update_people_serialize(
2499
+ people_update_dto=people_update_dto,
2500
+ _request_auth=_request_auth,
2501
+ _content_type=_content_type,
2502
+ _headers=_headers,
2503
+ _host_index=_host_index,
2504
+ )
2505
+
2506
+ _response_types_map: Dict[str, Optional[str]] = {
2507
+ "200": "List[BulkIdResponseDto]",
2508
+ }
2509
+ response_data = await self.api_client.call_api(
2510
+ *_param, _request_timeout=_request_timeout
2511
+ )
2512
+ await response_data.read()
2513
+ return self.api_client.response_deserialize(
2514
+ response_data=response_data,
2515
+ response_types_map=_response_types_map,
2516
+ )
2517
+
2518
+ @validate_call
2519
+ async def update_people_without_preload_content(
2520
+ self,
2521
+ people_update_dto: PeopleUpdateDto,
2522
+ _request_timeout: Union[
2523
+ None,
2524
+ Annotated[StrictFloat, Field(gt=0)],
2525
+ Tuple[
2526
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2527
+ ],
2528
+ ] = None,
2529
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2530
+ _content_type: Optional[StrictStr] = None,
2531
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2532
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2533
+ ) -> RESTResponseType:
2534
+ """Update people
2535
+
2536
+ Bulk update multiple people at once.
2537
+
2538
+ :param people_update_dto: (required)
2539
+ :type people_update_dto: PeopleUpdateDto
2540
+ :param _request_timeout: timeout setting for this request. If one
2541
+ number provided, it will be total request
2542
+ timeout. It can also be a pair (tuple) of
2543
+ (connection, read) timeouts.
2544
+ :type _request_timeout: int, tuple(int, int), optional
2545
+ :param _request_auth: set to override the auth_settings for an a single
2546
+ request; this effectively ignores the
2547
+ authentication in the spec for a single request.
2548
+ :type _request_auth: dict, optional
2549
+ :param _content_type: force content-type for the request.
2550
+ :type _content_type: str, Optional
2551
+ :param _headers: set to override the headers for a single
2552
+ request; this effectively ignores the headers
2553
+ in the spec for a single request.
2554
+ :type _headers: dict, optional
2555
+ :param _host_index: set to override the host_index for a single
2556
+ request; this effectively ignores the host_index
2557
+ in the spec for a single request.
2558
+ :type _host_index: int, optional
2559
+ :return: Returns the result object.
2560
+ """ # noqa: E501
2561
+
2562
+ _param = self._update_people_serialize(
2563
+ people_update_dto=people_update_dto,
2564
+ _request_auth=_request_auth,
2565
+ _content_type=_content_type,
2566
+ _headers=_headers,
2567
+ _host_index=_host_index,
2568
+ )
2569
+
2570
+ _response_types_map: Dict[str, Optional[str]] = {
2571
+ "200": "List[BulkIdResponseDto]",
2572
+ }
2573
+ response_data = await self.api_client.call_api(
2574
+ *_param, _request_timeout=_request_timeout
2575
+ )
2576
+ return response_data.response
2577
+
2578
+ def _update_people_serialize(
2579
+ self,
2580
+ people_update_dto,
2581
+ _request_auth,
2582
+ _content_type,
2583
+ _headers,
2584
+ _host_index,
2585
+ ) -> RequestSerialized:
2586
+ _host = None
2587
+
2588
+ _collection_formats: Dict[str, str] = {}
2589
+
2590
+ _path_params: Dict[str, str] = {}
2591
+ _query_params: List[Tuple[str, str]] = []
2592
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2593
+ _form_params: List[Tuple[str, str]] = []
2594
+ _files: Dict[
2595
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2596
+ ] = {}
2597
+ _body_params: Optional[bytes] = None
2598
+
2599
+ # process the path parameters
2600
+ # process the query parameters
2601
+ # process the header parameters
2602
+ # process the form parameters
2603
+ # process the body parameter
2604
+ if people_update_dto is not None:
2605
+ _body_params = people_update_dto
2606
+
2607
+ # set the HTTP header `Accept`
2608
+ if "Accept" not in _header_params:
2609
+ _header_params["Accept"] = self.api_client.select_header_accept(
2610
+ ["application/json"]
2611
+ )
2612
+
2613
+ # set the HTTP header `Content-Type`
2614
+ if _content_type:
2615
+ _header_params["Content-Type"] = _content_type
2616
+ else:
2617
+ _default_content_type = self.api_client.select_header_content_type(
2618
+ ["application/json"]
2619
+ )
2620
+ if _default_content_type is not None:
2621
+ _header_params["Content-Type"] = _default_content_type
2622
+
2623
+ # authentication setting
2624
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2625
+
2626
+ return self.api_client.param_serialize(
2627
+ method="PUT",
2628
+ resource_path="/people",
2629
+ path_params=_path_params,
2630
+ query_params=_query_params,
2631
+ header_params=_header_params,
2632
+ body=_body_params,
2633
+ post_params=_form_params,
2634
+ files=_files,
2635
+ auth_settings=_auth_settings,
2636
+ collection_formats=_collection_formats,
2637
+ _host=_host,
2638
+ _request_auth=_request_auth,
2639
+ )
2640
+
2641
+ @validate_call
2642
+ async def update_person(
2643
+ self,
2644
+ id: UUID,
2645
+ person_update_dto: PersonUpdateDto,
2646
+ _request_timeout: Union[
2647
+ None,
2648
+ Annotated[StrictFloat, Field(gt=0)],
2649
+ Tuple[
2650
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2651
+ ],
2652
+ ] = None,
2653
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2654
+ _content_type: Optional[StrictStr] = None,
2655
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2656
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2657
+ ) -> PersonResponseDto:
2658
+ """Update person
2659
+
2660
+ Update an individual person.
2661
+
2662
+ :param id: (required)
2663
+ :type id: UUID
2664
+ :param person_update_dto: (required)
2665
+ :type person_update_dto: PersonUpdateDto
2666
+ :param _request_timeout: timeout setting for this request. If one
2667
+ number provided, it will be total request
2668
+ timeout. It can also be a pair (tuple) of
2669
+ (connection, read) timeouts.
2670
+ :type _request_timeout: int, tuple(int, int), optional
2671
+ :param _request_auth: set to override the auth_settings for an a single
2672
+ request; this effectively ignores the
2673
+ authentication in the spec for a single request.
2674
+ :type _request_auth: dict, optional
2675
+ :param _content_type: force content-type for the request.
2676
+ :type _content_type: str, Optional
2677
+ :param _headers: set to override the headers for a single
2678
+ request; this effectively ignores the headers
2679
+ in the spec for a single request.
2680
+ :type _headers: dict, optional
2681
+ :param _host_index: set to override the host_index for a single
2682
+ request; this effectively ignores the host_index
2683
+ in the spec for a single request.
2684
+ :type _host_index: int, optional
2685
+ :return: Returns the result object.
2686
+ """ # noqa: E501
2687
+
2688
+ _param = self._update_person_serialize(
2689
+ id=id,
2690
+ person_update_dto=person_update_dto,
2691
+ _request_auth=_request_auth,
2692
+ _content_type=_content_type,
2693
+ _headers=_headers,
2694
+ _host_index=_host_index,
2695
+ )
2696
+
2697
+ _response_types_map: Dict[str, Optional[str]] = {
2698
+ "200": "PersonResponseDto",
2699
+ }
2700
+ response_data = await self.api_client.call_api(
2701
+ *_param, _request_timeout=_request_timeout
2702
+ )
2703
+ await response_data.read()
2704
+ return self.api_client.response_deserialize(
2705
+ response_data=response_data,
2706
+ response_types_map=_response_types_map,
2707
+ ).data
2708
+
2709
+ @validate_call
2710
+ async def update_person_with_http_info(
2711
+ self,
2712
+ id: UUID,
2713
+ person_update_dto: PersonUpdateDto,
2714
+ _request_timeout: Union[
2715
+ None,
2716
+ Annotated[StrictFloat, Field(gt=0)],
2717
+ Tuple[
2718
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2719
+ ],
2720
+ ] = None,
2721
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2722
+ _content_type: Optional[StrictStr] = None,
2723
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2724
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2725
+ ) -> ApiResponse[PersonResponseDto]:
2726
+ """Update person
2727
+
2728
+ Update an individual person.
2729
+
2730
+ :param id: (required)
2731
+ :type id: UUID
2732
+ :param person_update_dto: (required)
2733
+ :type person_update_dto: PersonUpdateDto
2734
+ :param _request_timeout: timeout setting for this request. If one
2735
+ number provided, it will be total request
2736
+ timeout. It can also be a pair (tuple) of
2737
+ (connection, read) timeouts.
2738
+ :type _request_timeout: int, tuple(int, int), optional
2739
+ :param _request_auth: set to override the auth_settings for an a single
2740
+ request; this effectively ignores the
2741
+ authentication in the spec for a single request.
2742
+ :type _request_auth: dict, optional
2743
+ :param _content_type: force content-type for the request.
2744
+ :type _content_type: str, Optional
2745
+ :param _headers: set to override the headers for a single
2746
+ request; this effectively ignores the headers
2747
+ in the spec for a single request.
2748
+ :type _headers: dict, optional
2749
+ :param _host_index: set to override the host_index for a single
2750
+ request; this effectively ignores the host_index
2751
+ in the spec for a single request.
2752
+ :type _host_index: int, optional
2753
+ :return: Returns the result object.
2754
+ """ # noqa: E501
2755
+
2756
+ _param = self._update_person_serialize(
2757
+ id=id,
2758
+ person_update_dto=person_update_dto,
2759
+ _request_auth=_request_auth,
2760
+ _content_type=_content_type,
2761
+ _headers=_headers,
2762
+ _host_index=_host_index,
2763
+ )
2764
+
2765
+ _response_types_map: Dict[str, Optional[str]] = {
2766
+ "200": "PersonResponseDto",
2767
+ }
2768
+ response_data = await self.api_client.call_api(
2769
+ *_param, _request_timeout=_request_timeout
2770
+ )
2771
+ await response_data.read()
2772
+ return self.api_client.response_deserialize(
2773
+ response_data=response_data,
2774
+ response_types_map=_response_types_map,
2775
+ )
2776
+
2777
+ @validate_call
2778
+ async def update_person_without_preload_content(
2779
+ self,
2780
+ id: UUID,
2781
+ person_update_dto: PersonUpdateDto,
2782
+ _request_timeout: Union[
2783
+ None,
2784
+ Annotated[StrictFloat, Field(gt=0)],
2785
+ Tuple[
2786
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
2787
+ ],
2788
+ ] = None,
2789
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2790
+ _content_type: Optional[StrictStr] = None,
2791
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2792
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2793
+ ) -> RESTResponseType:
2794
+ """Update person
2795
+
2796
+ Update an individual person.
2797
+
2798
+ :param id: (required)
2799
+ :type id: UUID
2800
+ :param person_update_dto: (required)
2801
+ :type person_update_dto: PersonUpdateDto
2802
+ :param _request_timeout: timeout setting for this request. If one
2803
+ number provided, it will be total request
2804
+ timeout. It can also be a pair (tuple) of
2805
+ (connection, read) timeouts.
2806
+ :type _request_timeout: int, tuple(int, int), optional
2807
+ :param _request_auth: set to override the auth_settings for an a single
2808
+ request; this effectively ignores the
2809
+ authentication in the spec for a single request.
2810
+ :type _request_auth: dict, optional
2811
+ :param _content_type: force content-type for the request.
2812
+ :type _content_type: str, Optional
2813
+ :param _headers: set to override the headers for a single
2814
+ request; this effectively ignores the headers
2815
+ in the spec for a single request.
2816
+ :type _headers: dict, optional
2817
+ :param _host_index: set to override the host_index for a single
2818
+ request; this effectively ignores the host_index
2819
+ in the spec for a single request.
2820
+ :type _host_index: int, optional
2821
+ :return: Returns the result object.
2822
+ """ # noqa: E501
2823
+
2824
+ _param = self._update_person_serialize(
2825
+ id=id,
2826
+ person_update_dto=person_update_dto,
2827
+ _request_auth=_request_auth,
2828
+ _content_type=_content_type,
2829
+ _headers=_headers,
2830
+ _host_index=_host_index,
2831
+ )
2832
+
2833
+ _response_types_map: Dict[str, Optional[str]] = {
2834
+ "200": "PersonResponseDto",
2835
+ }
2836
+ response_data = await self.api_client.call_api(
2837
+ *_param, _request_timeout=_request_timeout
2838
+ )
2839
+ return response_data.response
2840
+
2841
+ def _update_person_serialize(
2842
+ self,
2843
+ id,
2844
+ person_update_dto,
2845
+ _request_auth,
2846
+ _content_type,
2847
+ _headers,
2848
+ _host_index,
2849
+ ) -> RequestSerialized:
2850
+ _host = None
2851
+
2852
+ _collection_formats: Dict[str, str] = {}
2853
+
2854
+ _path_params: Dict[str, str] = {}
2855
+ _query_params: List[Tuple[str, str]] = []
2856
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2857
+ _form_params: List[Tuple[str, str]] = []
2858
+ _files: Dict[
2859
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
2860
+ ] = {}
2861
+ _body_params: Optional[bytes] = None
2862
+
2863
+ # process the path parameters
2864
+ if id is not None:
2865
+ _path_params["id"] = id
2866
+ # process the query parameters
2867
+ # process the header parameters
2868
+ # process the form parameters
2869
+ # process the body parameter
2870
+ if person_update_dto is not None:
2871
+ _body_params = person_update_dto
2872
+
2873
+ # set the HTTP header `Accept`
2874
+ if "Accept" not in _header_params:
2875
+ _header_params["Accept"] = self.api_client.select_header_accept(
2876
+ ["application/json"]
2877
+ )
2878
+
2879
+ # set the HTTP header `Content-Type`
2880
+ if _content_type:
2881
+ _header_params["Content-Type"] = _content_type
2882
+ else:
2883
+ _default_content_type = self.api_client.select_header_content_type(
2884
+ ["application/json"]
2885
+ )
2886
+ if _default_content_type is not None:
2887
+ _header_params["Content-Type"] = _default_content_type
2888
+
2889
+ # authentication setting
2890
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
2891
+
2892
+ return self.api_client.param_serialize(
2893
+ method="PUT",
2894
+ resource_path="/people/{id}",
2895
+ path_params=_path_params,
2896
+ query_params=_query_params,
2897
+ header_params=_header_params,
2898
+ body=_body_params,
2899
+ post_params=_form_params,
2900
+ files=_files,
2901
+ auth_settings=_auth_settings,
2902
+ collection_formats=_collection_formats,
2903
+ _host=_host,
2904
+ _request_auth=_request_auth,
2905
+ )