harbor-framework-client 0.1.0__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 (433) hide show
  1. harbor_client/__init__.py +49 -0
  2. harbor_client/__init__.pyi +661 -0
  3. harbor_client/_openapi.json.gz +0 -0
  4. harbor_client/account/__init__.py +3 -0
  5. harbor_client/account/client.py +236 -0
  6. harbor_client/agents/__init__.py +3 -0
  7. harbor_client/agents/client.py +230 -0
  8. harbor_client/api_keys/__init__.py +3 -0
  9. harbor_client/api_keys/client.py +457 -0
  10. harbor_client/api_keys/types/__init__.py +13 -0
  11. harbor_client/api_keys/types/api_keys_list_bad_request_response.py +13 -0
  12. harbor_client/base_client.py +912 -0
  13. harbor_client/client.py +207 -0
  14. harbor_client/core/__init__.py +20 -0
  15. harbor_client/core/api_error.py +3 -0
  16. harbor_client/core/client_wrapper.py +73 -0
  17. harbor_client/core/file.py +57 -0
  18. harbor_client/core/http_response.py +5 -0
  19. harbor_client/core/httpx_session.py +136 -0
  20. harbor_client/core/jsonable_encoder.py +52 -0
  21. harbor_client/core/remove_none_from_dict.py +5 -0
  22. harbor_client/core/request_options.py +47 -0
  23. harbor_client/environment.py +4 -0
  24. harbor_client/errors.py +119 -0
  25. harbor_client/jobs/__init__.py +3 -0
  26. harbor_client/jobs/client.py +2994 -0
  27. harbor_client/jobs/types/__init__.py +97 -0
  28. harbor_client/jobs/types/jobs_get_filters_request_field.py +3 -0
  29. harbor_client/jobs/types/jobs_get_overview_request_force_combined.py +3 -0
  30. harbor_client/jobs/types/jobs_list_bad_request_response.py +13 -0
  31. harbor_client/jobs/types/jobs_list_request_sort.py +3 -0
  32. harbor_client/jobs/types/jobs_list_tasks_bad_request_response.py +13 -0
  33. harbor_client/jobs/types/jobs_list_tasks_request_sort_by.py +3 -0
  34. harbor_client/jobs/types/jobs_list_tasks_request_sort_order.py +3 -0
  35. harbor_client/jobs/types/jobs_submit_response.py +3 -0
  36. harbor_client/jobs/types/result_job_create_visibility.py +3 -0
  37. harbor_client/jobs/types/submit_job_request_config.py +3 -0
  38. harbor_client/jobs/types/submit_job_request_config_agent_setup_timeout_multiplier.py +3 -0
  39. harbor_client/jobs/types/submit_job_request_config_agent_setup_timeout_multiplier_one.py +3 -0
  40. harbor_client/jobs/types/submit_job_request_config_agent_timeout_multiplier.py +3 -0
  41. harbor_client/jobs/types/submit_job_request_config_agent_timeout_multiplier_one.py +3 -0
  42. harbor_client/jobs/types/submit_job_request_config_artifacts_item.py +3 -0
  43. harbor_client/jobs/types/submit_job_request_config_credential_mode.py +3 -0
  44. harbor_client/jobs/types/submit_job_request_config_environment_build_timeout_multiplier.py +3 -0
  45. harbor_client/jobs/types/submit_job_request_config_environment_build_timeout_multiplier_one.py +3 -0
  46. harbor_client/jobs/types/submit_job_request_config_timeout_multiplier.py +3 -0
  47. harbor_client/jobs/types/submit_job_request_config_timeout_multiplier_one.py +3 -0
  48. harbor_client/jobs/types/submit_job_request_config_verifier_timeout_multiplier.py +3 -0
  49. harbor_client/jobs/types/submit_job_request_config_verifier_timeout_multiplier_one.py +3 -0
  50. harbor_client/jobs/types/submit_job_request_regrade.py +3 -0
  51. harbor_client/jobs/types/submit_job_request_regrade_source_trial_id.py +3 -0
  52. harbor_client/jobs/types/update_job_sharing_request_visibility.py +3 -0
  53. harbor_client/leaderboards/__init__.py +3 -0
  54. harbor_client/leaderboards/client.py +1354 -0
  55. harbor_client/leaderboards/types/__init__.py +61 -0
  56. harbor_client/leaderboards/types/leaderboards_create_request_visibility.py +3 -0
  57. harbor_client/leaderboards/types/leaderboards_list_bad_request_response.py +13 -0
  58. harbor_client/leaderboards/types/leaderboards_list_rows_bad_request_response.py +13 -0
  59. harbor_client/leaderboards/types/leaderboards_list_trials_bad_request_response.py +13 -0
  60. harbor_client/leaderboards/types/leaderboards_update_request_definition.py +3 -0
  61. harbor_client/leaderboards/types/leaderboards_update_request_definition_visibility.py +3 -0
  62. harbor_client/leaderboards/types/leaderboards_update_request_row_deletes_item.py +3 -0
  63. harbor_client/leaderboards/types/leaderboards_update_request_row_updates_item.py +3 -0
  64. harbor_client/leaderboards/types/leaderboards_update_request_row_updates_item_status.py +3 -0
  65. harbor_client/leaderboards/types/leaderboards_update_request_trial_updates_item.py +3 -0
  66. harbor_client/leaderboards/types/leaderboards_update_request_trial_updates_item_operation.py +3 -0
  67. harbor_client/net/__init__.py +0 -0
  68. harbor_client/net/environment/__init__.py +4 -0
  69. harbor_client/net/environment/environment.py +32 -0
  70. harbor_client/net/headers/__init__.py +0 -0
  71. harbor_client/net/headers/access_token_auth.py +75 -0
  72. harbor_client/net/headers/base_header.py +34 -0
  73. harbor_client/net/request_chain/__init__.py +0 -0
  74. harbor_client/net/request_chain/handlers/__init__.py +0 -0
  75. harbor_client/net/request_chain/handlers/base_handler.py +51 -0
  76. harbor_client/net/request_chain/handlers/http_handler.py +607 -0
  77. harbor_client/net/request_chain/handlers/logging_handler.py +186 -0
  78. harbor_client/net/request_chain/handlers/retry_handler.py +295 -0
  79. harbor_client/net/request_chain/request_chain.py +76 -0
  80. harbor_client/net/sdk_config.py +101 -0
  81. harbor_client/net/transport/__init__.py +0 -0
  82. harbor_client/net/transport/api_error.py +118 -0
  83. harbor_client/net/transport/http_response.py +83 -0
  84. harbor_client/net/transport/pagination.py +156 -0
  85. harbor_client/net/transport/request.py +190 -0
  86. harbor_client/net/transport/request_error.py +34 -0
  87. harbor_client/net/transport/response.py +456 -0
  88. harbor_client/net/transport/serializer.py +490 -0
  89. harbor_client/net/transport/utils.py +41 -0
  90. harbor_client/organizations/__init__.py +3 -0
  91. harbor_client/organizations/client.py +346 -0
  92. harbor_client/packages/__init__.py +3 -0
  93. harbor_client/packages/client.py +2277 -0
  94. harbor_client/packages/types/__init__.py +53 -0
  95. harbor_client/packages/types/packages_list_version_catalog_bad_request_response.py +13 -0
  96. harbor_client/packages/types/packages_list_version_catalog_request_include_yanked.py +3 -0
  97. harbor_client/packages/types/packages_list_version_catalog_request_type.py +3 -0
  98. harbor_client/packages/types/packages_list_version_files_bad_request_response.py +13 -0
  99. harbor_client/packages/types/packages_list_versions_bad_request_response.py +13 -0
  100. harbor_client/packages/types/packages_list_versions_request_include_yanked.py +3 -0
  101. harbor_client/packages/types/packages_set_visibility_request_visibility.py +3 -0
  102. harbor_client/packages/types/packages_update_organization_access_request_action.py +3 -0
  103. harbor_client/py.typed +1 -0
  104. harbor_client/rollouts/__init__.py +3 -0
  105. harbor_client/rollouts/client.py +1364 -0
  106. harbor_client/rollouts/types/__init__.py +31 -0
  107. harbor_client/rollouts/types/rollouts_get_filters_request_attempts.py +3 -0
  108. harbor_client/rollouts/types/rollouts_get_filters_request_failed_only.py +3 -0
  109. harbor_client/rollouts/types/rollouts_get_filters_request_field.py +3 -0
  110. harbor_client/rollouts/types/rollouts_get_filters_request_terminal.py +3 -0
  111. harbor_client/rollouts/types/rollouts_list_bad_request_response.py +13 -0
  112. harbor_client/rollouts/types/rollouts_list_request_attempts.py +3 -0
  113. harbor_client/rollouts/types/rollouts_list_request_failed_only.py +3 -0
  114. harbor_client/rollouts/types/rollouts_list_request_sort.py +3 -0
  115. harbor_client/rollouts/types/rollouts_list_request_terminal.py +3 -0
  116. harbor_client/secrets/__init__.py +3 -0
  117. harbor_client/secrets/client.py +1309 -0
  118. harbor_client/secrets/types/__init__.py +61 -0
  119. harbor_client/secrets/types/registry_credential_upsert_encoded_provider.py +3 -0
  120. harbor_client/secrets/types/secrets_list_bad_request_response.py +13 -0
  121. harbor_client/secrets/types/secrets_list_registry_credentials_request_status.py +3 -0
  122. harbor_client/secrets/types/secrets_list_registry_credentials_response.py +3 -0
  123. harbor_client/secrets/types/secrets_list_request_status_filter.py +3 -0
  124. harbor_client/secrets/types/secrets_preflight_request_config.py +3 -0
  125. harbor_client/secrets/types/secrets_preflight_request_config_credential_mode.py +3 -0
  126. harbor_client/secrets/types/secrets_revoke_registry_credential_request_purge.py +3 -0
  127. harbor_client/secrets/types/secrets_revoke_request_scope.py +3 -0
  128. harbor_client/secrets/types/secrets_revoke_response.py +3 -0
  129. harbor_client/secrets/types/secrets_upsert_conflict_response.py +13 -0
  130. harbor_client/secrets/types/secrets_upsert_registry_credential_conflict_response.py +11 -0
  131. harbor_client/secrets/types/secrets_upsert_request_scope.py +3 -0
  132. harbor_client/services/__init__.py +0 -0
  133. harbor_client/services/async_/__init__.py +0 -0
  134. harbor_client/services/async_/utils/__init__.py +0 -0
  135. harbor_client/services/async_/utils/to_async.py +20 -0
  136. harbor_client/services/utils/__init__.py +0 -0
  137. harbor_client/services/utils/base_service.py +408 -0
  138. harbor_client/services/utils/default_headers.py +69 -0
  139. harbor_client/services/utils/validator.py +474 -0
  140. harbor_client/storage/__init__.py +3 -0
  141. harbor_client/storage/client.py +269 -0
  142. harbor_client/transfers.py +724 -0
  143. harbor_client/trials/__init__.py +3 -0
  144. harbor_client/trials/client.py +1939 -0
  145. harbor_client/trials/types/__init__.py +29 -0
  146. harbor_client/trials/types/trials_get_filters_request_attempts.py +3 -0
  147. harbor_client/trials/types/trials_get_filters_request_failed_only.py +3 -0
  148. harbor_client/trials/types/trials_get_filters_request_field.py +3 -0
  149. harbor_client/trials/types/trials_get_filters_request_terminal.py +3 -0
  150. harbor_client/trials/types/trials_list_bad_request_response.py +13 -0
  151. harbor_client/trials/types/trials_list_request_attempts.py +3 -0
  152. harbor_client/trials/types/trials_list_request_failed_only.py +3 -0
  153. harbor_client/trials/types/trials_list_request_sort.py +3 -0
  154. harbor_client/trials/types/trials_list_request_terminal.py +3 -0
  155. harbor_client/types/__init__.py +1006 -0
  156. harbor_client/types/__init__.pyi +644 -0
  157. harbor_client/types/account_identity.py +15 -0
  158. harbor_client/types/agent_identity.py +19 -0
  159. harbor_client/types/agent_options.py +1 -0
  160. harbor_client/types/agent_source.py +40 -0
  161. harbor_client/types/agent_source_manifest.py +57 -0
  162. harbor_client/types/agent_source_runtime.py +33 -0
  163. harbor_client/types/agents_response.py +16 -0
  164. harbor_client/types/api_key_create.py +19 -0
  165. harbor_client/types/api_key_created.py +44 -0
  166. harbor_client/types/api_key_metadata.py +41 -0
  167. harbor_client/types/api_key_metadata_page.py +24 -0
  168. harbor_client/types/api_keys_list_bad_request_response.py +35 -0
  169. harbor_client/types/artifact_config.py +26 -0
  170. harbor_client/types/available_dataset_task_dependency.py +97 -0
  171. harbor_client/types/bad_request_encoded.py +79 -0
  172. harbor_client/types/bad_request_error_body.py +35 -0
  173. harbor_client/types/cancel_job_request.py +15 -0
  174. harbor_client/types/cancel_trial_request.py +15 -0
  175. harbor_client/types/conflict_encoded.py +77 -0
  176. harbor_client/types/conflict_error_body.py +38 -0
  177. harbor_client/types/create_leaderboard_response.py +22 -0
  178. harbor_client/types/create_leaderboard_row_input.py +32 -0
  179. harbor_client/types/created_result_job.py +49 -0
  180. harbor_client/types/created_result_trial.py +28 -0
  181. harbor_client/types/credential_proxy_header_transform.py +16 -0
  182. harbor_client/types/credential_proxy_path_match.py +15 -0
  183. harbor_client/types/credential_proxy_policy_rule.py +21 -0
  184. harbor_client/types/credential_proxy_request_match.py +20 -0
  185. harbor_client/types/dataset_publish_task_reference.py +21 -0
  186. harbor_client/types/dataset_version_detail.py +95 -0
  187. harbor_client/types/dataset_version_file.py +50 -0
  188. harbor_client/types/dataset_version_manifest.py +91 -0
  189. harbor_client/types/dataset_version_revision_summary.py +22 -0
  190. harbor_client/types/delete_jobs_request.py +17 -0
  191. harbor_client/types/delete_jobs_response.py +22 -0
  192. harbor_client/types/dry_run_response.py +15 -0
  193. harbor_client/types/ensure_organization_response.py +18 -0
  194. harbor_client/types/evaluation_comparison.py +27 -0
  195. harbor_client/types/evaluation_comparison_agent_model.py +34 -0
  196. harbor_client/types/evaluation_comparison_cell.py +109 -0
  197. harbor_client/types/evaluation_comparison_task.py +22 -0
  198. harbor_client/types/evaluation_job_reference.py +48 -0
  199. harbor_client/types/evaluation_metric_set.py +42 -0
  200. harbor_client/types/evaluation_summary.py +21 -0
  201. harbor_client/types/evaluation_summary_row.py +128 -0
  202. harbor_client/types/existing_registry_credential.py +28 -0
  203. harbor_client/types/existing_secret_summary.py +31 -0
  204. harbor_client/types/filter_values_response.py +72 -0
  205. harbor_client/types/forbidden_encoded.py +79 -0
  206. harbor_client/types/hosted_agent_config.py +72 -0
  207. harbor_client/types/hosted_dataset_config.py +62 -0
  208. harbor_client/types/hosted_diff_selectors.py +22 -0
  209. harbor_client/types/hosted_github_agent_source.py +30 -0
  210. harbor_client/types/hosted_job_trial_regrade_source.py +19 -0
  211. harbor_client/types/hosted_local_task_requirements.py +20 -0
  212. harbor_client/types/hosted_preflight_environment_config.py +24 -0
  213. harbor_client/types/hosted_retry_config.py +32 -0
  214. harbor_client/types/hosted_secret_selection.py +21 -0
  215. harbor_client/types/hosted_submission_credential_proxy_path_match.py +17 -0
  216. harbor_client/types/hosted_submission_credential_proxy_policy_rule.py +23 -0
  217. harbor_client/types/hosted_submission_credential_proxy_request_match.py +22 -0
  218. harbor_client/types/hosted_submission_dataset_config.py +64 -0
  219. harbor_client/types/hosted_submission_environment_config.py +26 -0
  220. harbor_client/types/hosted_submission_retry_config.py +32 -0
  221. harbor_client/types/hosted_submission_task_config.py +45 -0
  222. harbor_client/types/hosted_task_config.py +45 -0
  223. harbor_client/types/hosted_task_environment_requirement.py +26 -0
  224. harbor_client/types/hosted_verifier_config.py +75 -0
  225. harbor_client/types/internal_server_error_encoded.py +93 -0
  226. harbor_client/types/invalid_page_size_encoded.py +58 -0
  227. harbor_client/types/invalid_page_token_encoded.py +60 -0
  228. harbor_client/types/job_artifact_type.py +5 -0
  229. harbor_client/types/job_bucket_circuit_state.py +93 -0
  230. harbor_client/types/job_cancellation_summary.py +47 -0
  231. harbor_client/types/job_circuit_state.py +90 -0
  232. harbor_client/types/job_creator.py +28 -0
  233. harbor_client/types/job_detail.py +84 -0
  234. harbor_client/types/job_manual_pause_summary.py +66 -0
  235. harbor_client/types/job_overview.py +332 -0
  236. harbor_client/types/job_overview_statistics.py +97 -0
  237. harbor_client/types/job_owner_organization.py +28 -0
  238. harbor_client/types/job_package_run_target.py +21 -0
  239. harbor_client/types/job_page.py +24 -0
  240. harbor_client/types/job_path_run_target.py +24 -0
  241. harbor_client/types/job_response.py +17 -0
  242. harbor_client/types/job_reward_metric_set.py +42 -0
  243. harbor_client/types/job_share_organization_summary.py +22 -0
  244. harbor_client/types/job_sharing.py +38 -0
  245. harbor_client/types/job_summary.py +73 -0
  246. harbor_client/types/job_task_page.py +24 -0
  247. harbor_client/types/job_task_summary.py +146 -0
  248. harbor_client/types/job_trial_status.py +4 -0
  249. harbor_client/types/job_trial_status_item.py +128 -0
  250. harbor_client/types/jobs_copy_request.py +22 -0
  251. harbor_client/types/jobs_get_filters_request_field.py +17 -0
  252. harbor_client/types/jobs_get_overview_request_force_combined.py +7 -0
  253. harbor_client/types/jobs_list_bad_request_response.py +35 -0
  254. harbor_client/types/jobs_list_request_sort.py +21 -0
  255. harbor_client/types/jobs_list_tasks_bad_request_response.py +35 -0
  256. harbor_client/types/jobs_list_tasks_request_sort_by.py +25 -0
  257. harbor_client/types/jobs_list_tasks_request_sort_order.py +5 -0
  258. harbor_client/types/jobs_rename_request.py +15 -0
  259. harbor_client/types/jobs_submit_response.py +15 -0
  260. harbor_client/types/jobs_transfer_request.py +22 -0
  261. harbor_client/types/leaderboard_change_summary.py +37 -0
  262. harbor_client/types/leaderboard_definition.py +67 -0
  263. harbor_client/types/leaderboard_detail.py +17 -0
  264. harbor_client/types/leaderboard_mutation_record.py +64 -0
  265. harbor_client/types/leaderboard_mutation_row.py +43 -0
  266. harbor_client/types/leaderboard_package_selector_encoded.py +16 -0
  267. harbor_client/types/leaderboard_ranked_row.py +44 -0
  268. harbor_client/types/leaderboard_read_column_definition.py +55 -0
  269. harbor_client/types/leaderboard_read_ranking_rule.py +30 -0
  270. harbor_client/types/leaderboard_row_detail.py +17 -0
  271. harbor_client/types/leaderboard_rows_page.py +28 -0
  272. harbor_client/types/leaderboard_summary.py +64 -0
  273. harbor_client/types/leaderboard_summary_page.py +24 -0
  274. harbor_client/types/leaderboard_trial_link.py +18 -0
  275. harbor_client/types/leaderboard_trial_link_page.py +23 -0
  276. harbor_client/types/leaderboard_write_column_definition.py +55 -0
  277. harbor_client/types/leaderboard_write_ranking_rule.py +30 -0
  278. harbor_client/types/leaderboards_create_request.py +59 -0
  279. harbor_client/types/leaderboards_list_bad_request_response.py +37 -0
  280. harbor_client/types/leaderboards_list_rows_bad_request_response.py +37 -0
  281. harbor_client/types/leaderboards_list_trials_bad_request_response.py +39 -0
  282. harbor_client/types/leaderboards_update_request.py +152 -0
  283. harbor_client/types/mean_aggregate.py +19 -0
  284. harbor_client/types/metric_config.py +20 -0
  285. harbor_client/types/model_identity.py +22 -0
  286. harbor_client/types/my_organizations.py +4 -0
  287. harbor_client/types/my_organizations_item.py +36 -0
  288. harbor_client/types/not_found_encoded.py +77 -0
  289. harbor_client/types/organization_detail.py +38 -0
  290. harbor_client/types/organizations_ensure_request.py +15 -0
  291. harbor_client/types/owner_organization.py +31 -0
  292. harbor_client/types/package_access.py +46 -0
  293. harbor_client/types/package_access_grant_creator.py +22 -0
  294. harbor_client/types/package_access_organization_summary.py +30 -0
  295. harbor_client/types/package_name_reference.py +18 -0
  296. harbor_client/types/package_organization_grant.py +44 -0
  297. harbor_client/types/package_public_grant.py +40 -0
  298. harbor_client/types/package_tag.py +24 -0
  299. harbor_client/types/package_tags.py +4 -0
  300. harbor_client/types/package_version_catalog_page.py +21 -0
  301. harbor_client/types/package_version_detail.py +27 -0
  302. harbor_client/types/package_version_file_page.py +21 -0
  303. harbor_client/types/package_version_manifest.py +27 -0
  304. harbor_client/types/package_version_summary.py +69 -0
  305. harbor_client/types/packages_list_version_catalog_bad_request_response.py +41 -0
  306. harbor_client/types/packages_list_version_catalog_request_include_yanked.py +7 -0
  307. harbor_client/types/packages_list_version_catalog_request_type.py +7 -0
  308. harbor_client/types/packages_list_version_files_bad_request_response.py +41 -0
  309. harbor_client/types/packages_list_versions_bad_request_response.py +37 -0
  310. harbor_client/types/packages_list_versions_request_include_yanked.py +7 -0
  311. harbor_client/types/packages_set_visibility_request.py +27 -0
  312. harbor_client/types/packages_update_organization_access_request.py +26 -0
  313. harbor_client/types/registry_credential.py +44 -0
  314. harbor_client/types/registry_credential_replacement_required_encoded.py +86 -0
  315. harbor_client/types/registry_credential_replacement_stale_encoded.py +79 -0
  316. harbor_client/types/registry_credential_revoke_result.py +21 -0
  317. harbor_client/types/registry_credential_summary.py +46 -0
  318. harbor_client/types/registry_credential_upsert_encoded.py +48 -0
  319. harbor_client/types/registry_package.py +37 -0
  320. harbor_client/types/registry_package_version.py +44 -0
  321. harbor_client/types/registry_package_version_page.py +25 -0
  322. harbor_client/types/registry_version_file.py +47 -0
  323. harbor_client/types/rename_job_response.py +21 -0
  324. harbor_client/types/reserve_temporary_package_request.py +25 -0
  325. harbor_client/types/reserve_temporary_task_response.py +27 -0
  326. harbor_client/types/resolved_task_step.py +38 -0
  327. harbor_client/types/result_job_create.py +40 -0
  328. harbor_client/types/result_model_usage.py +31 -0
  329. harbor_client/types/result_trial_create.py +92 -0
  330. harbor_client/types/retry_rollout_response.py +15 -0
  331. harbor_client/types/retry_trial_response.py +15 -0
  332. harbor_client/types/reward_value.py +3 -0
  333. harbor_client/types/rollout_response.py +17 -0
  334. harbor_client/types/rollouts_get_filters_request_attempts.py +7 -0
  335. harbor_client/types/rollouts_get_filters_request_failed_only.py +7 -0
  336. harbor_client/types/rollouts_get_filters_request_field.py +18 -0
  337. harbor_client/types/rollouts_get_filters_request_terminal.py +7 -0
  338. harbor_client/types/rollouts_list_bad_request_response.py +34 -0
  339. harbor_client/types/rollouts_list_request_attempts.py +5 -0
  340. harbor_client/types/rollouts_list_request_failed_only.py +7 -0
  341. harbor_client/types/rollouts_list_request_sort.py +47 -0
  342. harbor_client/types/rollouts_list_request_terminal.py +5 -0
  343. harbor_client/types/run_state.py +10 -0
  344. harbor_client/types/secret_metadata.py +54 -0
  345. harbor_client/types/secret_metadata_page.py +21 -0
  346. harbor_client/types/secret_preflight.py +152 -0
  347. harbor_client/types/secret_replacement_required_encoded.py +72 -0
  348. harbor_client/types/secret_replacement_stale_encoded.py +67 -0
  349. harbor_client/types/secret_write_result.py +51 -0
  350. harbor_client/types/secrets_list_bad_request_response.py +35 -0
  351. harbor_client/types/secrets_list_registry_credentials_request_status.py +7 -0
  352. harbor_client/types/secrets_list_registry_credentials_response.py +18 -0
  353. harbor_client/types/secrets_list_request_status_filter.py +7 -0
  354. harbor_client/types/secrets_preflight_request.py +76 -0
  355. harbor_client/types/secrets_revoke_registry_credential_request_purge.py +7 -0
  356. harbor_client/types/secrets_revoke_request.py +33 -0
  357. harbor_client/types/secrets_revoke_response.py +34 -0
  358. harbor_client/types/secrets_upsert_conflict_response.py +39 -0
  359. harbor_client/types/secrets_upsert_registry_credential_conflict_response.py +40 -0
  360. harbor_client/types/secrets_upsert_request.py +43 -0
  361. harbor_client/types/selected_secret.py +48 -0
  362. harbor_client/types/service_unavailable_encoded.py +85 -0
  363. harbor_client/types/set_package_visibility_response.py +50 -0
  364. harbor_client/types/storage_copy_result.py +60 -0
  365. harbor_client/types/storage_dataset_upload_create.py +50 -0
  366. harbor_client/types/storage_dataset_upload_metadata.py +49 -0
  367. harbor_client/types/storage_dataset_upload_result.py +50 -0
  368. harbor_client/types/storage_download.py +64 -0
  369. harbor_client/types/storage_http_transfer.py +33 -0
  370. harbor_client/types/storage_job_upload_create.py +39 -0
  371. harbor_client/types/storage_job_upload_metadata.py +45 -0
  372. harbor_client/types/storage_publication_file.py +25 -0
  373. harbor_client/types/storage_result_upload_result.py +15 -0
  374. harbor_client/types/storage_task_upload_create.py +50 -0
  375. harbor_client/types/storage_task_upload_metadata.py +79 -0
  376. harbor_client/types/storage_task_upload_result.py +39 -0
  377. harbor_client/types/storage_trial_upload_create.py +41 -0
  378. harbor_client/types/storage_tus_transfer.py +56 -0
  379. harbor_client/types/storage_upload_create.py +44 -0
  380. harbor_client/types/storage_upload_file.py +63 -0
  381. harbor_client/types/storage_upload_file_input.py +32 -0
  382. harbor_client/types/storage_upload_receipt.py +53 -0
  383. harbor_client/types/storage_upload_session.py +61 -0
  384. harbor_client/types/submit_job_request.py +277 -0
  385. harbor_client/types/submit_job_response.py +51 -0
  386. harbor_client/types/sum_aggregate.py +19 -0
  387. harbor_client/types/tag_package_version_request.py +15 -0
  388. harbor_client/types/tag_package_version_response.py +18 -0
  389. harbor_client/types/task_environment_requirement.py +26 -0
  390. harbor_client/types/task_identity.py +22 -0
  391. harbor_client/types/task_publish_step.py +47 -0
  392. harbor_client/types/task_version_detail.py +115 -0
  393. harbor_client/types/task_version_manifest.py +119 -0
  394. harbor_client/types/too_many_requests_encoded.py +81 -0
  395. harbor_client/types/transfer_job_response.py +36 -0
  396. harbor_client/types/trial_artifact_type.py +5 -0
  397. harbor_client/types/trial_counts.py +33 -0
  398. harbor_client/types/trial_detail.py +103 -0
  399. harbor_client/types/trial_filter_values_response.py +76 -0
  400. harbor_client/types/trial_page.py +24 -0
  401. harbor_client/types/trial_response.py +17 -0
  402. harbor_client/types/trial_summary.py +83 -0
  403. harbor_client/types/trials_copy_request.py +22 -0
  404. harbor_client/types/trials_get_filters_request_attempts.py +7 -0
  405. harbor_client/types/trials_get_filters_request_failed_only.py +7 -0
  406. harbor_client/types/trials_get_filters_request_field.py +18 -0
  407. harbor_client/types/trials_get_filters_request_terminal.py +7 -0
  408. harbor_client/types/trials_list_bad_request_response.py +35 -0
  409. harbor_client/types/trials_list_request_attempts.py +5 -0
  410. harbor_client/types/trials_list_request_failed_only.py +5 -0
  411. harbor_client/types/trials_list_request_sort.py +47 -0
  412. harbor_client/types/trials_list_request_terminal.py +5 -0
  413. harbor_client/types/unauthorized_encoded.py +79 -0
  414. harbor_client/types/unavailable_dataset_task_dependency.py +43 -0
  415. harbor_client/types/update_job_sharing_request.py +36 -0
  416. harbor_client/types/update_leaderboard_response.py +29 -0
  417. harbor_client/types/update_package_access_response.py +65 -0
  418. harbor_client/types/usage.py +25 -0
  419. harbor_client/types/usage_aggregates.py +26 -0
  420. harbor_client/types/utils/__init__.py +0 -0
  421. harbor_client/types/utils/base_error.py +127 -0
  422. harbor_client/types/utils/base_model.py +439 -0
  423. harbor_client/types/utils/cast_models.py +226 -0
  424. harbor_client/types/utils/json_map.py +84 -0
  425. harbor_client/types/utils/one_of_base_model.py +173 -0
  426. harbor_client/types/utils/sentinel.py +19 -0
  427. harbor_client/validation.py +335 -0
  428. harbor_client/version.py +9 -0
  429. harbor_framework_client-0.1.0.dist-info/METADATA +134 -0
  430. harbor_framework_client-0.1.0.dist-info/RECORD +433 -0
  431. harbor_framework_client-0.1.0.dist-info/WHEEL +5 -0
  432. harbor_framework_client-0.1.0.dist-info/licenses/LICENSE +201 -0
  433. harbor_framework_client-0.1.0.dist-info/top_level.txt +1 -0
