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