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,967 @@
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 immich.client.models.system_config_dto import SystemConfigDto
19
+ from immich.client.models.system_config_template_storage_option_dto import (
20
+ SystemConfigTemplateStorageOptionDto,
21
+ )
22
+
23
+ from immich.client.api_client import ApiClient, RequestSerialized
24
+ from immich.client.api_response import ApiResponse
25
+ from immich.client.rest import RESTResponseType
26
+
27
+
28
+ class SystemConfigApi:
29
+ """NOTE: This class is auto generated by OpenAPI Generator
30
+ Ref: https://openapi-generator.tech
31
+
32
+ Do not edit the class manually.
33
+ """
34
+
35
+ def __init__(self, api_client=None) -> None:
36
+ if api_client is None:
37
+ api_client = ApiClient.get_default()
38
+ self.api_client = api_client
39
+
40
+ @validate_call
41
+ async def get_config(
42
+ self,
43
+ _request_timeout: Union[
44
+ None,
45
+ Annotated[StrictFloat, Field(gt=0)],
46
+ Tuple[
47
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
48
+ ],
49
+ ] = None,
50
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
51
+ _content_type: Optional[StrictStr] = None,
52
+ _headers: Optional[Dict[StrictStr, Any]] = None,
53
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
54
+ ) -> SystemConfigDto:
55
+ """Get system configuration
56
+
57
+ Retrieve the current system configuration.
58
+
59
+ :param _request_timeout: timeout setting for this request. If one
60
+ number provided, it will be total request
61
+ timeout. It can also be a pair (tuple) of
62
+ (connection, read) timeouts.
63
+ :type _request_timeout: int, tuple(int, int), optional
64
+ :param _request_auth: set to override the auth_settings for an a single
65
+ request; this effectively ignores the
66
+ authentication in the spec for a single request.
67
+ :type _request_auth: dict, optional
68
+ :param _content_type: force content-type for the request.
69
+ :type _content_type: str, Optional
70
+ :param _headers: set to override the headers for a single
71
+ request; this effectively ignores the headers
72
+ in the spec for a single request.
73
+ :type _headers: dict, optional
74
+ :param _host_index: set to override the host_index for a single
75
+ request; this effectively ignores the host_index
76
+ in the spec for a single request.
77
+ :type _host_index: int, optional
78
+ :return: Returns the result object.
79
+ """ # noqa: E501
80
+
81
+ _param = self._get_config_serialize(
82
+ _request_auth=_request_auth,
83
+ _content_type=_content_type,
84
+ _headers=_headers,
85
+ _host_index=_host_index,
86
+ )
87
+
88
+ _response_types_map: Dict[str, Optional[str]] = {
89
+ "200": "SystemConfigDto",
90
+ }
91
+ response_data = await self.api_client.call_api(
92
+ *_param, _request_timeout=_request_timeout
93
+ )
94
+ await response_data.read()
95
+ return self.api_client.response_deserialize(
96
+ response_data=response_data,
97
+ response_types_map=_response_types_map,
98
+ ).data
99
+
100
+ @validate_call
101
+ async def get_config_with_http_info(
102
+ self,
103
+ _request_timeout: Union[
104
+ None,
105
+ Annotated[StrictFloat, Field(gt=0)],
106
+ Tuple[
107
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
108
+ ],
109
+ ] = None,
110
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
111
+ _content_type: Optional[StrictStr] = None,
112
+ _headers: Optional[Dict[StrictStr, Any]] = None,
113
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
114
+ ) -> ApiResponse[SystemConfigDto]:
115
+ """Get system configuration
116
+
117
+ Retrieve the current system configuration.
118
+
119
+ :param _request_timeout: timeout setting for this request. If one
120
+ number provided, it will be total request
121
+ timeout. It can also be a pair (tuple) of
122
+ (connection, read) timeouts.
123
+ :type _request_timeout: int, tuple(int, int), optional
124
+ :param _request_auth: set to override the auth_settings for an a single
125
+ request; this effectively ignores the
126
+ authentication in the spec for a single request.
127
+ :type _request_auth: dict, optional
128
+ :param _content_type: force content-type for the request.
129
+ :type _content_type: str, Optional
130
+ :param _headers: set to override the headers for a single
131
+ request; this effectively ignores the headers
132
+ in the spec for a single request.
133
+ :type _headers: dict, optional
134
+ :param _host_index: set to override the host_index for a single
135
+ request; this effectively ignores the host_index
136
+ in the spec for a single request.
137
+ :type _host_index: int, optional
138
+ :return: Returns the result object.
139
+ """ # noqa: E501
140
+
141
+ _param = self._get_config_serialize(
142
+ _request_auth=_request_auth,
143
+ _content_type=_content_type,
144
+ _headers=_headers,
145
+ _host_index=_host_index,
146
+ )
147
+
148
+ _response_types_map: Dict[str, Optional[str]] = {
149
+ "200": "SystemConfigDto",
150
+ }
151
+ response_data = await self.api_client.call_api(
152
+ *_param, _request_timeout=_request_timeout
153
+ )
154
+ await response_data.read()
155
+ return self.api_client.response_deserialize(
156
+ response_data=response_data,
157
+ response_types_map=_response_types_map,
158
+ )
159
+
160
+ @validate_call
161
+ async def get_config_without_preload_content(
162
+ self,
163
+ _request_timeout: Union[
164
+ None,
165
+ Annotated[StrictFloat, Field(gt=0)],
166
+ Tuple[
167
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
168
+ ],
169
+ ] = None,
170
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
171
+ _content_type: Optional[StrictStr] = None,
172
+ _headers: Optional[Dict[StrictStr, Any]] = None,
173
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
174
+ ) -> RESTResponseType:
175
+ """Get system configuration
176
+
177
+ Retrieve the current system configuration.
178
+
179
+ :param _request_timeout: timeout setting for this request. If one
180
+ number provided, it will be total request
181
+ timeout. It can also be a pair (tuple) of
182
+ (connection, read) timeouts.
183
+ :type _request_timeout: int, tuple(int, int), optional
184
+ :param _request_auth: set to override the auth_settings for an a single
185
+ request; this effectively ignores the
186
+ authentication in the spec for a single request.
187
+ :type _request_auth: dict, optional
188
+ :param _content_type: force content-type for the request.
189
+ :type _content_type: str, Optional
190
+ :param _headers: set to override the headers for a single
191
+ request; this effectively ignores the headers
192
+ in the spec for a single request.
193
+ :type _headers: dict, optional
194
+ :param _host_index: set to override the host_index for a single
195
+ request; this effectively ignores the host_index
196
+ in the spec for a single request.
197
+ :type _host_index: int, optional
198
+ :return: Returns the result object.
199
+ """ # noqa: E501
200
+
201
+ _param = self._get_config_serialize(
202
+ _request_auth=_request_auth,
203
+ _content_type=_content_type,
204
+ _headers=_headers,
205
+ _host_index=_host_index,
206
+ )
207
+
208
+ _response_types_map: Dict[str, Optional[str]] = {
209
+ "200": "SystemConfigDto",
210
+ }
211
+ response_data = await self.api_client.call_api(
212
+ *_param, _request_timeout=_request_timeout
213
+ )
214
+ return response_data.response
215
+
216
+ def _get_config_serialize(
217
+ self,
218
+ _request_auth,
219
+ _content_type,
220
+ _headers,
221
+ _host_index,
222
+ ) -> RequestSerialized:
223
+ _host = None
224
+
225
+ _collection_formats: Dict[str, str] = {}
226
+
227
+ _path_params: Dict[str, str] = {}
228
+ _query_params: List[Tuple[str, str]] = []
229
+ _header_params: Dict[str, Optional[str]] = _headers or {}
230
+ _form_params: List[Tuple[str, str]] = []
231
+ _files: Dict[
232
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
233
+ ] = {}
234
+ _body_params: Optional[bytes] = None
235
+
236
+ # process the path parameters
237
+ # process the query parameters
238
+ # process the header parameters
239
+ # process the form parameters
240
+ # process the body parameter
241
+
242
+ # set the HTTP header `Accept`
243
+ if "Accept" not in _header_params:
244
+ _header_params["Accept"] = self.api_client.select_header_accept(
245
+ ["application/json"]
246
+ )
247
+
248
+ # authentication setting
249
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
250
+
251
+ return self.api_client.param_serialize(
252
+ method="GET",
253
+ resource_path="/system-config",
254
+ path_params=_path_params,
255
+ query_params=_query_params,
256
+ header_params=_header_params,
257
+ body=_body_params,
258
+ post_params=_form_params,
259
+ files=_files,
260
+ auth_settings=_auth_settings,
261
+ collection_formats=_collection_formats,
262
+ _host=_host,
263
+ _request_auth=_request_auth,
264
+ )
265
+
266
+ @validate_call
267
+ async def get_config_defaults(
268
+ self,
269
+ _request_timeout: Union[
270
+ None,
271
+ Annotated[StrictFloat, Field(gt=0)],
272
+ Tuple[
273
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
274
+ ],
275
+ ] = None,
276
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
277
+ _content_type: Optional[StrictStr] = None,
278
+ _headers: Optional[Dict[StrictStr, Any]] = None,
279
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
280
+ ) -> SystemConfigDto:
281
+ """Get system configuration defaults
282
+
283
+ Retrieve the default values for the system configuration.
284
+
285
+ :param _request_timeout: timeout setting for this request. If one
286
+ number provided, it will be total request
287
+ timeout. It can also be a pair (tuple) of
288
+ (connection, read) timeouts.
289
+ :type _request_timeout: int, tuple(int, int), optional
290
+ :param _request_auth: set to override the auth_settings for an a single
291
+ request; this effectively ignores the
292
+ authentication in the spec for a single request.
293
+ :type _request_auth: dict, optional
294
+ :param _content_type: force content-type for the request.
295
+ :type _content_type: str, Optional
296
+ :param _headers: set to override the headers for a single
297
+ request; this effectively ignores the headers
298
+ in the spec for a single request.
299
+ :type _headers: dict, optional
300
+ :param _host_index: set to override the host_index for a single
301
+ request; this effectively ignores the host_index
302
+ in the spec for a single request.
303
+ :type _host_index: int, optional
304
+ :return: Returns the result object.
305
+ """ # noqa: E501
306
+
307
+ _param = self._get_config_defaults_serialize(
308
+ _request_auth=_request_auth,
309
+ _content_type=_content_type,
310
+ _headers=_headers,
311
+ _host_index=_host_index,
312
+ )
313
+
314
+ _response_types_map: Dict[str, Optional[str]] = {
315
+ "200": "SystemConfigDto",
316
+ }
317
+ response_data = await self.api_client.call_api(
318
+ *_param, _request_timeout=_request_timeout
319
+ )
320
+ await response_data.read()
321
+ return self.api_client.response_deserialize(
322
+ response_data=response_data,
323
+ response_types_map=_response_types_map,
324
+ ).data
325
+
326
+ @validate_call
327
+ async def get_config_defaults_with_http_info(
328
+ self,
329
+ _request_timeout: Union[
330
+ None,
331
+ Annotated[StrictFloat, Field(gt=0)],
332
+ Tuple[
333
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
334
+ ],
335
+ ] = None,
336
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
337
+ _content_type: Optional[StrictStr] = None,
338
+ _headers: Optional[Dict[StrictStr, Any]] = None,
339
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
340
+ ) -> ApiResponse[SystemConfigDto]:
341
+ """Get system configuration defaults
342
+
343
+ Retrieve the default values for the system configuration.
344
+
345
+ :param _request_timeout: timeout setting for this request. If one
346
+ number provided, it will be total request
347
+ timeout. It can also be a pair (tuple) of
348
+ (connection, read) timeouts.
349
+ :type _request_timeout: int, tuple(int, int), optional
350
+ :param _request_auth: set to override the auth_settings for an a single
351
+ request; this effectively ignores the
352
+ authentication in the spec for a single request.
353
+ :type _request_auth: dict, optional
354
+ :param _content_type: force content-type for the request.
355
+ :type _content_type: str, Optional
356
+ :param _headers: set to override the headers for a single
357
+ request; this effectively ignores the headers
358
+ in the spec for a single request.
359
+ :type _headers: dict, optional
360
+ :param _host_index: set to override the host_index for a single
361
+ request; this effectively ignores the host_index
362
+ in the spec for a single request.
363
+ :type _host_index: int, optional
364
+ :return: Returns the result object.
365
+ """ # noqa: E501
366
+
367
+ _param = self._get_config_defaults_serialize(
368
+ _request_auth=_request_auth,
369
+ _content_type=_content_type,
370
+ _headers=_headers,
371
+ _host_index=_host_index,
372
+ )
373
+
374
+ _response_types_map: Dict[str, Optional[str]] = {
375
+ "200": "SystemConfigDto",
376
+ }
377
+ response_data = await self.api_client.call_api(
378
+ *_param, _request_timeout=_request_timeout
379
+ )
380
+ await response_data.read()
381
+ return self.api_client.response_deserialize(
382
+ response_data=response_data,
383
+ response_types_map=_response_types_map,
384
+ )
385
+
386
+ @validate_call
387
+ async def get_config_defaults_without_preload_content(
388
+ self,
389
+ _request_timeout: Union[
390
+ None,
391
+ Annotated[StrictFloat, Field(gt=0)],
392
+ Tuple[
393
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
394
+ ],
395
+ ] = None,
396
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
397
+ _content_type: Optional[StrictStr] = None,
398
+ _headers: Optional[Dict[StrictStr, Any]] = None,
399
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
400
+ ) -> RESTResponseType:
401
+ """Get system configuration defaults
402
+
403
+ Retrieve the default values for the system configuration.
404
+
405
+ :param _request_timeout: timeout setting for this request. If one
406
+ number provided, it will be total request
407
+ timeout. It can also be a pair (tuple) of
408
+ (connection, read) timeouts.
409
+ :type _request_timeout: int, tuple(int, int), optional
410
+ :param _request_auth: set to override the auth_settings for an a single
411
+ request; this effectively ignores the
412
+ authentication in the spec for a single request.
413
+ :type _request_auth: dict, optional
414
+ :param _content_type: force content-type for the request.
415
+ :type _content_type: str, Optional
416
+ :param _headers: set to override the headers for a single
417
+ request; this effectively ignores the headers
418
+ in the spec for a single request.
419
+ :type _headers: dict, optional
420
+ :param _host_index: set to override the host_index for a single
421
+ request; this effectively ignores the host_index
422
+ in the spec for a single request.
423
+ :type _host_index: int, optional
424
+ :return: Returns the result object.
425
+ """ # noqa: E501
426
+
427
+ _param = self._get_config_defaults_serialize(
428
+ _request_auth=_request_auth,
429
+ _content_type=_content_type,
430
+ _headers=_headers,
431
+ _host_index=_host_index,
432
+ )
433
+
434
+ _response_types_map: Dict[str, Optional[str]] = {
435
+ "200": "SystemConfigDto",
436
+ }
437
+ response_data = await self.api_client.call_api(
438
+ *_param, _request_timeout=_request_timeout
439
+ )
440
+ return response_data.response
441
+
442
+ def _get_config_defaults_serialize(
443
+ self,
444
+ _request_auth,
445
+ _content_type,
446
+ _headers,
447
+ _host_index,
448
+ ) -> RequestSerialized:
449
+ _host = None
450
+
451
+ _collection_formats: Dict[str, str] = {}
452
+
453
+ _path_params: Dict[str, str] = {}
454
+ _query_params: List[Tuple[str, str]] = []
455
+ _header_params: Dict[str, Optional[str]] = _headers or {}
456
+ _form_params: List[Tuple[str, str]] = []
457
+ _files: Dict[
458
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
459
+ ] = {}
460
+ _body_params: Optional[bytes] = None
461
+
462
+ # process the path parameters
463
+ # process the query parameters
464
+ # process the header parameters
465
+ # process the form parameters
466
+ # process the body parameter
467
+
468
+ # set the HTTP header `Accept`
469
+ if "Accept" not in _header_params:
470
+ _header_params["Accept"] = self.api_client.select_header_accept(
471
+ ["application/json"]
472
+ )
473
+
474
+ # authentication setting
475
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
476
+
477
+ return self.api_client.param_serialize(
478
+ method="GET",
479
+ resource_path="/system-config/defaults",
480
+ path_params=_path_params,
481
+ query_params=_query_params,
482
+ header_params=_header_params,
483
+ body=_body_params,
484
+ post_params=_form_params,
485
+ files=_files,
486
+ auth_settings=_auth_settings,
487
+ collection_formats=_collection_formats,
488
+ _host=_host,
489
+ _request_auth=_request_auth,
490
+ )
491
+
492
+ @validate_call
493
+ async def get_storage_template_options(
494
+ self,
495
+ _request_timeout: Union[
496
+ None,
497
+ Annotated[StrictFloat, Field(gt=0)],
498
+ Tuple[
499
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
500
+ ],
501
+ ] = None,
502
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
503
+ _content_type: Optional[StrictStr] = None,
504
+ _headers: Optional[Dict[StrictStr, Any]] = None,
505
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
506
+ ) -> SystemConfigTemplateStorageOptionDto:
507
+ """Get storage template options
508
+
509
+ Retrieve exemplary storage template options.
510
+
511
+ :param _request_timeout: timeout setting for this request. If one
512
+ number provided, it will be total request
513
+ timeout. It can also be a pair (tuple) of
514
+ (connection, read) timeouts.
515
+ :type _request_timeout: int, tuple(int, int), optional
516
+ :param _request_auth: set to override the auth_settings for an a single
517
+ request; this effectively ignores the
518
+ authentication in the spec for a single request.
519
+ :type _request_auth: dict, optional
520
+ :param _content_type: force content-type for the request.
521
+ :type _content_type: str, Optional
522
+ :param _headers: set to override the headers for a single
523
+ request; this effectively ignores the headers
524
+ in the spec for a single request.
525
+ :type _headers: dict, optional
526
+ :param _host_index: set to override the host_index for a single
527
+ request; this effectively ignores the host_index
528
+ in the spec for a single request.
529
+ :type _host_index: int, optional
530
+ :return: Returns the result object.
531
+ """ # noqa: E501
532
+
533
+ _param = self._get_storage_template_options_serialize(
534
+ _request_auth=_request_auth,
535
+ _content_type=_content_type,
536
+ _headers=_headers,
537
+ _host_index=_host_index,
538
+ )
539
+
540
+ _response_types_map: Dict[str, Optional[str]] = {
541
+ "200": "SystemConfigTemplateStorageOptionDto",
542
+ }
543
+ response_data = await self.api_client.call_api(
544
+ *_param, _request_timeout=_request_timeout
545
+ )
546
+ await response_data.read()
547
+ return self.api_client.response_deserialize(
548
+ response_data=response_data,
549
+ response_types_map=_response_types_map,
550
+ ).data
551
+
552
+ @validate_call
553
+ async def get_storage_template_options_with_http_info(
554
+ self,
555
+ _request_timeout: Union[
556
+ None,
557
+ Annotated[StrictFloat, Field(gt=0)],
558
+ Tuple[
559
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
560
+ ],
561
+ ] = None,
562
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
563
+ _content_type: Optional[StrictStr] = None,
564
+ _headers: Optional[Dict[StrictStr, Any]] = None,
565
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
566
+ ) -> ApiResponse[SystemConfigTemplateStorageOptionDto]:
567
+ """Get storage template options
568
+
569
+ Retrieve exemplary storage template options.
570
+
571
+ :param _request_timeout: timeout setting for this request. If one
572
+ number provided, it will be total request
573
+ timeout. It can also be a pair (tuple) of
574
+ (connection, read) timeouts.
575
+ :type _request_timeout: int, tuple(int, int), optional
576
+ :param _request_auth: set to override the auth_settings for an a single
577
+ request; this effectively ignores the
578
+ authentication in the spec for a single request.
579
+ :type _request_auth: dict, optional
580
+ :param _content_type: force content-type for the request.
581
+ :type _content_type: str, Optional
582
+ :param _headers: set to override the headers for a single
583
+ request; this effectively ignores the headers
584
+ in the spec for a single request.
585
+ :type _headers: dict, optional
586
+ :param _host_index: set to override the host_index for a single
587
+ request; this effectively ignores the host_index
588
+ in the spec for a single request.
589
+ :type _host_index: int, optional
590
+ :return: Returns the result object.
591
+ """ # noqa: E501
592
+
593
+ _param = self._get_storage_template_options_serialize(
594
+ _request_auth=_request_auth,
595
+ _content_type=_content_type,
596
+ _headers=_headers,
597
+ _host_index=_host_index,
598
+ )
599
+
600
+ _response_types_map: Dict[str, Optional[str]] = {
601
+ "200": "SystemConfigTemplateStorageOptionDto",
602
+ }
603
+ response_data = await self.api_client.call_api(
604
+ *_param, _request_timeout=_request_timeout
605
+ )
606
+ await response_data.read()
607
+ return self.api_client.response_deserialize(
608
+ response_data=response_data,
609
+ response_types_map=_response_types_map,
610
+ )
611
+
612
+ @validate_call
613
+ async def get_storage_template_options_without_preload_content(
614
+ self,
615
+ _request_timeout: Union[
616
+ None,
617
+ Annotated[StrictFloat, Field(gt=0)],
618
+ Tuple[
619
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
620
+ ],
621
+ ] = None,
622
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
623
+ _content_type: Optional[StrictStr] = None,
624
+ _headers: Optional[Dict[StrictStr, Any]] = None,
625
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
626
+ ) -> RESTResponseType:
627
+ """Get storage template options
628
+
629
+ Retrieve exemplary storage template options.
630
+
631
+ :param _request_timeout: timeout setting for this request. If one
632
+ number provided, it will be total request
633
+ timeout. It can also be a pair (tuple) of
634
+ (connection, read) timeouts.
635
+ :type _request_timeout: int, tuple(int, int), optional
636
+ :param _request_auth: set to override the auth_settings for an a single
637
+ request; this effectively ignores the
638
+ authentication in the spec for a single request.
639
+ :type _request_auth: dict, optional
640
+ :param _content_type: force content-type for the request.
641
+ :type _content_type: str, Optional
642
+ :param _headers: set to override the headers for a single
643
+ request; this effectively ignores the headers
644
+ in the spec for a single request.
645
+ :type _headers: dict, optional
646
+ :param _host_index: set to override the host_index for a single
647
+ request; this effectively ignores the host_index
648
+ in the spec for a single request.
649
+ :type _host_index: int, optional
650
+ :return: Returns the result object.
651
+ """ # noqa: E501
652
+
653
+ _param = self._get_storage_template_options_serialize(
654
+ _request_auth=_request_auth,
655
+ _content_type=_content_type,
656
+ _headers=_headers,
657
+ _host_index=_host_index,
658
+ )
659
+
660
+ _response_types_map: Dict[str, Optional[str]] = {
661
+ "200": "SystemConfigTemplateStorageOptionDto",
662
+ }
663
+ response_data = await self.api_client.call_api(
664
+ *_param, _request_timeout=_request_timeout
665
+ )
666
+ return response_data.response
667
+
668
+ def _get_storage_template_options_serialize(
669
+ self,
670
+ _request_auth,
671
+ _content_type,
672
+ _headers,
673
+ _host_index,
674
+ ) -> RequestSerialized:
675
+ _host = None
676
+
677
+ _collection_formats: Dict[str, str] = {}
678
+
679
+ _path_params: Dict[str, str] = {}
680
+ _query_params: List[Tuple[str, str]] = []
681
+ _header_params: Dict[str, Optional[str]] = _headers or {}
682
+ _form_params: List[Tuple[str, str]] = []
683
+ _files: Dict[
684
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
685
+ ] = {}
686
+ _body_params: Optional[bytes] = None
687
+
688
+ # process the path parameters
689
+ # process the query parameters
690
+ # process the header parameters
691
+ # process the form parameters
692
+ # process the body parameter
693
+
694
+ # set the HTTP header `Accept`
695
+ if "Accept" not in _header_params:
696
+ _header_params["Accept"] = self.api_client.select_header_accept(
697
+ ["application/json"]
698
+ )
699
+
700
+ # authentication setting
701
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
702
+
703
+ return self.api_client.param_serialize(
704
+ method="GET",
705
+ resource_path="/system-config/storage-template-options",
706
+ path_params=_path_params,
707
+ query_params=_query_params,
708
+ header_params=_header_params,
709
+ body=_body_params,
710
+ post_params=_form_params,
711
+ files=_files,
712
+ auth_settings=_auth_settings,
713
+ collection_formats=_collection_formats,
714
+ _host=_host,
715
+ _request_auth=_request_auth,
716
+ )
717
+
718
+ @validate_call
719
+ async def update_config(
720
+ self,
721
+ system_config_dto: SystemConfigDto,
722
+ _request_timeout: Union[
723
+ None,
724
+ Annotated[StrictFloat, Field(gt=0)],
725
+ Tuple[
726
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
727
+ ],
728
+ ] = None,
729
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
730
+ _content_type: Optional[StrictStr] = None,
731
+ _headers: Optional[Dict[StrictStr, Any]] = None,
732
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
733
+ ) -> SystemConfigDto:
734
+ """Update system configuration
735
+
736
+ Update the system configuration with a new system configuration.
737
+
738
+ :param system_config_dto: (required)
739
+ :type system_config_dto: SystemConfigDto
740
+ :param _request_timeout: timeout setting for this request. If one
741
+ number provided, it will be total request
742
+ timeout. It can also be a pair (tuple) of
743
+ (connection, read) timeouts.
744
+ :type _request_timeout: int, tuple(int, int), optional
745
+ :param _request_auth: set to override the auth_settings for an a single
746
+ request; this effectively ignores the
747
+ authentication in the spec for a single request.
748
+ :type _request_auth: dict, optional
749
+ :param _content_type: force content-type for the request.
750
+ :type _content_type: str, Optional
751
+ :param _headers: set to override the headers for a single
752
+ request; this effectively ignores the headers
753
+ in the spec for a single request.
754
+ :type _headers: dict, optional
755
+ :param _host_index: set to override the host_index for a single
756
+ request; this effectively ignores the host_index
757
+ in the spec for a single request.
758
+ :type _host_index: int, optional
759
+ :return: Returns the result object.
760
+ """ # noqa: E501
761
+
762
+ _param = self._update_config_serialize(
763
+ system_config_dto=system_config_dto,
764
+ _request_auth=_request_auth,
765
+ _content_type=_content_type,
766
+ _headers=_headers,
767
+ _host_index=_host_index,
768
+ )
769
+
770
+ _response_types_map: Dict[str, Optional[str]] = {
771
+ "200": "SystemConfigDto",
772
+ }
773
+ response_data = await self.api_client.call_api(
774
+ *_param, _request_timeout=_request_timeout
775
+ )
776
+ await response_data.read()
777
+ return self.api_client.response_deserialize(
778
+ response_data=response_data,
779
+ response_types_map=_response_types_map,
780
+ ).data
781
+
782
+ @validate_call
783
+ async def update_config_with_http_info(
784
+ self,
785
+ system_config_dto: SystemConfigDto,
786
+ _request_timeout: Union[
787
+ None,
788
+ Annotated[StrictFloat, Field(gt=0)],
789
+ Tuple[
790
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
791
+ ],
792
+ ] = None,
793
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
794
+ _content_type: Optional[StrictStr] = None,
795
+ _headers: Optional[Dict[StrictStr, Any]] = None,
796
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
797
+ ) -> ApiResponse[SystemConfigDto]:
798
+ """Update system configuration
799
+
800
+ Update the system configuration with a new system configuration.
801
+
802
+ :param system_config_dto: (required)
803
+ :type system_config_dto: SystemConfigDto
804
+ :param _request_timeout: timeout setting for this request. If one
805
+ number provided, it will be total request
806
+ timeout. It can also be a pair (tuple) of
807
+ (connection, read) timeouts.
808
+ :type _request_timeout: int, tuple(int, int), optional
809
+ :param _request_auth: set to override the auth_settings for an a single
810
+ request; this effectively ignores the
811
+ authentication in the spec for a single request.
812
+ :type _request_auth: dict, optional
813
+ :param _content_type: force content-type for the request.
814
+ :type _content_type: str, Optional
815
+ :param _headers: set to override the headers for a single
816
+ request; this effectively ignores the headers
817
+ in the spec for a single request.
818
+ :type _headers: dict, optional
819
+ :param _host_index: set to override the host_index for a single
820
+ request; this effectively ignores the host_index
821
+ in the spec for a single request.
822
+ :type _host_index: int, optional
823
+ :return: Returns the result object.
824
+ """ # noqa: E501
825
+
826
+ _param = self._update_config_serialize(
827
+ system_config_dto=system_config_dto,
828
+ _request_auth=_request_auth,
829
+ _content_type=_content_type,
830
+ _headers=_headers,
831
+ _host_index=_host_index,
832
+ )
833
+
834
+ _response_types_map: Dict[str, Optional[str]] = {
835
+ "200": "SystemConfigDto",
836
+ }
837
+ response_data = await self.api_client.call_api(
838
+ *_param, _request_timeout=_request_timeout
839
+ )
840
+ await response_data.read()
841
+ return self.api_client.response_deserialize(
842
+ response_data=response_data,
843
+ response_types_map=_response_types_map,
844
+ )
845
+
846
+ @validate_call
847
+ async def update_config_without_preload_content(
848
+ self,
849
+ system_config_dto: SystemConfigDto,
850
+ _request_timeout: Union[
851
+ None,
852
+ Annotated[StrictFloat, Field(gt=0)],
853
+ Tuple[
854
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
855
+ ],
856
+ ] = None,
857
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
858
+ _content_type: Optional[StrictStr] = None,
859
+ _headers: Optional[Dict[StrictStr, Any]] = None,
860
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
861
+ ) -> RESTResponseType:
862
+ """Update system configuration
863
+
864
+ Update the system configuration with a new system configuration.
865
+
866
+ :param system_config_dto: (required)
867
+ :type system_config_dto: SystemConfigDto
868
+ :param _request_timeout: timeout setting for this request. If one
869
+ number provided, it will be total request
870
+ timeout. It can also be a pair (tuple) of
871
+ (connection, read) timeouts.
872
+ :type _request_timeout: int, tuple(int, int), optional
873
+ :param _request_auth: set to override the auth_settings for an a single
874
+ request; this effectively ignores the
875
+ authentication in the spec for a single request.
876
+ :type _request_auth: dict, optional
877
+ :param _content_type: force content-type for the request.
878
+ :type _content_type: str, Optional
879
+ :param _headers: set to override the headers for a single
880
+ request; this effectively ignores the headers
881
+ in the spec for a single request.
882
+ :type _headers: dict, optional
883
+ :param _host_index: set to override the host_index for a single
884
+ request; this effectively ignores the host_index
885
+ in the spec for a single request.
886
+ :type _host_index: int, optional
887
+ :return: Returns the result object.
888
+ """ # noqa: E501
889
+
890
+ _param = self._update_config_serialize(
891
+ system_config_dto=system_config_dto,
892
+ _request_auth=_request_auth,
893
+ _content_type=_content_type,
894
+ _headers=_headers,
895
+ _host_index=_host_index,
896
+ )
897
+
898
+ _response_types_map: Dict[str, Optional[str]] = {
899
+ "200": "SystemConfigDto",
900
+ }
901
+ response_data = await self.api_client.call_api(
902
+ *_param, _request_timeout=_request_timeout
903
+ )
904
+ return response_data.response
905
+
906
+ def _update_config_serialize(
907
+ self,
908
+ system_config_dto,
909
+ _request_auth,
910
+ _content_type,
911
+ _headers,
912
+ _host_index,
913
+ ) -> RequestSerialized:
914
+ _host = None
915
+
916
+ _collection_formats: Dict[str, str] = {}
917
+
918
+ _path_params: Dict[str, str] = {}
919
+ _query_params: List[Tuple[str, str]] = []
920
+ _header_params: Dict[str, Optional[str]] = _headers or {}
921
+ _form_params: List[Tuple[str, str]] = []
922
+ _files: Dict[
923
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
924
+ ] = {}
925
+ _body_params: Optional[bytes] = None
926
+
927
+ # process the path parameters
928
+ # process the query parameters
929
+ # process the header parameters
930
+ # process the form parameters
931
+ # process the body parameter
932
+ if system_config_dto is not None:
933
+ _body_params = system_config_dto
934
+
935
+ # set the HTTP header `Accept`
936
+ if "Accept" not in _header_params:
937
+ _header_params["Accept"] = self.api_client.select_header_accept(
938
+ ["application/json"]
939
+ )
940
+
941
+ # set the HTTP header `Content-Type`
942
+ if _content_type:
943
+ _header_params["Content-Type"] = _content_type
944
+ else:
945
+ _default_content_type = self.api_client.select_header_content_type(
946
+ ["application/json"]
947
+ )
948
+ if _default_content_type is not None:
949
+ _header_params["Content-Type"] = _default_content_type
950
+
951
+ # authentication setting
952
+ _auth_settings: List[str] = ["cookie", "api_key", "bearer"]
953
+
954
+ return self.api_client.param_serialize(
955
+ method="PUT",
956
+ resource_path="/system-config",
957
+ path_params=_path_params,
958
+ query_params=_query_params,
959
+ header_params=_header_params,
960
+ body=_body_params,
961
+ post_params=_form_params,
962
+ files=_files,
963
+ auth_settings=_auth_settings,
964
+ collection_formats=_collection_formats,
965
+ _host=_host,
966
+ _request_auth=_request_auth,
967
+ )