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,1769 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Immich
5
+
6
+ Immich API
7
+
8
+ The version of the OpenAPI document: 2.4.1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
+ from typing import Any, Dict, List, Optional, Tuple, Union
16
+ from typing_extensions import Annotated
17
+
18
+ from uuid import UUID
19
+ from immich.client.models.bulk_ids_dto import BulkIdsDto
20
+ from immich.client.models.stack_create_dto import StackCreateDto
21
+ from immich.client.models.stack_response_dto import StackResponseDto
22
+ from immich.client.models.stack_update_dto import StackUpdateDto
23
+
24
+ from immich.client.api_client import ApiClient, RequestSerialized
25
+ from immich.client.api_response import ApiResponse
26
+ from immich.client.rest import RESTResponseType
27
+
28
+
29
+ class StacksApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+ @validate_call
42
+ async def create_stack(
43
+ self,
44
+ stack_create_dto: StackCreateDto,
45
+ _request_timeout: Union[
46
+ None,
47
+ Annotated[StrictFloat, Field(gt=0)],
48
+ Tuple[
49
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
50
+ ],
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> StackResponseDto:
57
+ """Create a stack
58
+
59
+ Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
60
+
61
+ :param stack_create_dto: (required)
62
+ :type stack_create_dto: StackCreateDto
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._create_stack_serialize(
86
+ stack_create_dto=stack_create_dto,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index,
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ "201": "StackResponseDto",
95
+ }
96
+ response_data = await self.api_client.call_api(
97
+ *_param, _request_timeout=_request_timeout
98
+ )
99
+ await response_data.read()
100
+ return self.api_client.response_deserialize(
101
+ response_data=response_data,
102
+ response_types_map=_response_types_map,
103
+ ).data
104
+
105
+ @validate_call
106
+ async def create_stack_with_http_info(
107
+ self,
108
+ stack_create_dto: StackCreateDto,
109
+ _request_timeout: Union[
110
+ None,
111
+ Annotated[StrictFloat, Field(gt=0)],
112
+ Tuple[
113
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
114
+ ],
115
+ ] = None,
116
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
117
+ _content_type: Optional[StrictStr] = None,
118
+ _headers: Optional[Dict[StrictStr, Any]] = None,
119
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
120
+ ) -> ApiResponse[StackResponseDto]:
121
+ """Create a stack
122
+
123
+ Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
124
+
125
+ :param stack_create_dto: (required)
126
+ :type stack_create_dto: StackCreateDto
127
+ :param _request_timeout: timeout setting for this request. If one
128
+ number provided, it will be total request
129
+ timeout. It can also be a pair (tuple) of
130
+ (connection, read) timeouts.
131
+ :type _request_timeout: int, tuple(int, int), optional
132
+ :param _request_auth: set to override the auth_settings for an a single
133
+ request; this effectively ignores the
134
+ authentication in the spec for a single request.
135
+ :type _request_auth: dict, optional
136
+ :param _content_type: force content-type for the request.
137
+ :type _content_type: str, Optional
138
+ :param _headers: set to override the headers for a single
139
+ request; this effectively ignores the headers
140
+ in the spec for a single request.
141
+ :type _headers: dict, optional
142
+ :param _host_index: set to override the host_index for a single
143
+ request; this effectively ignores the host_index
144
+ in the spec for a single request.
145
+ :type _host_index: int, optional
146
+ :return: Returns the result object.
147
+ """ # noqa: E501
148
+
149
+ _param = self._create_stack_serialize(
150
+ stack_create_dto=stack_create_dto,
151
+ _request_auth=_request_auth,
152
+ _content_type=_content_type,
153
+ _headers=_headers,
154
+ _host_index=_host_index,
155
+ )
156
+
157
+ _response_types_map: Dict[str, Optional[str]] = {
158
+ "201": "StackResponseDto",
159
+ }
160
+ response_data = await self.api_client.call_api(
161
+ *_param, _request_timeout=_request_timeout
162
+ )
163
+ await response_data.read()
164
+ return self.api_client.response_deserialize(
165
+ response_data=response_data,
166
+ response_types_map=_response_types_map,
167
+ )
168
+
169
+ @validate_call
170
+ async def create_stack_without_preload_content(
171
+ self,
172
+ stack_create_dto: StackCreateDto,
173
+ _request_timeout: Union[
174
+ None,
175
+ Annotated[StrictFloat, Field(gt=0)],
176
+ Tuple[
177
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
178
+ ],
179
+ ] = None,
180
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
181
+ _content_type: Optional[StrictStr] = None,
182
+ _headers: Optional[Dict[StrictStr, Any]] = None,
183
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
184
+ ) -> RESTResponseType:
185
+ """Create a stack
186
+
187
+ Create a new stack by providing a name and a list of asset IDs to include in the stack. If any of the provided asset IDs are primary assets of an existing stack, the existing stack will be merged into the newly created stack.
188
+
189
+ :param stack_create_dto: (required)
190
+ :type stack_create_dto: StackCreateDto
191
+ :param _request_timeout: timeout setting for this request. If one
192
+ number provided, it will be total request
193
+ timeout. It can also be a pair (tuple) of
194
+ (connection, read) timeouts.
195
+ :type _request_timeout: int, tuple(int, int), optional
196
+ :param _request_auth: set to override the auth_settings for an a single
197
+ request; this effectively ignores the
198
+ authentication in the spec for a single request.
199
+ :type _request_auth: dict, optional
200
+ :param _content_type: force content-type for the request.
201
+ :type _content_type: str, Optional
202
+ :param _headers: set to override the headers for a single
203
+ request; this effectively ignores the headers
204
+ in the spec for a single request.
205
+ :type _headers: dict, optional
206
+ :param _host_index: set to override the host_index for a single
207
+ request; this effectively ignores the host_index
208
+ in the spec for a single request.
209
+ :type _host_index: int, optional
210
+ :return: Returns the result object.
211
+ """ # noqa: E501
212
+
213
+ _param = self._create_stack_serialize(
214
+ stack_create_dto=stack_create_dto,
215
+ _request_auth=_request_auth,
216
+ _content_type=_content_type,
217
+ _headers=_headers,
218
+ _host_index=_host_index,
219
+ )
220
+
221
+ _response_types_map: Dict[str, Optional[str]] = {
222
+ "201": "StackResponseDto",
223
+ }
224
+ response_data = await self.api_client.call_api(
225
+ *_param, _request_timeout=_request_timeout
226
+ )
227
+ return response_data.response
228
+
229
+ def _create_stack_serialize(
230
+ self,
231
+ stack_create_dto,
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
+ if stack_create_dto is not None:
256
+ _body_params = stack_create_dto
257
+
258
+ # set the HTTP header `Accept`
259
+ if "Accept" not in _header_params:
260
+ _header_params["Accept"] = self.api_client.select_header_accept(
261
+ ["application/json"]
262
+ )
263
+
264
+ # set the HTTP header `Content-Type`
265
+ if _content_type:
266
+ _header_params["Content-Type"] = _content_type
267
+ else:
268
+ _default_content_type = self.api_client.select_header_content_type(
269
+ ["application/json"]
270
+ )
271
+ if _default_content_type is not None:
272
+ _header_params["Content-Type"] = _default_content_type
273
+
274
+ # authentication setting
275
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
276
+
277
+ return self.api_client.param_serialize(
278
+ method="POST",
279
+ resource_path="/stacks",
280
+ path_params=_path_params,
281
+ query_params=_query_params,
282
+ header_params=_header_params,
283
+ body=_body_params,
284
+ post_params=_form_params,
285
+ files=_files,
286
+ auth_settings=_auth_settings,
287
+ collection_formats=_collection_formats,
288
+ _host=_host,
289
+ _request_auth=_request_auth,
290
+ )
291
+
292
+ @validate_call
293
+ async def delete_stack(
294
+ self,
295
+ id: UUID,
296
+ _request_timeout: Union[
297
+ None,
298
+ Annotated[StrictFloat, Field(gt=0)],
299
+ Tuple[
300
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
301
+ ],
302
+ ] = None,
303
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
304
+ _content_type: Optional[StrictStr] = None,
305
+ _headers: Optional[Dict[StrictStr, Any]] = None,
306
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
307
+ ) -> None:
308
+ """Delete a stack
309
+
310
+ Delete a specific stack by its ID.
311
+
312
+ :param id: (required)
313
+ :type id: UUID
314
+ :param _request_timeout: timeout setting for this request. If one
315
+ number provided, it will be total request
316
+ timeout. It can also be a pair (tuple) of
317
+ (connection, read) timeouts.
318
+ :type _request_timeout: int, tuple(int, int), optional
319
+ :param _request_auth: set to override the auth_settings for an a single
320
+ request; this effectively ignores the
321
+ authentication in the spec for a single request.
322
+ :type _request_auth: dict, optional
323
+ :param _content_type: force content-type for the request.
324
+ :type _content_type: str, Optional
325
+ :param _headers: set to override the headers for a single
326
+ request; this effectively ignores the headers
327
+ in the spec for a single request.
328
+ :type _headers: dict, optional
329
+ :param _host_index: set to override the host_index for a single
330
+ request; this effectively ignores the host_index
331
+ in the spec for a single request.
332
+ :type _host_index: int, optional
333
+ :return: Returns the result object.
334
+ """ # noqa: E501
335
+
336
+ _param = self._delete_stack_serialize(
337
+ id=id,
338
+ _request_auth=_request_auth,
339
+ _content_type=_content_type,
340
+ _headers=_headers,
341
+ _host_index=_host_index,
342
+ )
343
+
344
+ _response_types_map: Dict[str, Optional[str]] = {
345
+ "204": None,
346
+ }
347
+ response_data = await self.api_client.call_api(
348
+ *_param, _request_timeout=_request_timeout
349
+ )
350
+ await response_data.read()
351
+ return self.api_client.response_deserialize(
352
+ response_data=response_data,
353
+ response_types_map=_response_types_map,
354
+ ).data
355
+
356
+ @validate_call
357
+ async def delete_stack_with_http_info(
358
+ self,
359
+ id: UUID,
360
+ _request_timeout: Union[
361
+ None,
362
+ Annotated[StrictFloat, Field(gt=0)],
363
+ Tuple[
364
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
365
+ ],
366
+ ] = None,
367
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
368
+ _content_type: Optional[StrictStr] = None,
369
+ _headers: Optional[Dict[StrictStr, Any]] = None,
370
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
371
+ ) -> ApiResponse[None]:
372
+ """Delete a stack
373
+
374
+ Delete a specific stack by its ID.
375
+
376
+ :param id: (required)
377
+ :type id: UUID
378
+ :param _request_timeout: timeout setting for this request. If one
379
+ number provided, it will be total request
380
+ timeout. It can also be a pair (tuple) of
381
+ (connection, read) timeouts.
382
+ :type _request_timeout: int, tuple(int, int), optional
383
+ :param _request_auth: set to override the auth_settings for an a single
384
+ request; this effectively ignores the
385
+ authentication in the spec for a single request.
386
+ :type _request_auth: dict, optional
387
+ :param _content_type: force content-type for the request.
388
+ :type _content_type: str, Optional
389
+ :param _headers: set to override the headers for a single
390
+ request; this effectively ignores the headers
391
+ in the spec for a single request.
392
+ :type _headers: dict, optional
393
+ :param _host_index: set to override the host_index for a single
394
+ request; this effectively ignores the host_index
395
+ in the spec for a single request.
396
+ :type _host_index: int, optional
397
+ :return: Returns the result object.
398
+ """ # noqa: E501
399
+
400
+ _param = self._delete_stack_serialize(
401
+ id=id,
402
+ _request_auth=_request_auth,
403
+ _content_type=_content_type,
404
+ _headers=_headers,
405
+ _host_index=_host_index,
406
+ )
407
+
408
+ _response_types_map: Dict[str, Optional[str]] = {
409
+ "204": None,
410
+ }
411
+ response_data = await self.api_client.call_api(
412
+ *_param, _request_timeout=_request_timeout
413
+ )
414
+ await response_data.read()
415
+ return self.api_client.response_deserialize(
416
+ response_data=response_data,
417
+ response_types_map=_response_types_map,
418
+ )
419
+
420
+ @validate_call
421
+ async def delete_stack_without_preload_content(
422
+ self,
423
+ id: UUID,
424
+ _request_timeout: Union[
425
+ None,
426
+ Annotated[StrictFloat, Field(gt=0)],
427
+ Tuple[
428
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
429
+ ],
430
+ ] = None,
431
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
432
+ _content_type: Optional[StrictStr] = None,
433
+ _headers: Optional[Dict[StrictStr, Any]] = None,
434
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
435
+ ) -> RESTResponseType:
436
+ """Delete a stack
437
+
438
+ Delete a specific stack by its ID.
439
+
440
+ :param id: (required)
441
+ :type id: UUID
442
+ :param _request_timeout: timeout setting for this request. If one
443
+ number provided, it will be total request
444
+ timeout. It can also be a pair (tuple) of
445
+ (connection, read) timeouts.
446
+ :type _request_timeout: int, tuple(int, int), optional
447
+ :param _request_auth: set to override the auth_settings for an a single
448
+ request; this effectively ignores the
449
+ authentication in the spec for a single request.
450
+ :type _request_auth: dict, optional
451
+ :param _content_type: force content-type for the request.
452
+ :type _content_type: str, Optional
453
+ :param _headers: set to override the headers for a single
454
+ request; this effectively ignores the headers
455
+ in the spec for a single request.
456
+ :type _headers: dict, optional
457
+ :param _host_index: set to override the host_index for a single
458
+ request; this effectively ignores the host_index
459
+ in the spec for a single request.
460
+ :type _host_index: int, optional
461
+ :return: Returns the result object.
462
+ """ # noqa: E501
463
+
464
+ _param = self._delete_stack_serialize(
465
+ id=id,
466
+ _request_auth=_request_auth,
467
+ _content_type=_content_type,
468
+ _headers=_headers,
469
+ _host_index=_host_index,
470
+ )
471
+
472
+ _response_types_map: Dict[str, Optional[str]] = {
473
+ "204": None,
474
+ }
475
+ response_data = await self.api_client.call_api(
476
+ *_param, _request_timeout=_request_timeout
477
+ )
478
+ return response_data.response
479
+
480
+ def _delete_stack_serialize(
481
+ self,
482
+ id,
483
+ _request_auth,
484
+ _content_type,
485
+ _headers,
486
+ _host_index,
487
+ ) -> RequestSerialized:
488
+ _host = None
489
+
490
+ _collection_formats: Dict[str, str] = {}
491
+
492
+ _path_params: Dict[str, str] = {}
493
+ _query_params: List[Tuple[str, str]] = []
494
+ _header_params: Dict[str, Optional[str]] = _headers or {}
495
+ _form_params: List[Tuple[str, str]] = []
496
+ _files: Dict[
497
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
498
+ ] = {}
499
+ _body_params: Optional[bytes] = None
500
+
501
+ # process the path parameters
502
+ if id is not None:
503
+ _path_params["id"] = id
504
+ # process the query parameters
505
+ # process the header parameters
506
+ # process the form parameters
507
+ # process the body parameter
508
+
509
+ # authentication setting
510
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
511
+
512
+ return self.api_client.param_serialize(
513
+ method="DELETE",
514
+ resource_path="/stacks/{id}",
515
+ path_params=_path_params,
516
+ query_params=_query_params,
517
+ header_params=_header_params,
518
+ body=_body_params,
519
+ post_params=_form_params,
520
+ files=_files,
521
+ auth_settings=_auth_settings,
522
+ collection_formats=_collection_formats,
523
+ _host=_host,
524
+ _request_auth=_request_auth,
525
+ )
526
+
527
+ @validate_call
528
+ async def delete_stacks(
529
+ self,
530
+ bulk_ids_dto: BulkIdsDto,
531
+ _request_timeout: Union[
532
+ None,
533
+ Annotated[StrictFloat, Field(gt=0)],
534
+ Tuple[
535
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
536
+ ],
537
+ ] = None,
538
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
539
+ _content_type: Optional[StrictStr] = None,
540
+ _headers: Optional[Dict[StrictStr, Any]] = None,
541
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
542
+ ) -> None:
543
+ """Delete stacks
544
+
545
+ Delete multiple stacks by providing a list of stack IDs.
546
+
547
+ :param bulk_ids_dto: (required)
548
+ :type bulk_ids_dto: BulkIdsDto
549
+ :param _request_timeout: timeout setting for this request. If one
550
+ number provided, it will be total request
551
+ timeout. It can also be a pair (tuple) of
552
+ (connection, read) timeouts.
553
+ :type _request_timeout: int, tuple(int, int), optional
554
+ :param _request_auth: set to override the auth_settings for an a single
555
+ request; this effectively ignores the
556
+ authentication in the spec for a single request.
557
+ :type _request_auth: dict, optional
558
+ :param _content_type: force content-type for the request.
559
+ :type _content_type: str, Optional
560
+ :param _headers: set to override the headers for a single
561
+ request; this effectively ignores the headers
562
+ in the spec for a single request.
563
+ :type _headers: dict, optional
564
+ :param _host_index: set to override the host_index for a single
565
+ request; this effectively ignores the host_index
566
+ in the spec for a single request.
567
+ :type _host_index: int, optional
568
+ :return: Returns the result object.
569
+ """ # noqa: E501
570
+
571
+ _param = self._delete_stacks_serialize(
572
+ bulk_ids_dto=bulk_ids_dto,
573
+ _request_auth=_request_auth,
574
+ _content_type=_content_type,
575
+ _headers=_headers,
576
+ _host_index=_host_index,
577
+ )
578
+
579
+ _response_types_map: Dict[str, Optional[str]] = {
580
+ "204": None,
581
+ }
582
+ response_data = await self.api_client.call_api(
583
+ *_param, _request_timeout=_request_timeout
584
+ )
585
+ await response_data.read()
586
+ return self.api_client.response_deserialize(
587
+ response_data=response_data,
588
+ response_types_map=_response_types_map,
589
+ ).data
590
+
591
+ @validate_call
592
+ async def delete_stacks_with_http_info(
593
+ self,
594
+ bulk_ids_dto: BulkIdsDto,
595
+ _request_timeout: Union[
596
+ None,
597
+ Annotated[StrictFloat, Field(gt=0)],
598
+ Tuple[
599
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
600
+ ],
601
+ ] = None,
602
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
603
+ _content_type: Optional[StrictStr] = None,
604
+ _headers: Optional[Dict[StrictStr, Any]] = None,
605
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
606
+ ) -> ApiResponse[None]:
607
+ """Delete stacks
608
+
609
+ Delete multiple stacks by providing a list of stack IDs.
610
+
611
+ :param bulk_ids_dto: (required)
612
+ :type bulk_ids_dto: BulkIdsDto
613
+ :param _request_timeout: timeout setting for this request. If one
614
+ number provided, it will be total request
615
+ timeout. It can also be a pair (tuple) of
616
+ (connection, read) timeouts.
617
+ :type _request_timeout: int, tuple(int, int), optional
618
+ :param _request_auth: set to override the auth_settings for an a single
619
+ request; this effectively ignores the
620
+ authentication in the spec for a single request.
621
+ :type _request_auth: dict, optional
622
+ :param _content_type: force content-type for the request.
623
+ :type _content_type: str, Optional
624
+ :param _headers: set to override the headers for a single
625
+ request; this effectively ignores the headers
626
+ in the spec for a single request.
627
+ :type _headers: dict, optional
628
+ :param _host_index: set to override the host_index for a single
629
+ request; this effectively ignores the host_index
630
+ in the spec for a single request.
631
+ :type _host_index: int, optional
632
+ :return: Returns the result object.
633
+ """ # noqa: E501
634
+
635
+ _param = self._delete_stacks_serialize(
636
+ bulk_ids_dto=bulk_ids_dto,
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index,
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ "204": None,
645
+ }
646
+ response_data = await self.api_client.call_api(
647
+ *_param, _request_timeout=_request_timeout
648
+ )
649
+ await response_data.read()
650
+ return self.api_client.response_deserialize(
651
+ response_data=response_data,
652
+ response_types_map=_response_types_map,
653
+ )
654
+
655
+ @validate_call
656
+ async def delete_stacks_without_preload_content(
657
+ self,
658
+ bulk_ids_dto: BulkIdsDto,
659
+ _request_timeout: Union[
660
+ None,
661
+ Annotated[StrictFloat, Field(gt=0)],
662
+ Tuple[
663
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
664
+ ],
665
+ ] = None,
666
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
667
+ _content_type: Optional[StrictStr] = None,
668
+ _headers: Optional[Dict[StrictStr, Any]] = None,
669
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
670
+ ) -> RESTResponseType:
671
+ """Delete stacks
672
+
673
+ Delete multiple stacks by providing a list of stack IDs.
674
+
675
+ :param bulk_ids_dto: (required)
676
+ :type bulk_ids_dto: BulkIdsDto
677
+ :param _request_timeout: timeout setting for this request. If one
678
+ number provided, it will be total request
679
+ timeout. It can also be a pair (tuple) of
680
+ (connection, read) timeouts.
681
+ :type _request_timeout: int, tuple(int, int), optional
682
+ :param _request_auth: set to override the auth_settings for an a single
683
+ request; this effectively ignores the
684
+ authentication in the spec for a single request.
685
+ :type _request_auth: dict, optional
686
+ :param _content_type: force content-type for the request.
687
+ :type _content_type: str, Optional
688
+ :param _headers: set to override the headers for a single
689
+ request; this effectively ignores the headers
690
+ in the spec for a single request.
691
+ :type _headers: dict, optional
692
+ :param _host_index: set to override the host_index for a single
693
+ request; this effectively ignores the host_index
694
+ in the spec for a single request.
695
+ :type _host_index: int, optional
696
+ :return: Returns the result object.
697
+ """ # noqa: E501
698
+
699
+ _param = self._delete_stacks_serialize(
700
+ bulk_ids_dto=bulk_ids_dto,
701
+ _request_auth=_request_auth,
702
+ _content_type=_content_type,
703
+ _headers=_headers,
704
+ _host_index=_host_index,
705
+ )
706
+
707
+ _response_types_map: Dict[str, Optional[str]] = {
708
+ "204": None,
709
+ }
710
+ response_data = await self.api_client.call_api(
711
+ *_param, _request_timeout=_request_timeout
712
+ )
713
+ return response_data.response
714
+
715
+ def _delete_stacks_serialize(
716
+ self,
717
+ bulk_ids_dto,
718
+ _request_auth,
719
+ _content_type,
720
+ _headers,
721
+ _host_index,
722
+ ) -> RequestSerialized:
723
+ _host = None
724
+
725
+ _collection_formats: Dict[str, str] = {}
726
+
727
+ _path_params: Dict[str, str] = {}
728
+ _query_params: List[Tuple[str, str]] = []
729
+ _header_params: Dict[str, Optional[str]] = _headers or {}
730
+ _form_params: List[Tuple[str, str]] = []
731
+ _files: Dict[
732
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
733
+ ] = {}
734
+ _body_params: Optional[bytes] = None
735
+
736
+ # process the path parameters
737
+ # process the query parameters
738
+ # process the header parameters
739
+ # process the form parameters
740
+ # process the body parameter
741
+ if bulk_ids_dto is not None:
742
+ _body_params = bulk_ids_dto
743
+
744
+ # set the HTTP header `Content-Type`
745
+ if _content_type:
746
+ _header_params["Content-Type"] = _content_type
747
+ else:
748
+ _default_content_type = self.api_client.select_header_content_type(
749
+ ["application/json"]
750
+ )
751
+ if _default_content_type is not None:
752
+ _header_params["Content-Type"] = _default_content_type
753
+
754
+ # authentication setting
755
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
756
+
757
+ return self.api_client.param_serialize(
758
+ method="DELETE",
759
+ resource_path="/stacks",
760
+ path_params=_path_params,
761
+ query_params=_query_params,
762
+ header_params=_header_params,
763
+ body=_body_params,
764
+ post_params=_form_params,
765
+ files=_files,
766
+ auth_settings=_auth_settings,
767
+ collection_formats=_collection_formats,
768
+ _host=_host,
769
+ _request_auth=_request_auth,
770
+ )
771
+
772
+ @validate_call
773
+ async def get_stack(
774
+ self,
775
+ id: UUID,
776
+ _request_timeout: Union[
777
+ None,
778
+ Annotated[StrictFloat, Field(gt=0)],
779
+ Tuple[
780
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
781
+ ],
782
+ ] = None,
783
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
784
+ _content_type: Optional[StrictStr] = None,
785
+ _headers: Optional[Dict[StrictStr, Any]] = None,
786
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
787
+ ) -> StackResponseDto:
788
+ """Retrieve a stack
789
+
790
+ Retrieve a specific stack by its ID.
791
+
792
+ :param id: (required)
793
+ :type id: UUID
794
+ :param _request_timeout: timeout setting for this request. If one
795
+ number provided, it will be total request
796
+ timeout. It can also be a pair (tuple) of
797
+ (connection, read) timeouts.
798
+ :type _request_timeout: int, tuple(int, int), optional
799
+ :param _request_auth: set to override the auth_settings for an a single
800
+ request; this effectively ignores the
801
+ authentication in the spec for a single request.
802
+ :type _request_auth: dict, optional
803
+ :param _content_type: force content-type for the request.
804
+ :type _content_type: str, Optional
805
+ :param _headers: set to override the headers for a single
806
+ request; this effectively ignores the headers
807
+ in the spec for a single request.
808
+ :type _headers: dict, optional
809
+ :param _host_index: set to override the host_index for a single
810
+ request; this effectively ignores the host_index
811
+ in the spec for a single request.
812
+ :type _host_index: int, optional
813
+ :return: Returns the result object.
814
+ """ # noqa: E501
815
+
816
+ _param = self._get_stack_serialize(
817
+ id=id,
818
+ _request_auth=_request_auth,
819
+ _content_type=_content_type,
820
+ _headers=_headers,
821
+ _host_index=_host_index,
822
+ )
823
+
824
+ _response_types_map: Dict[str, Optional[str]] = {
825
+ "200": "StackResponseDto",
826
+ }
827
+ response_data = await self.api_client.call_api(
828
+ *_param, _request_timeout=_request_timeout
829
+ )
830
+ await response_data.read()
831
+ return self.api_client.response_deserialize(
832
+ response_data=response_data,
833
+ response_types_map=_response_types_map,
834
+ ).data
835
+
836
+ @validate_call
837
+ async def get_stack_with_http_info(
838
+ self,
839
+ id: UUID,
840
+ _request_timeout: Union[
841
+ None,
842
+ Annotated[StrictFloat, Field(gt=0)],
843
+ Tuple[
844
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
845
+ ],
846
+ ] = None,
847
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
848
+ _content_type: Optional[StrictStr] = None,
849
+ _headers: Optional[Dict[StrictStr, Any]] = None,
850
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
851
+ ) -> ApiResponse[StackResponseDto]:
852
+ """Retrieve a stack
853
+
854
+ Retrieve a specific stack by its ID.
855
+
856
+ :param id: (required)
857
+ :type id: UUID
858
+ :param _request_timeout: timeout setting for this request. If one
859
+ number provided, it will be total request
860
+ timeout. It can also be a pair (tuple) of
861
+ (connection, read) timeouts.
862
+ :type _request_timeout: int, tuple(int, int), optional
863
+ :param _request_auth: set to override the auth_settings for an a single
864
+ request; this effectively ignores the
865
+ authentication in the spec for a single request.
866
+ :type _request_auth: dict, optional
867
+ :param _content_type: force content-type for the request.
868
+ :type _content_type: str, Optional
869
+ :param _headers: set to override the headers for a single
870
+ request; this effectively ignores the headers
871
+ in the spec for a single request.
872
+ :type _headers: dict, optional
873
+ :param _host_index: set to override the host_index for a single
874
+ request; this effectively ignores the host_index
875
+ in the spec for a single request.
876
+ :type _host_index: int, optional
877
+ :return: Returns the result object.
878
+ """ # noqa: E501
879
+
880
+ _param = self._get_stack_serialize(
881
+ id=id,
882
+ _request_auth=_request_auth,
883
+ _content_type=_content_type,
884
+ _headers=_headers,
885
+ _host_index=_host_index,
886
+ )
887
+
888
+ _response_types_map: Dict[str, Optional[str]] = {
889
+ "200": "StackResponseDto",
890
+ }
891
+ response_data = await self.api_client.call_api(
892
+ *_param, _request_timeout=_request_timeout
893
+ )
894
+ await response_data.read()
895
+ return self.api_client.response_deserialize(
896
+ response_data=response_data,
897
+ response_types_map=_response_types_map,
898
+ )
899
+
900
+ @validate_call
901
+ async def get_stack_without_preload_content(
902
+ self,
903
+ id: UUID,
904
+ _request_timeout: Union[
905
+ None,
906
+ Annotated[StrictFloat, Field(gt=0)],
907
+ Tuple[
908
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
909
+ ],
910
+ ] = None,
911
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
912
+ _content_type: Optional[StrictStr] = None,
913
+ _headers: Optional[Dict[StrictStr, Any]] = None,
914
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
915
+ ) -> RESTResponseType:
916
+ """Retrieve a stack
917
+
918
+ Retrieve a specific stack by its ID.
919
+
920
+ :param id: (required)
921
+ :type id: UUID
922
+ :param _request_timeout: timeout setting for this request. If one
923
+ number provided, it will be total request
924
+ timeout. It can also be a pair (tuple) of
925
+ (connection, read) timeouts.
926
+ :type _request_timeout: int, tuple(int, int), optional
927
+ :param _request_auth: set to override the auth_settings for an a single
928
+ request; this effectively ignores the
929
+ authentication in the spec for a single request.
930
+ :type _request_auth: dict, optional
931
+ :param _content_type: force content-type for the request.
932
+ :type _content_type: str, Optional
933
+ :param _headers: set to override the headers for a single
934
+ request; this effectively ignores the headers
935
+ in the spec for a single request.
936
+ :type _headers: dict, optional
937
+ :param _host_index: set to override the host_index for a single
938
+ request; this effectively ignores the host_index
939
+ in the spec for a single request.
940
+ :type _host_index: int, optional
941
+ :return: Returns the result object.
942
+ """ # noqa: E501
943
+
944
+ _param = self._get_stack_serialize(
945
+ id=id,
946
+ _request_auth=_request_auth,
947
+ _content_type=_content_type,
948
+ _headers=_headers,
949
+ _host_index=_host_index,
950
+ )
951
+
952
+ _response_types_map: Dict[str, Optional[str]] = {
953
+ "200": "StackResponseDto",
954
+ }
955
+ response_data = await self.api_client.call_api(
956
+ *_param, _request_timeout=_request_timeout
957
+ )
958
+ return response_data.response
959
+
960
+ def _get_stack_serialize(
961
+ self,
962
+ id,
963
+ _request_auth,
964
+ _content_type,
965
+ _headers,
966
+ _host_index,
967
+ ) -> RequestSerialized:
968
+ _host = None
969
+
970
+ _collection_formats: Dict[str, str] = {}
971
+
972
+ _path_params: Dict[str, str] = {}
973
+ _query_params: List[Tuple[str, str]] = []
974
+ _header_params: Dict[str, Optional[str]] = _headers or {}
975
+ _form_params: List[Tuple[str, str]] = []
976
+ _files: Dict[
977
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
978
+ ] = {}
979
+ _body_params: Optional[bytes] = None
980
+
981
+ # process the path parameters
982
+ if id is not None:
983
+ _path_params["id"] = id
984
+ # process the query parameters
985
+ # process the header parameters
986
+ # process the form parameters
987
+ # process the body parameter
988
+
989
+ # set the HTTP header `Accept`
990
+ if "Accept" not in _header_params:
991
+ _header_params["Accept"] = self.api_client.select_header_accept(
992
+ ["application/json"]
993
+ )
994
+
995
+ # authentication setting
996
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
997
+
998
+ return self.api_client.param_serialize(
999
+ method="GET",
1000
+ resource_path="/stacks/{id}",
1001
+ path_params=_path_params,
1002
+ query_params=_query_params,
1003
+ header_params=_header_params,
1004
+ body=_body_params,
1005
+ post_params=_form_params,
1006
+ files=_files,
1007
+ auth_settings=_auth_settings,
1008
+ collection_formats=_collection_formats,
1009
+ _host=_host,
1010
+ _request_auth=_request_auth,
1011
+ )
1012
+
1013
+ @validate_call
1014
+ async def remove_asset_from_stack(
1015
+ self,
1016
+ asset_id: UUID,
1017
+ id: UUID,
1018
+ _request_timeout: Union[
1019
+ None,
1020
+ Annotated[StrictFloat, Field(gt=0)],
1021
+ Tuple[
1022
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1023
+ ],
1024
+ ] = None,
1025
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1026
+ _content_type: Optional[StrictStr] = None,
1027
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1028
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1029
+ ) -> None:
1030
+ """Remove an asset from a stack
1031
+
1032
+ Remove a specific asset from a stack by providing the stack ID and asset ID.
1033
+
1034
+ :param asset_id: (required)
1035
+ :type asset_id: UUID
1036
+ :param id: (required)
1037
+ :type id: UUID
1038
+ :param _request_timeout: timeout setting for this request. If one
1039
+ number provided, it will be total request
1040
+ timeout. It can also be a pair (tuple) of
1041
+ (connection, read) timeouts.
1042
+ :type _request_timeout: int, tuple(int, int), optional
1043
+ :param _request_auth: set to override the auth_settings for an a single
1044
+ request; this effectively ignores the
1045
+ authentication in the spec for a single request.
1046
+ :type _request_auth: dict, optional
1047
+ :param _content_type: force content-type for the request.
1048
+ :type _content_type: str, Optional
1049
+ :param _headers: set to override the headers for a single
1050
+ request; this effectively ignores the headers
1051
+ in the spec for a single request.
1052
+ :type _headers: dict, optional
1053
+ :param _host_index: set to override the host_index for a single
1054
+ request; this effectively ignores the host_index
1055
+ in the spec for a single request.
1056
+ :type _host_index: int, optional
1057
+ :return: Returns the result object.
1058
+ """ # noqa: E501
1059
+
1060
+ _param = self._remove_asset_from_stack_serialize(
1061
+ asset_id=asset_id,
1062
+ id=id,
1063
+ _request_auth=_request_auth,
1064
+ _content_type=_content_type,
1065
+ _headers=_headers,
1066
+ _host_index=_host_index,
1067
+ )
1068
+
1069
+ _response_types_map: Dict[str, Optional[str]] = {
1070
+ "204": None,
1071
+ }
1072
+ response_data = await self.api_client.call_api(
1073
+ *_param, _request_timeout=_request_timeout
1074
+ )
1075
+ await response_data.read()
1076
+ return self.api_client.response_deserialize(
1077
+ response_data=response_data,
1078
+ response_types_map=_response_types_map,
1079
+ ).data
1080
+
1081
+ @validate_call
1082
+ async def remove_asset_from_stack_with_http_info(
1083
+ self,
1084
+ asset_id: UUID,
1085
+ id: UUID,
1086
+ _request_timeout: Union[
1087
+ None,
1088
+ Annotated[StrictFloat, Field(gt=0)],
1089
+ Tuple[
1090
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1091
+ ],
1092
+ ] = None,
1093
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1094
+ _content_type: Optional[StrictStr] = None,
1095
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1096
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1097
+ ) -> ApiResponse[None]:
1098
+ """Remove an asset from a stack
1099
+
1100
+ Remove a specific asset from a stack by providing the stack ID and asset ID.
1101
+
1102
+ :param asset_id: (required)
1103
+ :type asset_id: UUID
1104
+ :param id: (required)
1105
+ :type id: UUID
1106
+ :param _request_timeout: timeout setting for this request. If one
1107
+ number provided, it will be total request
1108
+ timeout. It can also be a pair (tuple) of
1109
+ (connection, read) timeouts.
1110
+ :type _request_timeout: int, tuple(int, int), optional
1111
+ :param _request_auth: set to override the auth_settings for an a single
1112
+ request; this effectively ignores the
1113
+ authentication in the spec for a single request.
1114
+ :type _request_auth: dict, optional
1115
+ :param _content_type: force content-type for the request.
1116
+ :type _content_type: str, Optional
1117
+ :param _headers: set to override the headers for a single
1118
+ request; this effectively ignores the headers
1119
+ in the spec for a single request.
1120
+ :type _headers: dict, optional
1121
+ :param _host_index: set to override the host_index for a single
1122
+ request; this effectively ignores the host_index
1123
+ in the spec for a single request.
1124
+ :type _host_index: int, optional
1125
+ :return: Returns the result object.
1126
+ """ # noqa: E501
1127
+
1128
+ _param = self._remove_asset_from_stack_serialize(
1129
+ asset_id=asset_id,
1130
+ id=id,
1131
+ _request_auth=_request_auth,
1132
+ _content_type=_content_type,
1133
+ _headers=_headers,
1134
+ _host_index=_host_index,
1135
+ )
1136
+
1137
+ _response_types_map: Dict[str, Optional[str]] = {
1138
+ "204": None,
1139
+ }
1140
+ response_data = await self.api_client.call_api(
1141
+ *_param, _request_timeout=_request_timeout
1142
+ )
1143
+ await response_data.read()
1144
+ return self.api_client.response_deserialize(
1145
+ response_data=response_data,
1146
+ response_types_map=_response_types_map,
1147
+ )
1148
+
1149
+ @validate_call
1150
+ async def remove_asset_from_stack_without_preload_content(
1151
+ self,
1152
+ asset_id: UUID,
1153
+ id: UUID,
1154
+ _request_timeout: Union[
1155
+ None,
1156
+ Annotated[StrictFloat, Field(gt=0)],
1157
+ Tuple[
1158
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1159
+ ],
1160
+ ] = None,
1161
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1162
+ _content_type: Optional[StrictStr] = None,
1163
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1164
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1165
+ ) -> RESTResponseType:
1166
+ """Remove an asset from a stack
1167
+
1168
+ Remove a specific asset from a stack by providing the stack ID and asset ID.
1169
+
1170
+ :param asset_id: (required)
1171
+ :type asset_id: UUID
1172
+ :param id: (required)
1173
+ :type id: UUID
1174
+ :param _request_timeout: timeout setting for this request. If one
1175
+ number provided, it will be total request
1176
+ timeout. It can also be a pair (tuple) of
1177
+ (connection, read) timeouts.
1178
+ :type _request_timeout: int, tuple(int, int), optional
1179
+ :param _request_auth: set to override the auth_settings for an a single
1180
+ request; this effectively ignores the
1181
+ authentication in the spec for a single request.
1182
+ :type _request_auth: dict, optional
1183
+ :param _content_type: force content-type for the request.
1184
+ :type _content_type: str, Optional
1185
+ :param _headers: set to override the headers for a single
1186
+ request; this effectively ignores the headers
1187
+ in the spec for a single request.
1188
+ :type _headers: dict, optional
1189
+ :param _host_index: set to override the host_index for a single
1190
+ request; this effectively ignores the host_index
1191
+ in the spec for a single request.
1192
+ :type _host_index: int, optional
1193
+ :return: Returns the result object.
1194
+ """ # noqa: E501
1195
+
1196
+ _param = self._remove_asset_from_stack_serialize(
1197
+ asset_id=asset_id,
1198
+ id=id,
1199
+ _request_auth=_request_auth,
1200
+ _content_type=_content_type,
1201
+ _headers=_headers,
1202
+ _host_index=_host_index,
1203
+ )
1204
+
1205
+ _response_types_map: Dict[str, Optional[str]] = {
1206
+ "204": None,
1207
+ }
1208
+ response_data = await self.api_client.call_api(
1209
+ *_param, _request_timeout=_request_timeout
1210
+ )
1211
+ return response_data.response
1212
+
1213
+ def _remove_asset_from_stack_serialize(
1214
+ self,
1215
+ asset_id,
1216
+ id,
1217
+ _request_auth,
1218
+ _content_type,
1219
+ _headers,
1220
+ _host_index,
1221
+ ) -> RequestSerialized:
1222
+ _host = None
1223
+
1224
+ _collection_formats: Dict[str, str] = {}
1225
+
1226
+ _path_params: Dict[str, str] = {}
1227
+ _query_params: List[Tuple[str, str]] = []
1228
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1229
+ _form_params: List[Tuple[str, str]] = []
1230
+ _files: Dict[
1231
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1232
+ ] = {}
1233
+ _body_params: Optional[bytes] = None
1234
+
1235
+ # process the path parameters
1236
+ if asset_id is not None:
1237
+ _path_params["assetId"] = asset_id
1238
+ if id is not None:
1239
+ _path_params["id"] = id
1240
+ # process the query parameters
1241
+ # process the header parameters
1242
+ # process the form parameters
1243
+ # process the body parameter
1244
+
1245
+ # authentication setting
1246
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1247
+
1248
+ return self.api_client.param_serialize(
1249
+ method="DELETE",
1250
+ resource_path="/stacks/{id}/assets/{assetId}",
1251
+ path_params=_path_params,
1252
+ query_params=_query_params,
1253
+ header_params=_header_params,
1254
+ body=_body_params,
1255
+ post_params=_form_params,
1256
+ files=_files,
1257
+ auth_settings=_auth_settings,
1258
+ collection_formats=_collection_formats,
1259
+ _host=_host,
1260
+ _request_auth=_request_auth,
1261
+ )
1262
+
1263
+ @validate_call
1264
+ async def search_stacks(
1265
+ self,
1266
+ primary_asset_id: Optional[UUID] = None,
1267
+ _request_timeout: Union[
1268
+ None,
1269
+ Annotated[StrictFloat, Field(gt=0)],
1270
+ Tuple[
1271
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1272
+ ],
1273
+ ] = None,
1274
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1275
+ _content_type: Optional[StrictStr] = None,
1276
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1277
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1278
+ ) -> List[StackResponseDto]:
1279
+ """Retrieve stacks
1280
+
1281
+ Retrieve a list of stacks.
1282
+
1283
+ :param primary_asset_id:
1284
+ :type primary_asset_id: UUID
1285
+ :param _request_timeout: timeout setting for this request. If one
1286
+ number provided, it will be total request
1287
+ timeout. It can also be a pair (tuple) of
1288
+ (connection, read) timeouts.
1289
+ :type _request_timeout: int, tuple(int, int), optional
1290
+ :param _request_auth: set to override the auth_settings for an a single
1291
+ request; this effectively ignores the
1292
+ authentication in the spec for a single request.
1293
+ :type _request_auth: dict, optional
1294
+ :param _content_type: force content-type for the request.
1295
+ :type _content_type: str, Optional
1296
+ :param _headers: set to override the headers for a single
1297
+ request; this effectively ignores the headers
1298
+ in the spec for a single request.
1299
+ :type _headers: dict, optional
1300
+ :param _host_index: set to override the host_index for a single
1301
+ request; this effectively ignores the host_index
1302
+ in the spec for a single request.
1303
+ :type _host_index: int, optional
1304
+ :return: Returns the result object.
1305
+ """ # noqa: E501
1306
+
1307
+ _param = self._search_stacks_serialize(
1308
+ primary_asset_id=primary_asset_id,
1309
+ _request_auth=_request_auth,
1310
+ _content_type=_content_type,
1311
+ _headers=_headers,
1312
+ _host_index=_host_index,
1313
+ )
1314
+
1315
+ _response_types_map: Dict[str, Optional[str]] = {
1316
+ "200": "List[StackResponseDto]",
1317
+ }
1318
+ response_data = await self.api_client.call_api(
1319
+ *_param, _request_timeout=_request_timeout
1320
+ )
1321
+ await response_data.read()
1322
+ return self.api_client.response_deserialize(
1323
+ response_data=response_data,
1324
+ response_types_map=_response_types_map,
1325
+ ).data
1326
+
1327
+ @validate_call
1328
+ async def search_stacks_with_http_info(
1329
+ self,
1330
+ primary_asset_id: Optional[UUID] = None,
1331
+ _request_timeout: Union[
1332
+ None,
1333
+ Annotated[StrictFloat, Field(gt=0)],
1334
+ Tuple[
1335
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1336
+ ],
1337
+ ] = None,
1338
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1339
+ _content_type: Optional[StrictStr] = None,
1340
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1341
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1342
+ ) -> ApiResponse[List[StackResponseDto]]:
1343
+ """Retrieve stacks
1344
+
1345
+ Retrieve a list of stacks.
1346
+
1347
+ :param primary_asset_id:
1348
+ :type primary_asset_id: UUID
1349
+ :param _request_timeout: timeout setting for this request. If one
1350
+ number provided, it will be total request
1351
+ timeout. It can also be a pair (tuple) of
1352
+ (connection, read) timeouts.
1353
+ :type _request_timeout: int, tuple(int, int), optional
1354
+ :param _request_auth: set to override the auth_settings for an a single
1355
+ request; this effectively ignores the
1356
+ authentication in the spec for a single request.
1357
+ :type _request_auth: dict, optional
1358
+ :param _content_type: force content-type for the request.
1359
+ :type _content_type: str, Optional
1360
+ :param _headers: set to override the headers for a single
1361
+ request; this effectively ignores the headers
1362
+ in the spec for a single request.
1363
+ :type _headers: dict, optional
1364
+ :param _host_index: set to override the host_index for a single
1365
+ request; this effectively ignores the host_index
1366
+ in the spec for a single request.
1367
+ :type _host_index: int, optional
1368
+ :return: Returns the result object.
1369
+ """ # noqa: E501
1370
+
1371
+ _param = self._search_stacks_serialize(
1372
+ primary_asset_id=primary_asset_id,
1373
+ _request_auth=_request_auth,
1374
+ _content_type=_content_type,
1375
+ _headers=_headers,
1376
+ _host_index=_host_index,
1377
+ )
1378
+
1379
+ _response_types_map: Dict[str, Optional[str]] = {
1380
+ "200": "List[StackResponseDto]",
1381
+ }
1382
+ response_data = await self.api_client.call_api(
1383
+ *_param, _request_timeout=_request_timeout
1384
+ )
1385
+ await response_data.read()
1386
+ return self.api_client.response_deserialize(
1387
+ response_data=response_data,
1388
+ response_types_map=_response_types_map,
1389
+ )
1390
+
1391
+ @validate_call
1392
+ async def search_stacks_without_preload_content(
1393
+ self,
1394
+ primary_asset_id: Optional[UUID] = None,
1395
+ _request_timeout: Union[
1396
+ None,
1397
+ Annotated[StrictFloat, Field(gt=0)],
1398
+ Tuple[
1399
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1400
+ ],
1401
+ ] = None,
1402
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1403
+ _content_type: Optional[StrictStr] = None,
1404
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1405
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1406
+ ) -> RESTResponseType:
1407
+ """Retrieve stacks
1408
+
1409
+ Retrieve a list of stacks.
1410
+
1411
+ :param primary_asset_id:
1412
+ :type primary_asset_id: UUID
1413
+ :param _request_timeout: timeout setting for this request. If one
1414
+ number provided, it will be total request
1415
+ timeout. It can also be a pair (tuple) of
1416
+ (connection, read) timeouts.
1417
+ :type _request_timeout: int, tuple(int, int), optional
1418
+ :param _request_auth: set to override the auth_settings for an a single
1419
+ request; this effectively ignores the
1420
+ authentication in the spec for a single request.
1421
+ :type _request_auth: dict, optional
1422
+ :param _content_type: force content-type for the request.
1423
+ :type _content_type: str, Optional
1424
+ :param _headers: set to override the headers for a single
1425
+ request; this effectively ignores the headers
1426
+ in the spec for a single request.
1427
+ :type _headers: dict, optional
1428
+ :param _host_index: set to override the host_index for a single
1429
+ request; this effectively ignores the host_index
1430
+ in the spec for a single request.
1431
+ :type _host_index: int, optional
1432
+ :return: Returns the result object.
1433
+ """ # noqa: E501
1434
+
1435
+ _param = self._search_stacks_serialize(
1436
+ primary_asset_id=primary_asset_id,
1437
+ _request_auth=_request_auth,
1438
+ _content_type=_content_type,
1439
+ _headers=_headers,
1440
+ _host_index=_host_index,
1441
+ )
1442
+
1443
+ _response_types_map: Dict[str, Optional[str]] = {
1444
+ "200": "List[StackResponseDto]",
1445
+ }
1446
+ response_data = await self.api_client.call_api(
1447
+ *_param, _request_timeout=_request_timeout
1448
+ )
1449
+ return response_data.response
1450
+
1451
+ def _search_stacks_serialize(
1452
+ self,
1453
+ primary_asset_id,
1454
+ _request_auth,
1455
+ _content_type,
1456
+ _headers,
1457
+ _host_index,
1458
+ ) -> RequestSerialized:
1459
+ _host = None
1460
+
1461
+ _collection_formats: Dict[str, str] = {}
1462
+
1463
+ _path_params: Dict[str, str] = {}
1464
+ _query_params: List[Tuple[str, str]] = []
1465
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1466
+ _form_params: List[Tuple[str, str]] = []
1467
+ _files: Dict[
1468
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1469
+ ] = {}
1470
+ _body_params: Optional[bytes] = None
1471
+
1472
+ # process the path parameters
1473
+ # process the query parameters
1474
+ if primary_asset_id is not None:
1475
+ _query_params.append(("primaryAssetId", primary_asset_id))
1476
+
1477
+ # process the header parameters
1478
+ # process the form parameters
1479
+ # process the body parameter
1480
+
1481
+ # set the HTTP header `Accept`
1482
+ if "Accept" not in _header_params:
1483
+ _header_params["Accept"] = self.api_client.select_header_accept(
1484
+ ["application/json"]
1485
+ )
1486
+
1487
+ # authentication setting
1488
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1489
+
1490
+ return self.api_client.param_serialize(
1491
+ method="GET",
1492
+ resource_path="/stacks",
1493
+ path_params=_path_params,
1494
+ query_params=_query_params,
1495
+ header_params=_header_params,
1496
+ body=_body_params,
1497
+ post_params=_form_params,
1498
+ files=_files,
1499
+ auth_settings=_auth_settings,
1500
+ collection_formats=_collection_formats,
1501
+ _host=_host,
1502
+ _request_auth=_request_auth,
1503
+ )
1504
+
1505
+ @validate_call
1506
+ async def update_stack(
1507
+ self,
1508
+ id: UUID,
1509
+ stack_update_dto: StackUpdateDto,
1510
+ _request_timeout: Union[
1511
+ None,
1512
+ Annotated[StrictFloat, Field(gt=0)],
1513
+ Tuple[
1514
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1515
+ ],
1516
+ ] = None,
1517
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1518
+ _content_type: Optional[StrictStr] = None,
1519
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1520
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1521
+ ) -> StackResponseDto:
1522
+ """Update a stack
1523
+
1524
+ Update an existing stack by its ID.
1525
+
1526
+ :param id: (required)
1527
+ :type id: UUID
1528
+ :param stack_update_dto: (required)
1529
+ :type stack_update_dto: StackUpdateDto
1530
+ :param _request_timeout: timeout setting for this request. If one
1531
+ number provided, it will be total request
1532
+ timeout. It can also be a pair (tuple) of
1533
+ (connection, read) timeouts.
1534
+ :type _request_timeout: int, tuple(int, int), optional
1535
+ :param _request_auth: set to override the auth_settings for an a single
1536
+ request; this effectively ignores the
1537
+ authentication in the spec for a single request.
1538
+ :type _request_auth: dict, optional
1539
+ :param _content_type: force content-type for the request.
1540
+ :type _content_type: str, Optional
1541
+ :param _headers: set to override the headers for a single
1542
+ request; this effectively ignores the headers
1543
+ in the spec for a single request.
1544
+ :type _headers: dict, optional
1545
+ :param _host_index: set to override the host_index for a single
1546
+ request; this effectively ignores the host_index
1547
+ in the spec for a single request.
1548
+ :type _host_index: int, optional
1549
+ :return: Returns the result object.
1550
+ """ # noqa: E501
1551
+
1552
+ _param = self._update_stack_serialize(
1553
+ id=id,
1554
+ stack_update_dto=stack_update_dto,
1555
+ _request_auth=_request_auth,
1556
+ _content_type=_content_type,
1557
+ _headers=_headers,
1558
+ _host_index=_host_index,
1559
+ )
1560
+
1561
+ _response_types_map: Dict[str, Optional[str]] = {
1562
+ "200": "StackResponseDto",
1563
+ }
1564
+ response_data = await self.api_client.call_api(
1565
+ *_param, _request_timeout=_request_timeout
1566
+ )
1567
+ await response_data.read()
1568
+ return self.api_client.response_deserialize(
1569
+ response_data=response_data,
1570
+ response_types_map=_response_types_map,
1571
+ ).data
1572
+
1573
+ @validate_call
1574
+ async def update_stack_with_http_info(
1575
+ self,
1576
+ id: UUID,
1577
+ stack_update_dto: StackUpdateDto,
1578
+ _request_timeout: Union[
1579
+ None,
1580
+ Annotated[StrictFloat, Field(gt=0)],
1581
+ Tuple[
1582
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1583
+ ],
1584
+ ] = None,
1585
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1586
+ _content_type: Optional[StrictStr] = None,
1587
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1588
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1589
+ ) -> ApiResponse[StackResponseDto]:
1590
+ """Update a stack
1591
+
1592
+ Update an existing stack by its ID.
1593
+
1594
+ :param id: (required)
1595
+ :type id: UUID
1596
+ :param stack_update_dto: (required)
1597
+ :type stack_update_dto: StackUpdateDto
1598
+ :param _request_timeout: timeout setting for this request. If one
1599
+ number provided, it will be total request
1600
+ timeout. It can also be a pair (tuple) of
1601
+ (connection, read) timeouts.
1602
+ :type _request_timeout: int, tuple(int, int), optional
1603
+ :param _request_auth: set to override the auth_settings for an a single
1604
+ request; this effectively ignores the
1605
+ authentication in the spec for a single request.
1606
+ :type _request_auth: dict, optional
1607
+ :param _content_type: force content-type for the request.
1608
+ :type _content_type: str, Optional
1609
+ :param _headers: set to override the headers for a single
1610
+ request; this effectively ignores the headers
1611
+ in the spec for a single request.
1612
+ :type _headers: dict, optional
1613
+ :param _host_index: set to override the host_index for a single
1614
+ request; this effectively ignores the host_index
1615
+ in the spec for a single request.
1616
+ :type _host_index: int, optional
1617
+ :return: Returns the result object.
1618
+ """ # noqa: E501
1619
+
1620
+ _param = self._update_stack_serialize(
1621
+ id=id,
1622
+ stack_update_dto=stack_update_dto,
1623
+ _request_auth=_request_auth,
1624
+ _content_type=_content_type,
1625
+ _headers=_headers,
1626
+ _host_index=_host_index,
1627
+ )
1628
+
1629
+ _response_types_map: Dict[str, Optional[str]] = {
1630
+ "200": "StackResponseDto",
1631
+ }
1632
+ response_data = await self.api_client.call_api(
1633
+ *_param, _request_timeout=_request_timeout
1634
+ )
1635
+ await response_data.read()
1636
+ return self.api_client.response_deserialize(
1637
+ response_data=response_data,
1638
+ response_types_map=_response_types_map,
1639
+ )
1640
+
1641
+ @validate_call
1642
+ async def update_stack_without_preload_content(
1643
+ self,
1644
+ id: UUID,
1645
+ stack_update_dto: StackUpdateDto,
1646
+ _request_timeout: Union[
1647
+ None,
1648
+ Annotated[StrictFloat, Field(gt=0)],
1649
+ Tuple[
1650
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1651
+ ],
1652
+ ] = None,
1653
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1654
+ _content_type: Optional[StrictStr] = None,
1655
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1656
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1657
+ ) -> RESTResponseType:
1658
+ """Update a stack
1659
+
1660
+ Update an existing stack by its ID.
1661
+
1662
+ :param id: (required)
1663
+ :type id: UUID
1664
+ :param stack_update_dto: (required)
1665
+ :type stack_update_dto: StackUpdateDto
1666
+ :param _request_timeout: timeout setting for this request. If one
1667
+ number provided, it will be total request
1668
+ timeout. It can also be a pair (tuple) of
1669
+ (connection, read) timeouts.
1670
+ :type _request_timeout: int, tuple(int, int), optional
1671
+ :param _request_auth: set to override the auth_settings for an a single
1672
+ request; this effectively ignores the
1673
+ authentication in the spec for a single request.
1674
+ :type _request_auth: dict, optional
1675
+ :param _content_type: force content-type for the request.
1676
+ :type _content_type: str, Optional
1677
+ :param _headers: set to override the headers for a single
1678
+ request; this effectively ignores the headers
1679
+ in the spec for a single request.
1680
+ :type _headers: dict, optional
1681
+ :param _host_index: set to override the host_index for a single
1682
+ request; this effectively ignores the host_index
1683
+ in the spec for a single request.
1684
+ :type _host_index: int, optional
1685
+ :return: Returns the result object.
1686
+ """ # noqa: E501
1687
+
1688
+ _param = self._update_stack_serialize(
1689
+ id=id,
1690
+ stack_update_dto=stack_update_dto,
1691
+ _request_auth=_request_auth,
1692
+ _content_type=_content_type,
1693
+ _headers=_headers,
1694
+ _host_index=_host_index,
1695
+ )
1696
+
1697
+ _response_types_map: Dict[str, Optional[str]] = {
1698
+ "200": "StackResponseDto",
1699
+ }
1700
+ response_data = await self.api_client.call_api(
1701
+ *_param, _request_timeout=_request_timeout
1702
+ )
1703
+ return response_data.response
1704
+
1705
+ def _update_stack_serialize(
1706
+ self,
1707
+ id,
1708
+ stack_update_dto,
1709
+ _request_auth,
1710
+ _content_type,
1711
+ _headers,
1712
+ _host_index,
1713
+ ) -> RequestSerialized:
1714
+ _host = None
1715
+
1716
+ _collection_formats: Dict[str, str] = {}
1717
+
1718
+ _path_params: Dict[str, str] = {}
1719
+ _query_params: List[Tuple[str, str]] = []
1720
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1721
+ _form_params: List[Tuple[str, str]] = []
1722
+ _files: Dict[
1723
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1724
+ ] = {}
1725
+ _body_params: Optional[bytes] = None
1726
+
1727
+ # process the path parameters
1728
+ if id is not None:
1729
+ _path_params["id"] = id
1730
+ # process the query parameters
1731
+ # process the header parameters
1732
+ # process the form parameters
1733
+ # process the body parameter
1734
+ if stack_update_dto is not None:
1735
+ _body_params = stack_update_dto
1736
+
1737
+ # set the HTTP header `Accept`
1738
+ if "Accept" not in _header_params:
1739
+ _header_params["Accept"] = self.api_client.select_header_accept(
1740
+ ["application/json"]
1741
+ )
1742
+
1743
+ # set the HTTP header `Content-Type`
1744
+ if _content_type:
1745
+ _header_params["Content-Type"] = _content_type
1746
+ else:
1747
+ _default_content_type = self.api_client.select_header_content_type(
1748
+ ["application/json"]
1749
+ )
1750
+ if _default_content_type is not None:
1751
+ _header_params["Content-Type"] = _default_content_type
1752
+
1753
+ # authentication setting
1754
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
1755
+
1756
+ return self.api_client.param_serialize(
1757
+ method="PUT",
1758
+ resource_path="/stacks/{id}",
1759
+ path_params=_path_params,
1760
+ query_params=_query_params,
1761
+ header_params=_header_params,
1762
+ body=_body_params,
1763
+ post_params=_form_params,
1764
+ files=_files,
1765
+ auth_settings=_auth_settings,
1766
+ collection_formats=_collection_formats,
1767
+ _host=_host,
1768
+ _request_auth=_request_auth,
1769
+ )