@@ -0,0 +1,912 @@
1
+ import warnings
2
+ import requests
3
+ import logging
4
+ import asyncio
5
+ from typing import Any, Callable, Dict, Optional, TYPE_CHECKING, Union
6
+ from .net.environment import HarborAPIClientEnvironment
7
+ from .services.utils.base_service import BaseService
8
+ from .net.sdk_config import SdkConfig, RetryConfig
9
+ from typing import Awaitable
10
+
11
+ if TYPE_CHECKING:
12
+ from .transfers import AsyncStorageTransfers, StorageTransfers
13
+ from .organizations.client import OrganizationsClient, AsyncOrganizationsClient
14
+ from .packages.client import PackagesClient, AsyncPackagesClient
15
+ from .jobs.client import JobsClient, AsyncJobsClient
16
+ from .trials.client import TrialsClient, AsyncTrialsClient
17
+ from .rollouts.client import RolloutsClient, AsyncRolloutsClient
18
+ from .account.client import AccountClient, AsyncAccountClient
19
+ from .api_keys.client import ApiKeysClient, AsyncApiKeysClient
20
+ from .agents.client import AgentsClient, AsyncAgentsClient
21
+ from .leaderboards.client import LeaderboardsClient, AsyncLeaderboardsClient
22
+ from .secrets.client import SecretsClient, AsyncSecretsClient
23
+ from .storage.client import StorageClient, AsyncStorageClient
24
+
25
+
26
+ class BaseHarborAPIClient(BaseService):
27
+ """
28
+ Main SDK client for BaseHarborAPIClient (Fern nested resource layout).
29
+ Exposes each top-level resource as a lazy accessor (`client.<resource>.method(...)`),
30
+ threads a single configured transport down to every nested resource client, and binds
31
+ any ungrouped (root) endpoints directly.
32
+ """
33
+
34
+ def __init__(
35
+ self,
36
+ *,
37
+ token: Optional[Union[str, Callable[[], str]]] = None,
38
+ harbor_api_version: str,
39
+ base_url: Union[HarborAPIClientEnvironment, str, None] = None,
40
+ environment: Optional[HarborAPIClientEnvironment] = None,
41
+ headers: Optional[Dict[str, str]] = None,
42
+ timeout: Optional[float] = None,
43
+ timeout_ms: Optional[int] = None,
44
+ http_client: Optional[requests.Session] = None,
45
+ httpx_client: Optional[Any] = None,
46
+ follow_redirects: bool = True,
47
+ logger: Optional[logging.Logger] = None,
48
+ retry: Optional["RetryConfig"] = None,
49
+ stream_reconnection_enabled: Optional[bool] = None,
50
+ max_stream_reconnection_attempts: Optional[int] = None,
51
+ ):
52
+ """Initializes the BaseHarborAPIClient SDK client."""
53
+ if environment is not None and base_url is None:
54
+ base_url = environment
55
+ _resolved_url = (
56
+ base_url.value
57
+ if isinstance(base_url, HarborAPIClientEnvironment)
58
+ else base_url
59
+ )
60
+ super().__init__(
61
+ base_url=_resolved_url,
62
+ http_client=http_client,
63
+ follow_redirects=follow_redirects,
64
+ logger=logger,
65
+ )
66
+ self._organizations: Any = None
67
+ self._packages: Any = None
68
+ self._jobs: Any = None
69
+ self._trials: Any = None
70
+ self._rollouts: Any = None
71
+ self._account: Any = None
72
+ self._api_keys: Any = None
73
+ self._agents: Any = None
74
+ self._leaderboards: Any = None
75
+ self._secrets: Any = None
76
+ self._storage: Any = None
77
+ self.set_access_token(token)
78
+ self._global_headers["Harbor-API-Version"] = harbor_api_version
79
+ if httpx_client is not None:
80
+ from .core.httpx_session import HttpxSession
81
+
82
+ self.set_http_client(HttpxSession(httpx_client))
83
+ self._custom_headers = headers
84
+ self._given_base_url = base_url if isinstance(base_url, str) else None
85
+ if headers:
86
+ self.set_config(
87
+ {
88
+ **self._service_config,
89
+ "additional_headers": {
90
+ **(self._service_config.get("additional_headers") or {}),
91
+ **headers,
92
+ },
93
+ }
94
+ )
95
+ if timeout_ms is not None:
96
+ warnings.warn(
97
+ "`timeout_ms` is deprecated; use `timeout` (in seconds) instead.",
98
+ DeprecationWarning,
99
+ stacklevel=2,
100
+ )
101
+ timeout = timeout_ms / 1000 if timeout is None else timeout
102
+ if timeout is None:
103
+ timeout = 60
104
+ self.set_timeout(timeout)
105
+ if retry is not None:
106
+ self.set_retry(retry)
107
+ if stream_reconnection_enabled is not None:
108
+ self.set_config(
109
+ {
110
+ **self._service_config,
111
+ "stream_reconnection_enabled": stream_reconnection_enabled,
112
+ }
113
+ )
114
+ if max_stream_reconnection_attempts is not None:
115
+ self.set_config(
116
+ {
117
+ **self._service_config,
118
+ "max_stream_reconnection_attempts": max_stream_reconnection_attempts,
119
+ }
120
+ )
121
+
122
+ self._owned_http_client: Optional[requests.Session] = None
123
+ if http_client is None and httpx_client is None:
124
+ self._owned_http_client = requests.Session()
125
+ self.set_http_client(self._owned_http_client)
126
+
127
+ def close(self) -> None:
128
+ """Release this client's default pool; supplied transports remain caller-owned."""
129
+ owned, self._owned_http_client = self._owned_http_client, None
130
+ if owned is not None:
131
+ owned.close()
132
+
133
+ def __enter__(self) -> "BaseHarborAPIClient":
134
+ return self
135
+
136
+ def __exit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
137
+ self.close()
138
+
139
+ @property
140
+ def transfers(self) -> "StorageTransfers":
141
+ """Run signed upload, download, and copy workflows."""
142
+ from .transfers import StorageTransfers
143
+
144
+ if not hasattr(self, "_storage_transfers"):
145
+ self._storage_transfers = StorageTransfers(self)
146
+ return self._storage_transfers
147
+
148
+ def set_base_url(self, base_url: Union[HarborAPIClientEnvironment, str]):
149
+ """
150
+ Sets the base URL for the whole SDK, including every resource client already built.
151
+
152
+ Resource clients are built lazily and cached holding a COPY of the root's base URL, so the
153
+ inherited setter -- which only rebinds the receiver -- left an already-materialised child
154
+ routing to the old host. Switching environment after one call had built a child kept
155
+ sending that child's requests to the previous server, silently and with no error. Each
156
+ child forwards to its own sub-resources in turn.
157
+
158
+ :param base_url: The base URL to be set, as a string or an HarborAPIClientEnvironment enum member.
159
+ :return: The SDK instance.
160
+ """
161
+ super().set_base_url(base_url)
162
+ if self._organizations is not None:
163
+ self._organizations.set_base_url(base_url)
164
+ if self._packages is not None:
165
+ self._packages.set_base_url(base_url)
166
+ if self._jobs is not None:
167
+ self._jobs.set_base_url(base_url)
168
+ if self._trials is not None:
169
+ self._trials.set_base_url(base_url)
170
+ if self._rollouts is not None:
171
+ self._rollouts.set_base_url(base_url)
172
+ if self._account is not None:
173
+ self._account.set_base_url(base_url)
174
+ if self._api_keys is not None:
175
+ self._api_keys.set_base_url(base_url)
176
+ if self._agents is not None:
177
+ self._agents.set_base_url(base_url)
178
+ if self._leaderboards is not None:
179
+ self._leaderboards.set_base_url(base_url)
180
+ if self._secrets is not None:
181
+ self._secrets.set_base_url(base_url)
182
+ if self._storage is not None:
183
+ self._storage.set_base_url(base_url)
184
+
185
+ return self
186
+
187
+ def set_config(self, config: SdkConfig):
188
+ """
189
+ Sets service-level configuration for the whole SDK, including every resource client
190
+ already built.
191
+
192
+ Resource clients are built lazily and cached holding a reference to the root's config, and
193
+ both this setter and `set_retry` REBIND `_service_config` rather than mutating it -- so a
194
+ caller who touched a resource before reconfiguring the root got a silently stale child.
195
+ The root wins: last writer overwrites, the same rule `set_base_url` and `set_timeout`
196
+ follow, which keeps the root and its resources in exact agreement. Narrower scopes are
197
+ untouched, because method-level config (`set_<method>_config`) and per-call
198
+ `request_options` live in their own attributes and are never overwritten by this. Each
199
+ child forwards to its own sub-resources in turn.
200
+
201
+ :param SdkConfig config: Configuration dictionary to override SDK-level defaults.
202
+ :return: The SDK instance.
203
+ """
204
+ super().set_config(config)
205
+ if self._organizations is not None:
206
+ self._organizations.set_config(config)
207
+ if self._packages is not None:
208
+ self._packages.set_config(config)
209
+ if self._jobs is not None:
210
+ self._jobs.set_config(config)
211
+ if self._trials is not None:
212
+ self._trials.set_config(config)
213
+ if self._rollouts is not None:
214
+ self._rollouts.set_config(config)
215
+ if self._account is not None:
216
+ self._account.set_config(config)
217
+ if self._api_keys is not None:
218
+ self._api_keys.set_config(config)
219
+ if self._agents is not None:
220
+ self._agents.set_config(config)
221
+ if self._leaderboards is not None:
222
+ self._leaderboards.set_config(config)
223
+ if self._secrets is not None:
224
+ self._secrets.set_config(config)
225
+ if self._storage is not None:
226
+ self._storage.set_config(config)
227
+
228
+ return self
229
+
230
+ def set_timeout(self, timeout: float):
231
+ """
232
+ Sets the timeout for the whole SDK, including every resource client already built.
233
+
234
+ Resource clients are built lazily and cached with a COPY of the root's timeout baked into
235
+ their request handler, so the inherited setter -- which only rebinds the receiver and
236
+ rebuilds the receiver's handler -- left an already-materialised child on the old timeout.
237
+
238
+ :param float timeout: The timeout (in seconds) to be set.
239
+ :return: The SDK instance.
240
+ """
241
+ super().set_timeout(timeout)
242
+ if self._organizations is not None:
243
+ self._organizations.set_timeout(timeout)
244
+ if self._packages is not None:
245
+ self._packages.set_timeout(timeout)
246
+ if self._jobs is not None:
247
+ self._jobs.set_timeout(timeout)
248
+ if self._trials is not None:
249
+ self._trials.set_timeout(timeout)
250
+ if self._rollouts is not None:
251
+ self._rollouts.set_timeout(timeout)
252
+ if self._account is not None:
253
+ self._account.set_timeout(timeout)
254
+ if self._api_keys is not None:
255
+ self._api_keys.set_timeout(timeout)
256
+ if self._agents is not None:
257
+ self._agents.set_timeout(timeout)
258
+ if self._leaderboards is not None:
259
+ self._leaderboards.set_timeout(timeout)
260
+ if self._secrets is not None:
261
+ self._secrets.set_timeout(timeout)
262
+ if self._storage is not None:
263
+ self._storage.set_timeout(timeout)
264
+
265
+ return self
266
+
267
+ def set_http_client(self, http_client: Optional[requests.Session]):
268
+ """
269
+ Sets a custom HTTP client for the whole SDK, including every resource client already
270
+ built.
271
+
272
+ Resource clients are built lazily and cached with a COPY of the root's http_client baked
273
+ into their request handler, so the inherited setter -- which only rebinds the receiver and
274
+ rebuilds the receiver's handler -- left an already-materialised child on the old client.
275
+
276
+ :param http_client: A requests.Session-compatible client, used as-is. Pass None to fall
277
+ back to the module-level requests API.
278
+ :return: The SDK instance.
279
+ """
280
+ super().set_http_client(http_client)
281
+ if self._organizations is not None:
282
+ self._organizations.set_http_client(http_client)
283
+ if self._packages is not None:
284
+ self._packages.set_http_client(http_client)
285
+ if self._jobs is not None:
286
+ self._jobs.set_http_client(http_client)
287
+ if self._trials is not None:
288
+ self._trials.set_http_client(http_client)
289
+ if self._rollouts is not None:
290
+ self._rollouts.set_http_client(http_client)
291
+ if self._account is not None:
292
+ self._account.set_http_client(http_client)
293
+ if self._api_keys is not None:
294
+ self._api_keys.set_http_client(http_client)
295
+ if self._agents is not None:
296
+ self._agents.set_http_client(http_client)
297
+ if self._leaderboards is not None:
298
+ self._leaderboards.set_http_client(http_client)
299
+ if self._secrets is not None:
300
+ self._secrets.set_http_client(http_client)
301
+ if self._storage is not None:
302
+ self._storage.set_http_client(http_client)
303
+
304
+ return self
305
+
306
+ def set_follow_redirects(self, follow_redirects: bool):
307
+ """
308
+ Sets whether HTTP redirects (3xx responses) are followed automatically, for the whole
309
+ SDK, including every resource client already built.
310
+
311
+ :param bool follow_redirects: False to return a 3xx response as-is instead of following it.
312
+ :return: The SDK instance.
313
+ """
314
+ super().set_follow_redirects(follow_redirects)
315
+ if self._organizations is not None:
316
+ self._organizations.set_follow_redirects(follow_redirects)
317
+ if self._packages is not None:
318
+ self._packages.set_follow_redirects(follow_redirects)
319
+ if self._jobs is not None:
320
+ self._jobs.set_follow_redirects(follow_redirects)
321
+ if self._trials is not None:
322
+ self._trials.set_follow_redirects(follow_redirects)
323
+ if self._rollouts is not None:
324
+ self._rollouts.set_follow_redirects(follow_redirects)
325
+ if self._account is not None:
326
+ self._account.set_follow_redirects(follow_redirects)
327
+ if self._api_keys is not None:
328
+ self._api_keys.set_follow_redirects(follow_redirects)
329
+ if self._agents is not None:
330
+ self._agents.set_follow_redirects(follow_redirects)
331
+ if self._leaderboards is not None:
332
+ self._leaderboards.set_follow_redirects(follow_redirects)
333
+ if self._secrets is not None:
334
+ self._secrets.set_follow_redirects(follow_redirects)
335
+ if self._storage is not None:
336
+ self._storage.set_follow_redirects(follow_redirects)
337
+
338
+ return self
339
+
340
+ def set_logging(self, logger: Optional[logging.Logger]):
341
+ """
342
+ Sets the logger requests/responses are written to, for the whole SDK, including every
343
+ resource client already built.
344
+
345
+ :param logger: A standard library logger. Pass None (the default) to disable logging.
346
+ Authorization and Cookie header values are always redacted from logged output.
347
+ :return: The SDK instance.
348
+ """
349
+ super().set_logging(logger)
350
+ if self._organizations is not None:
351
+ self._organizations.set_logging(logger)
352
+ if self._packages is not None:
353
+ self._packages.set_logging(logger)
354
+ if self._jobs is not None:
355
+ self._jobs.set_logging(logger)
356
+ if self._trials is not None:
357
+ self._trials.set_logging(logger)
358
+ if self._rollouts is not None:
359
+ self._rollouts.set_logging(logger)
360
+ if self._account is not None:
361
+ self._account.set_logging(logger)
362
+ if self._api_keys is not None:
363
+ self._api_keys.set_logging(logger)
364
+ if self._agents is not None:
365
+ self._agents.set_logging(logger)
366
+ if self._leaderboards is not None:
367
+ self._leaderboards.set_logging(logger)
368
+ if self._secrets is not None:
369
+ self._secrets.set_logging(logger)
370
+ if self._storage is not None:
371
+ self._storage.set_logging(logger)
372
+
373
+ return self
374
+
375
+ def set_access_token(self, access_token: Optional[Union[str, Callable[[], str]]]):
376
+ """
377
+ Sets the access token for the whole SDK, including every resource client already built.
378
+
379
+ A child is constructed with a COPY of the root's default headers and is then cached, so
380
+ the inherited setter -- which only mutates the receiver's own headers -- left an
381
+ already-materialised child on the old token. Each child forwards to its own sub-resources
382
+ in turn.
383
+
384
+ :param access_token: The access token to be set.
385
+ :return: The SDK instance.
386
+ """
387
+ super().set_access_token(access_token)
388
+ if self._organizations is not None:
389
+ self._organizations.set_access_token(access_token)
390
+ if self._packages is not None:
391
+ self._packages.set_access_token(access_token)
392
+ if self._jobs is not None:
393
+ self._jobs.set_access_token(access_token)
394
+ if self._trials is not None:
395
+ self._trials.set_access_token(access_token)
396
+ if self._rollouts is not None:
397
+ self._rollouts.set_access_token(access_token)
398
+ if self._account is not None:
399
+ self._account.set_access_token(access_token)
400
+ if self._api_keys is not None:
401
+ self._api_keys.set_access_token(access_token)
402
+ if self._agents is not None:
403
+ self._agents.set_access_token(access_token)
404
+ if self._leaderboards is not None:
405
+ self._leaderboards.set_access_token(access_token)
406
+ if self._secrets is not None:
407
+ self._secrets.set_access_token(access_token)
408
+ if self._storage is not None:
409
+ self._storage.set_access_token(access_token)
410
+
411
+ return self
412
+
413
+ @property
414
+ def organizations(self) -> "OrganizationsClient":
415
+ """Lazily construct and return the organizations resource client."""
416
+ if self._organizations is None:
417
+ from .organizations.client import OrganizationsClient
418
+
419
+ _child = OrganizationsClient(base_url=self.base_url)
420
+ _child._default_headers = self._default_headers.copy()
421
+ _child._global_headers = self._global_headers
422
+ _child._timeout = self._timeout
423
+ _child._http_client = self._http_client
424
+ _child._follow_redirects = self._follow_redirects
425
+ _child._logger = self._logger
426
+ _child._service_config = self._service_config
427
+ _child._update_request_handler()
428
+ self._organizations = _child
429
+ return self._organizations
430
+
431
+ @property
432
+ def packages(self) -> "PackagesClient":
433
+ """Lazily construct and return the packages resource client."""
434
+ if self._packages is None:
435
+ from .packages.client import PackagesClient
436
+
437
+ _child = PackagesClient(base_url=self.base_url)
438
+ _child._default_headers = self._default_headers.copy()
439
+ _child._global_headers = self._global_headers
440
+ _child._timeout = self._timeout
441
+ _child._http_client = self._http_client
442
+ _child._follow_redirects = self._follow_redirects
443
+ _child._logger = self._logger
444
+ _child._service_config = self._service_config
445
+ _child._update_request_handler()
446
+ self._packages = _child
447
+ return self._packages
448
+
449
+ @property
450
+ def jobs(self) -> "JobsClient":
451
+ """Lazily construct and return the jobs resource client."""
452
+ if self._jobs is None:
453
+ from .jobs.client import JobsClient
454
+
455
+ _child = JobsClient(base_url=self.base_url)
456
+ _child._default_headers = self._default_headers.copy()
457
+ _child._global_headers = self._global_headers
458
+ _child._timeout = self._timeout
459
+ _child._http_client = self._http_client
460
+ _child._follow_redirects = self._follow_redirects
461
+ _child._logger = self._logger
462
+ _child._service_config = self._service_config
463
+ _child._update_request_handler()
464
+ self._jobs = _child
465
+ return self._jobs
466
+
467
+ @property
468
+ def trials(self) -> "TrialsClient":
469
+ """Lazily construct and return the trials resource client."""
470
+ if self._trials is None:
471
+ from .trials.client import TrialsClient
472
+
473
+ _child = TrialsClient(base_url=self.base_url)
474
+ _child._default_headers = self._default_headers.copy()
475
+ _child._global_headers = self._global_headers
476
+ _child._timeout = self._timeout
477
+ _child._http_client = self._http_client
478
+ _child._follow_redirects = self._follow_redirects
479
+ _child._logger = self._logger
480
+ _child._service_config = self._service_config
481
+ _child._update_request_handler()
482
+ self._trials = _child
483
+ return self._trials
484
+
485
+ @property
486
+ def rollouts(self) -> "RolloutsClient":
487
+ """Lazily construct and return the rollouts resource client."""
488
+ if self._rollouts is None:
489
+ from .rollouts.client import RolloutsClient
490
+
491
+ _child = RolloutsClient(base_url=self.base_url)
492
+ _child._default_headers = self._default_headers.copy()
493
+ _child._global_headers = self._global_headers
494
+ _child._timeout = self._timeout
495
+ _child._http_client = self._http_client
496
+ _child._follow_redirects = self._follow_redirects
497
+ _child._logger = self._logger
498
+ _child._service_config = self._service_config
499
+ _child._update_request_handler()
500
+ self._rollouts = _child
501
+ return self._rollouts
502
+
503
+ @property
504
+ def account(self) -> "AccountClient":
505
+ """Lazily construct and return the account resource client."""
506
+ if self._account is None:
507
+ from .account.client import AccountClient
508
+
509
+ _child = AccountClient(base_url=self.base_url)
510
+ _child._default_headers = self._default_headers.copy()
511
+ _child._global_headers = self._global_headers
512
+ _child._timeout = self._timeout
513
+ _child._http_client = self._http_client
514
+ _child._follow_redirects = self._follow_redirects
515
+ _child._logger = self._logger
516
+ _child._service_config = self._service_config
517
+ _child._update_request_handler()
518
+ self._account = _child
519
+ return self._account
520
+
521
+ @property
522
+ def api_keys(self) -> "ApiKeysClient":
523
+ """Lazily construct and return the api_keys resource client."""
524
+ if self._api_keys is None:
525
+ from .api_keys.client import ApiKeysClient
526
+
527
+ _child = ApiKeysClient(base_url=self.base_url)
528
+ _child._default_headers = self._default_headers.copy()
529
+ _child._global_headers = self._global_headers
530
+ _child._timeout = self._timeout
531
+ _child._http_client = self._http_client
532
+ _child._follow_redirects = self._follow_redirects
533
+ _child._logger = self._logger
534
+ _child._service_config = self._service_config
535
+ _child._update_request_handler()
536
+ self._api_keys = _child
537
+ return self._api_keys
538
+
539
+ @property
540
+ def agents(self) -> "AgentsClient":
541
+ """Lazily construct and return the agents resource client."""
542
+ if self._agents is None:
543
+ from .agents.client import AgentsClient
544
+
545
+ _child = AgentsClient(base_url=self.base_url)
546
+ _child._default_headers = self._default_headers.copy()
547
+ _child._global_headers = self._global_headers
548
+ _child._timeout = self._timeout
549
+ _child._http_client = self._http_client
550
+ _child._follow_redirects = self._follow_redirects
551
+ _child._logger = self._logger
552
+ _child._service_config = self._service_config
553
+ _child._update_request_handler()
554
+ self._agents = _child
555
+ return self._agents
556
+
557
+ @property
558
+ def leaderboards(self) -> "LeaderboardsClient":
559
+ """Lazily construct and return the leaderboards resource client."""
560
+ if self._leaderboards is None:
561
+ from .leaderboards.client import LeaderboardsClient
562
+
563
+ _child = LeaderboardsClient(base_url=self.base_url)
564
+ _child._default_headers = self._default_headers.copy()
565
+ _child._global_headers = self._global_headers
566
+ _child._timeout = self._timeout
567
+ _child._http_client = self._http_client
568
+ _child._follow_redirects = self._follow_redirects
569
+ _child._logger = self._logger
570
+ _child._service_config = self._service_config
571
+ _child._update_request_handler()
572
+ self._leaderboards = _child
573
+ return self._leaderboards
574
+
575
+ @property
576
+ def secrets(self) -> "SecretsClient":
577
+ """Lazily construct and return the secrets resource client."""
578
+ if self._secrets is None:
579
+ from .secrets.client import SecretsClient
580
+
581
+ _child = SecretsClient(base_url=self.base_url)
582
+ _child._default_headers = self._default_headers.copy()
583
+ _child._global_headers = self._global_headers
584
+ _child._timeout = self._timeout
585
+ _child._http_client = self._http_client
586
+ _child._follow_redirects = self._follow_redirects
587
+ _child._logger = self._logger
588
+ _child._service_config = self._service_config
589
+ _child._update_request_handler()
590
+ self._secrets = _child
591
+ return self._secrets
592
+
593
+ @property
594
+ def storage(self) -> "StorageClient":
595
+ """Lazily construct and return the storage resource client."""
596
+ if self._storage is None:
597
+ from .storage.client import StorageClient
598
+
599
+ _child = StorageClient(base_url=self.base_url)
600
+ _child._default_headers = self._default_headers.copy()
601
+ _child._global_headers = self._global_headers
602
+ _child._timeout = self._timeout
603
+ _child._http_client = self._http_client
604
+ _child._follow_redirects = self._follow_redirects
605
+ _child._logger = self._logger
606
+ _child._service_config = self._service_config
607
+ _child._update_request_handler()
608
+ self._storage = _child
609
+ return self._storage
610
+
611
+ @property
612
+ def with_raw_response(self) -> "RawHarborAPIClient":
613
+ """
614
+ Returns a raw-response client whose methods mirror this client's ROOT endpoints but return
615
+ ``HttpResponse[T]`` (parsed body plus the raw status code and headers) instead of the bare
616
+ deserialized body. Resource clients expose their own `with_raw_response`.
617
+ """
618
+ return RawHarborAPIClient(self)
619
+
620
+
621
+ class RawHarborAPIClient:
622
+ """
623
+ Raw-response client for BaseHarborAPIClient's root endpoints.
624
+
625
+ Each method delegates to the matching :class:`BaseHarborAPIClient` method and wraps the result in an
626
+ ``HttpResponse[T]`` so callers can read ``.data`` alongside ``.status_code`` and ``.headers``.
627
+ A fully-grouped spec binds nothing to the root, so this is then a bare shell and the endpoints
628
+ are reached through each resource client's own raw client.
629
+ """
630
+
631
+ def __init__(self, client: BaseHarborAPIClient):
632
+ self._client = client
633
+
634
+
635
+ class AsyncBaseHarborAPIClient(BaseHarborAPIClient):
636
+ """
637
+ Async SDK client for BaseHarborAPIClient. Mirrors the sync client with awaitable endpoints and async
638
+ resource accessors.
639
+ """
640
+
641
+ def __init__(
642
+ self,
643
+ *,
644
+ token: Optional[Union[str, Callable[[], str]]] = None,
645
+ harbor_api_version: str,
646
+ base_url: Union[HarborAPIClientEnvironment, str, None] = None,
647
+ environment: Optional[HarborAPIClientEnvironment] = None,
648
+ headers: Optional[Dict[str, str]] = None,
649
+ timeout: Optional[float] = None,
650
+ timeout_ms: Optional[int] = None,
651
+ http_client: Optional[requests.Session] = None,
652
+ httpx_client: Optional[Any] = None,
653
+ follow_redirects: bool = True,
654
+ logger: Optional[logging.Logger] = None,
655
+ retry: Optional["RetryConfig"] = None,
656
+ stream_reconnection_enabled: Optional[bool] = None,
657
+ max_stream_reconnection_attempts: Optional[int] = None,
658
+ async_token: Optional[Callable[[], Awaitable[str]]] = None,
659
+ ):
660
+ """Initializes the async client; ``async_token`` is an async token supplier, used when ``token`` is unset."""
661
+ if async_token is not None and token is None:
662
+ token = async_token
663
+ super().__init__(
664
+ token=token,
665
+ harbor_api_version=harbor_api_version,
666
+ base_url=base_url,
667
+ environment=environment,
668
+ headers=headers,
669
+ timeout=timeout,
670
+ timeout_ms=timeout_ms,
671
+ http_client=http_client,
672
+ httpx_client=httpx_client,
673
+ follow_redirects=follow_redirects,
674
+ logger=logger,
675
+ retry=retry,
676
+ stream_reconnection_enabled=stream_reconnection_enabled,
677
+ max_stream_reconnection_attempts=max_stream_reconnection_attempts,
678
+ )
679
+
680
+ async def aclose(self) -> None:
681
+ """Release the default pool used by Fern's native asynchronous wrappers."""
682
+ await asyncio.to_thread(self.close)
683
+
684
+ async def __aenter__(self) -> "AsyncBaseHarborAPIClient":
685
+ return self
686
+
687
+ async def __aexit__(self, exc_type: Any, exc: Any, tb: Any) -> None:
688
+ await self.aclose()
689
+
690
+ @property
691
+ def transfers(self) -> "AsyncStorageTransfers":
692
+ """Run signed upload, download, and copy workflows asynchronously."""
693
+ from .transfers import AsyncStorageTransfers
694
+
695
+ if not hasattr(self, "_async_storage_transfers"):
696
+ self._async_storage_transfers = AsyncStorageTransfers(self)
697
+ return self._async_storage_transfers
698
+
699
+ @property
700
+ def organizations(self) -> "AsyncOrganizationsClient":
701
+ """Lazily construct and return the async organizations resource client."""
702
+ if self._organizations is None:
703
+ from .organizations.client import AsyncOrganizationsClient
704
+
705
+ _child = AsyncOrganizationsClient(base_url=self.base_url)
706
+ _child._default_headers = self._default_headers.copy()
707
+ _child._global_headers = self._global_headers
708
+ _child._timeout = self._timeout
709
+ _child._http_client = self._http_client
710
+ _child._follow_redirects = self._follow_redirects
711
+ _child._logger = self._logger
712
+ _child._service_config = self._service_config
713
+ _child._update_request_handler()
714
+ self._organizations = _child
715
+ return self._organizations
716
+
717
+ @property
718
+ def packages(self) -> "AsyncPackagesClient":
719
+ """Lazily construct and return the async packages resource client."""
720
+ if self._packages is None:
721
+ from .packages.client import AsyncPackagesClient
722
+
723
+ _child = AsyncPackagesClient(base_url=self.base_url)
724
+ _child._default_headers = self._default_headers.copy()
725
+ _child._global_headers = self._global_headers
726
+ _child._timeout = self._timeout
727
+ _child._http_client = self._http_client
728
+ _child._follow_redirects = self._follow_redirects
729
+ _child._logger = self._logger
730
+ _child._service_config = self._service_config
731
+ _child._update_request_handler()
732
+ self._packages = _child
733
+ return self._packages
734
+
735
+ @property
736
+ def jobs(self) -> "AsyncJobsClient":
737
+ """Lazily construct and return the async jobs resource client."""
738
+ if self._jobs is None:
739
+ from .jobs.client import AsyncJobsClient
740
+
741
+ _child = AsyncJobsClient(base_url=self.base_url)
742
+ _child._default_headers = self._default_headers.copy()
743
+ _child._global_headers = self._global_headers
744
+ _child._timeout = self._timeout
745
+ _child._http_client = self._http_client
746
+ _child._follow_redirects = self._follow_redirects
747
+ _child._logger = self._logger
748
+ _child._service_config = self._service_config
749
+ _child._update_request_handler()
750
+ self._jobs = _child
751
+ return self._jobs
752
+
753
+ @property
754
+ def trials(self) -> "AsyncTrialsClient":
755
+ """Lazily construct and return the async trials resource client."""
756
+ if self._trials is None:
757
+ from .trials.client import AsyncTrialsClient
758
+
759
+ _child = AsyncTrialsClient(base_url=self.base_url)
760
+ _child._default_headers = self._default_headers.copy()
761
+ _child._global_headers = self._global_headers
762
+ _child._timeout = self._timeout
763
+ _child._http_client = self._http_client
764
+ _child._follow_redirects = self._follow_redirects
765
+ _child._logger = self._logger
766
+ _child._service_config = self._service_config
767
+ _child._update_request_handler()
768
+ self._trials = _child
769
+ return self._trials
770
+
771
+ @property
772
+ def rollouts(self) -> "AsyncRolloutsClient":
773
+ """Lazily construct and return the async rollouts resource client."""
774
+ if self._rollouts is None:
775
+ from .rollouts.client import AsyncRolloutsClient
776
+
777
+ _child = AsyncRolloutsClient(base_url=self.base_url)
778
+ _child._default_headers = self._default_headers.copy()
779
+ _child._global_headers = self._global_headers
780
+ _child._timeout = self._timeout
781
+ _child._http_client = self._http_client
782
+ _child._follow_redirects = self._follow_redirects
783
+ _child._logger = self._logger
784
+ _child._service_config = self._service_config
785
+ _child._update_request_handler()
786
+ self._rollouts = _child
787
+ return self._rollouts
788
+
789
+ @property
790
+ def account(self) -> "AsyncAccountClient":
791
+ """Lazily construct and return the async account resource client."""
792
+ if self._account is None:
793
+ from .account.client import AsyncAccountClient
794
+
795
+ _child = AsyncAccountClient(base_url=self.base_url)
796
+ _child._default_headers = self._default_headers.copy()
797
+ _child._global_headers = self._global_headers
798
+ _child._timeout = self._timeout
799
+ _child._http_client = self._http_client
800
+ _child._follow_redirects = self._follow_redirects
801
+ _child._logger = self._logger
802
+ _child._service_config = self._service_config
803
+ _child._update_request_handler()
804
+ self._account = _child
805
+ return self._account
806
+
807
+ @property
808
+ def api_keys(self) -> "AsyncApiKeysClient":
809
+ """Lazily construct and return the async api_keys resource client."""
810
+ if self._api_keys is None:
811
+ from .api_keys.client import AsyncApiKeysClient
812
+
813
+ _child = AsyncApiKeysClient(base_url=self.base_url)
814
+ _child._default_headers = self._default_headers.copy()
815
+ _child._global_headers = self._global_headers
816
+ _child._timeout = self._timeout
817
+ _child._http_client = self._http_client
818
+ _child._follow_redirects = self._follow_redirects
819
+ _child._logger = self._logger
820
+ _child._service_config = self._service_config
821
+ _child._update_request_handler()
822
+ self._api_keys = _child
823
+ return self._api_keys
824
+
825
+ @property
826
+ def agents(self) -> "AsyncAgentsClient":
827
+ """Lazily construct and return the async agents resource client."""
828
+ if self._agents is None:
829
+ from .agents.client import AsyncAgentsClient
830
+
831
+ _child = AsyncAgentsClient(base_url=self.base_url)
832
+ _child._default_headers = self._default_headers.copy()
833
+ _child._global_headers = self._global_headers
834
+ _child._timeout = self._timeout
835
+ _child._http_client = self._http_client
836
+ _child._follow_redirects = self._follow_redirects
837
+ _child._logger = self._logger
838
+ _child._service_config = self._service_config
839
+ _child._update_request_handler()
840
+ self._agents = _child
841
+ return self._agents
842
+
843
+ @property
844
+ def leaderboards(self) -> "AsyncLeaderboardsClient":
845
+ """Lazily construct and return the async leaderboards resource client."""
846
+ if self._leaderboards is None:
847
+ from .leaderboards.client import AsyncLeaderboardsClient
848
+
849
+ _child = AsyncLeaderboardsClient(base_url=self.base_url)
850
+ _child._default_headers = self._default_headers.copy()
851
+ _child._global_headers = self._global_headers
852
+ _child._timeout = self._timeout
853
+ _child._http_client = self._http_client
854
+ _child._follow_redirects = self._follow_redirects
855
+ _child._logger = self._logger
856
+ _child._service_config = self._service_config
857
+ _child._update_request_handler()
858
+ self._leaderboards = _child
859
+ return self._leaderboards
860
+
861
+ @property
862
+ def secrets(self) -> "AsyncSecretsClient":
863
+ """Lazily construct and return the async secrets resource client."""
864
+ if self._secrets is None:
865
+ from .secrets.client import AsyncSecretsClient
866
+
867
+ _child = AsyncSecretsClient(base_url=self.base_url)
868
+ _child._default_headers = self._default_headers.copy()
869
+ _child._global_headers = self._global_headers
870
+ _child._timeout = self._timeout
871
+ _child._http_client = self._http_client
872
+ _child._follow_redirects = self._follow_redirects
873
+ _child._logger = self._logger
874
+ _child._service_config = self._service_config
875
+ _child._update_request_handler()
876
+ self._secrets = _child
877
+ return self._secrets
878
+
879
+ @property
880
+ def storage(self) -> "AsyncStorageClient":
881
+ """Lazily construct and return the async storage resource client."""
882
+ if self._storage is None:
883
+ from .storage.client import AsyncStorageClient
884
+
885
+ _child = AsyncStorageClient(base_url=self.base_url)
886
+ _child._default_headers = self._default_headers.copy()
887
+ _child._global_headers = self._global_headers
888
+ _child._timeout = self._timeout
889
+ _child._http_client = self._http_client
890
+ _child._follow_redirects = self._follow_redirects
891
+ _child._logger = self._logger
892
+ _child._service_config = self._service_config
893
+ _child._update_request_handler()
894
+ self._storage = _child
895
+ return self._storage
896
+
897
+ @property
898
+ def with_raw_response(self) -> "AsyncRawHarborAPIClient": # type: ignore[override]
899
+ """
900
+ Returns an async raw-response client whose methods mirror this client's ROOT endpoints but
901
+ return ``HttpResponse[T]`` (parsed body plus the raw status code and headers).
902
+ """
903
+ return AsyncRawHarborAPIClient(self)
904
+
905
+
906
+ class AsyncRawHarborAPIClient:
907
+ """
908
+ Async raw-response client for AsyncBaseHarborAPIClient's root endpoints.
909
+ """
910
+
911
+ def __init__(self, client: AsyncBaseHarborAPIClient):
912
+ self._client = client