polyaxon-sdk 1.18.0rc7__py2.py3-none-any.whl → 2.1.6__py2.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 (276) hide show
  1. polyaxon_sdk/__init__.py +26 -34
  2. polyaxon_sdk/api/__init__.py +2 -18
  3. polyaxon_sdk/api/agents_v1_api.py +2314 -1108
  4. polyaxon_sdk/api/artifacts_stores_v1_api.py +90 -97
  5. polyaxon_sdk/api/auth_v1_api.py +398 -359
  6. polyaxon_sdk/api/connections_v1_api.py +516 -488
  7. polyaxon_sdk/api/dashboards_v1_api.py +516 -488
  8. polyaxon_sdk/api/organizations_v1_api.py +3107 -2327
  9. polyaxon_sdk/api/policies_v1_api.py +1232 -0
  10. polyaxon_sdk/api/presets_v1_api.py +528 -498
  11. polyaxon_sdk/api/project_dashboards_v1_api.py +596 -590
  12. polyaxon_sdk/api/project_searches_v1_api.py +596 -590
  13. polyaxon_sdk/api/projects_v1_api.py +2248 -2167
  14. polyaxon_sdk/api/queues_v1_api.py +701 -670
  15. polyaxon_sdk/api/runs_v1_api.py +5136 -4477
  16. polyaxon_sdk/api/schemas_v1_api.py +64 -70
  17. polyaxon_sdk/api/searches_v1_api.py +516 -488
  18. polyaxon_sdk/api/service_accounts_v1_api.py +956 -920
  19. polyaxon_sdk/api/tags_v1_api.py +587 -552
  20. polyaxon_sdk/api/teams_v1_api.py +953 -916
  21. polyaxon_sdk/api/users_v1_api.py +730 -646
  22. polyaxon_sdk/api/versions_v1_api.py +206 -190
  23. polyaxon_sdk/api_client.py +145 -101
  24. polyaxon_sdk/configuration.py +46 -79
  25. polyaxon_sdk/exceptions.py +6 -23
  26. polyaxon_sdk/models/__init__.py +24 -32
  27. polyaxon_sdk/models/agent_state_response_agent_state.py +71 -364
  28. polyaxon_sdk/models/mx_job_mode.py +12 -105
  29. polyaxon_sdk/models/protobuf_any.py +65 -164
  30. polyaxon_sdk/models/protobuf_null_value.py +11 -104
  31. polyaxon_sdk/models/runtime_error.py +67 -208
  32. polyaxon_sdk/models/search_view.py +18 -111
  33. polyaxon_sdk/models/v1_activity.py +68 -313
  34. polyaxon_sdk/models/v1_agent.py +93 -495
  35. polyaxon_sdk/models/v1_agent_reconcile_body_request.py +75 -0
  36. polyaxon_sdk/models/v1_agent_state_response.py +64 -208
  37. polyaxon_sdk/models/v1_agent_status_body_request.py +61 -182
  38. polyaxon_sdk/models/v1_analytics_spec.py +59 -208
  39. polyaxon_sdk/models/v1_artifact_kind.py +42 -134
  40. polyaxon_sdk/models/v1_artifact_tree.py +57 -182
  41. polyaxon_sdk/models/v1_artifacts_mount.py +55 -156
  42. polyaxon_sdk/models/v1_artifacts_type.py +57 -182
  43. polyaxon_sdk/models/v1_auth.py +54 -131
  44. polyaxon_sdk/models/v1_auth_type.py +55 -156
  45. polyaxon_sdk/models/v1_average_stopping_policy.py +54 -131
  46. polyaxon_sdk/models/v1_bayes.py +79 -364
  47. polyaxon_sdk/models/v1_bucket_connection.py +54 -131
  48. polyaxon_sdk/models/v1_build.py +82 -312
  49. polyaxon_sdk/models/v1_cache.py +59 -208
  50. polyaxon_sdk/models/v1_claim_connection.py +59 -208
  51. polyaxon_sdk/models/v1_clean_pod_policy.py +13 -106
  52. polyaxon_sdk/models/v1_cloning.py +58 -182
  53. polyaxon_sdk/models/v1_cloning_kind.py +13 -106
  54. polyaxon_sdk/models/v1_compatibility.py +72 -208
  55. polyaxon_sdk/models/v1_compiled_operation.py +171 -783
  56. polyaxon_sdk/models/v1_component.py +132 -572
  57. polyaxon_sdk/models/v1_connection_kind.py +53 -146
  58. polyaxon_sdk/models/v1_connection_resource.py +77 -0
  59. polyaxon_sdk/models/v1_connection_response.py +71 -339
  60. polyaxon_sdk/models/v1_connection_schema.py +81 -234
  61. polyaxon_sdk/models/v1_connection_type.py +77 -338
  62. polyaxon_sdk/models/v1_credentials.py +55 -156
  63. polyaxon_sdk/models/v1_cron_schedule.py +64 -261
  64. polyaxon_sdk/models/v1_dag.py +87 -314
  65. polyaxon_sdk/models/v1_dag_ref.py +55 -156
  66. polyaxon_sdk/models/v1_dashboard.py +74 -339
  67. polyaxon_sdk/models/v1_dashboard_spec.py +70 -131
  68. polyaxon_sdk/models/v1_dask_job.py +87 -0
  69. polyaxon_sdk/models/v1_dask_replica.py +95 -0
  70. polyaxon_sdk/models/v1_date_time_schedule.py +56 -157
  71. polyaxon_sdk/models/v1_diff_stopping_policy.py +61 -236
  72. polyaxon_sdk/models/v1_dockerfile_type.py +79 -468
  73. polyaxon_sdk/models/v1_early_stopping.py +81 -234
  74. polyaxon_sdk/models/v1_entities_tags.py +55 -156
  75. polyaxon_sdk/models/v1_entities_transfer.py +55 -156
  76. polyaxon_sdk/models/v1_entity_notification_body.py +69 -286
  77. polyaxon_sdk/models/v1_entity_stage_body_request.py +65 -234
  78. polyaxon_sdk/models/v1_entity_status_body_request.py +65 -234
  79. polyaxon_sdk/models/v1_environment.py +87 -588
  80. polyaxon_sdk/models/v1_event.py +130 -499
  81. polyaxon_sdk/models/v1_event_artifact.py +56 -156
  82. polyaxon_sdk/models/v1_event_audio.py +61 -240
  83. polyaxon_sdk/models/v1_event_chart.py +56 -156
  84. polyaxon_sdk/models/v1_event_chart_kind.py +13 -106
  85. polyaxon_sdk/models/v1_event_confusion_matrix.py +57 -182
  86. polyaxon_sdk/models/v1_event_curve.py +60 -208
  87. polyaxon_sdk/models/v1_event_curve_kind.py +13 -106
  88. polyaxon_sdk/models/v1_event_dataframe.py +55 -156
  89. polyaxon_sdk/models/v1_event_histogram.py +55 -156
  90. polyaxon_sdk/models/v1_event_image.py +59 -212
  91. polyaxon_sdk/models/v1_event_kind.py +42 -135
  92. polyaxon_sdk/models/v1_event_model.py +57 -182
  93. polyaxon_sdk/models/v1_event_span.py +110 -0
  94. polyaxon_sdk/models/v1_event_span_kind.py +39 -0
  95. polyaxon_sdk/models/v1_event_trigger.py +56 -156
  96. polyaxon_sdk/models/v1_event_type.py +56 -156
  97. polyaxon_sdk/models/v1_event_video.py +61 -238
  98. polyaxon_sdk/models/v1_events_response.py +54 -131
  99. polyaxon_sdk/models/v1_failure_early_stopping.py +55 -158
  100. polyaxon_sdk/models/v1_file_type.py +59 -208
  101. polyaxon_sdk/models/v1_gcs_type.py +55 -156
  102. polyaxon_sdk/models/v1_git_connection.py +57 -182
  103. polyaxon_sdk/models/v1_git_type.py +57 -182
  104. polyaxon_sdk/models/v1_grid_search.py +63 -260
  105. polyaxon_sdk/models/v1_hook.py +78 -312
  106. polyaxon_sdk/models/v1_host_connection.py +55 -156
  107. polyaxon_sdk/models/v1_host_path_connection.py +59 -208
  108. polyaxon_sdk/models/v1_hp_choice.py +55 -156
  109. polyaxon_sdk/models/v1_hp_date_range.py +55 -156
  110. polyaxon_sdk/models/v1_hp_date_time_range.py +55 -156
  111. polyaxon_sdk/models/v1_hp_geom_space.py +55 -156
  112. polyaxon_sdk/models/v1_hp_lin_space.py +55 -156
  113. polyaxon_sdk/models/v1_hp_log_normal.py +55 -156
  114. polyaxon_sdk/models/v1_hp_log_space.py +55 -156
  115. polyaxon_sdk/models/v1_hp_log_uniform.py +55 -156
  116. polyaxon_sdk/models/v1_hp_normal.py +55 -156
  117. polyaxon_sdk/models/v1_hp_p_choice.py +55 -156
  118. polyaxon_sdk/models/v1_hp_params.py +150 -523
  119. polyaxon_sdk/models/v1_hp_q_log_normal.py +55 -156
  120. polyaxon_sdk/models/v1_hp_q_log_uniform.py +55 -156
  121. polyaxon_sdk/models/v1_hp_q_normal.py +55 -156
  122. polyaxon_sdk/models/v1_hp_q_uniform.py +55 -156
  123. polyaxon_sdk/models/v1_hp_range.py +55 -156
  124. polyaxon_sdk/models/v1_hp_uniform.py +55 -156
  125. polyaxon_sdk/models/v1_hub_ref.py +55 -156
  126. polyaxon_sdk/models/v1_hyperband.py +85 -390
  127. polyaxon_sdk/models/v1_hyperopt.py +80 -364
  128. polyaxon_sdk/models/v1_hyperopt_algorithms.py +13 -106
  129. polyaxon_sdk/models/v1_init.py +95 -416
  130. polyaxon_sdk/models/v1_installation.py +67 -260
  131. polyaxon_sdk/models/v1_interval_schedule.py +64 -261
  132. polyaxon_sdk/models/v1_io.py +83 -442
  133. polyaxon_sdk/models/v1_iterative.py +69 -286
  134. polyaxon_sdk/models/v1_job.py +77 -288
  135. polyaxon_sdk/models/v1_join.py +71 -260
  136. polyaxon_sdk/models/v1_join_param.py +61 -234
  137. polyaxon_sdk/models/v1_kf_replica.py +77 -286
  138. polyaxon_sdk/models/v1_list_activities_response.py +67 -208
  139. polyaxon_sdk/models/v1_list_agents_response.py +67 -208
  140. polyaxon_sdk/models/v1_list_bookmarks_response.py +59 -208
  141. polyaxon_sdk/models/v1_list_connections_response.py +67 -208
  142. polyaxon_sdk/models/v1_list_dashboards_response.py +67 -208
  143. polyaxon_sdk/models/v1_list_organization_members_response.py +67 -208
  144. polyaxon_sdk/models/v1_list_organizations_response.py +67 -208
  145. polyaxon_sdk/models/v1_list_policies_response.py +85 -0
  146. polyaxon_sdk/models/v1_list_presets_response.py +67 -208
  147. polyaxon_sdk/models/v1_list_project_versions_response.py +67 -208
  148. polyaxon_sdk/models/v1_list_projects_response.py +67 -208
  149. polyaxon_sdk/models/v1_list_queues_response.py +67 -208
  150. polyaxon_sdk/models/v1_list_run_artifacts_response.py +67 -208
  151. polyaxon_sdk/models/v1_list_run_connections_response.py +67 -208
  152. polyaxon_sdk/models/v1_list_run_edges_response.py +67 -208
  153. polyaxon_sdk/models/v1_list_runs_response.py +67 -208
  154. polyaxon_sdk/models/v1_list_searches_response.py +67 -208
  155. polyaxon_sdk/models/v1_list_service_accounts_response.py +67 -208
  156. polyaxon_sdk/models/v1_list_tags_response.py +67 -208
  157. polyaxon_sdk/models/v1_list_team_members_response.py +67 -208
  158. polyaxon_sdk/models/v1_list_teams_response.py +67 -208
  159. polyaxon_sdk/models/v1_list_token_response.py +67 -208
  160. polyaxon_sdk/models/v1_log.py +62 -235
  161. polyaxon_sdk/models/v1_log_handler.py +55 -156
  162. polyaxon_sdk/models/v1_logs.py +68 -209
  163. polyaxon_sdk/models/v1_managed_by.py +36 -0
  164. polyaxon_sdk/models/v1_mapping.py +59 -208
  165. polyaxon_sdk/models/v1_matrix.py +93 -286
  166. polyaxon_sdk/models/v1_matrix_kind.py +17 -110
  167. polyaxon_sdk/models/v1_median_stopping_policy.py +59 -210
  168. polyaxon_sdk/models/v1_metric_early_stopping.py +62 -238
  169. polyaxon_sdk/models/v1_mpi_job.py +75 -312
  170. polyaxon_sdk/models/v1_multi_events_response.py +71 -0
  171. polyaxon_sdk/models/v1_mx_job.py +96 -364
  172. polyaxon_sdk/models/v1_notification.py +56 -156
  173. polyaxon_sdk/models/v1_operation.py +178 -939
  174. polyaxon_sdk/models/v1_operation_body.py +69 -286
  175. polyaxon_sdk/models/v1_optimization.py +12 -105
  176. polyaxon_sdk/models/v1_optimization_metric.py +56 -156
  177. polyaxon_sdk/models/v1_optimization_resource.py +56 -156
  178. polyaxon_sdk/models/v1_organization.py +84 -495
  179. polyaxon_sdk/models/v1_organization_member.py +64 -261
  180. polyaxon_sdk/models/v1_paddle_elastic_polic.py +77 -0
  181. polyaxon_sdk/models/v1_paddle_job.py +97 -0
  182. polyaxon_sdk/models/v1_param.py +63 -260
  183. polyaxon_sdk/models/v1_password_change.py +57 -182
  184. polyaxon_sdk/models/v1_patch_strategy.py +14 -107
  185. polyaxon_sdk/models/v1_path_ref.py +55 -156
  186. polyaxon_sdk/models/v1_pipeline.py +58 -182
  187. polyaxon_sdk/models/v1_pipeline_kind.py +12 -105
  188. polyaxon_sdk/models/v1_plugins.py +89 -442
  189. polyaxon_sdk/models/v1_policy.py +119 -0
  190. polyaxon_sdk/models/v1_polyaxon_init_container.py +59 -208
  191. polyaxon_sdk/models/v1_polyaxon_sidecar_container.py +67 -286
  192. polyaxon_sdk/models/v1_preset.py +70 -339
  193. polyaxon_sdk/models/v1_project.py +90 -495
  194. polyaxon_sdk/models/v1_project_settings.py +81 -338
  195. polyaxon_sdk/models/v1_project_version.py +102 -601
  196. polyaxon_sdk/models/v1_project_version_kind.py +13 -106
  197. polyaxon_sdk/models/v1_pytorch_elastic_policy.py +91 -0
  198. polyaxon_sdk/models/v1_pytorch_job.py +81 -234
  199. polyaxon_sdk/models/v1_queue.py +76 -417
  200. polyaxon_sdk/models/v1_random_search.py +63 -260
  201. polyaxon_sdk/models/v1_ray_job.py +94 -0
  202. polyaxon_sdk/models/v1_ray_replica.py +103 -0
  203. polyaxon_sdk/models/v1_reference.py +75 -208
  204. polyaxon_sdk/models/v1_resource_type.py +12 -105
  205. polyaxon_sdk/models/v1_run.py +158 -1043
  206. polyaxon_sdk/models/v1_run_artifact.py +70 -338
  207. polyaxon_sdk/models/v1_run_artifacts.py +62 -131
  208. polyaxon_sdk/models/v1_run_connection.py +57 -182
  209. polyaxon_sdk/models/v1_run_edge.py +70 -234
  210. polyaxon_sdk/models/v1_run_edge_kind.py +19 -111
  211. polyaxon_sdk/models/v1_run_edge_lineage.py +75 -0
  212. polyaxon_sdk/models/v1_run_edges_graph.py +79 -0
  213. polyaxon_sdk/models/v1_run_kind.py +28 -122
  214. polyaxon_sdk/models/v1_run_pending.py +14 -107
  215. polyaxon_sdk/models/v1_run_reference_catalog.py +59 -182
  216. polyaxon_sdk/models/v1_run_resources.py +61 -234
  217. polyaxon_sdk/models/v1_run_schema.py +120 -419
  218. polyaxon_sdk/models/v1_run_settings.py +94 -338
  219. polyaxon_sdk/models/v1_s3_type.py +55 -156
  220. polyaxon_sdk/models/v1_schedule.py +69 -182
  221. polyaxon_sdk/models/v1_schedule_kind.py +13 -106
  222. polyaxon_sdk/models/v1_scheduling_policy.py +61 -182
  223. polyaxon_sdk/models/v1_schemas.py +192 -731
  224. polyaxon_sdk/models/v1_search.py +77 -365
  225. polyaxon_sdk/models/v1_search_spec.py +87 -468
  226. polyaxon_sdk/models/v1_section_spec.py +75 -286
  227. polyaxon_sdk/models/v1_service.py +85 -396
  228. polyaxon_sdk/models/v1_service_account.py +70 -339
  229. polyaxon_sdk/models/v1_settings_catalog.py +57 -156
  230. polyaxon_sdk/models/v1_stage.py +66 -182
  231. polyaxon_sdk/models/v1_stage_condition.py +67 -261
  232. polyaxon_sdk/models/v1_stages.py +14 -107
  233. polyaxon_sdk/models/v1_status.py +68 -208
  234. polyaxon_sdk/models/v1_status_condition.py +67 -261
  235. polyaxon_sdk/models/v1_statuses.py +30 -123
  236. polyaxon_sdk/models/v1_tag.py +63 -260
  237. polyaxon_sdk/models/v1_team.py +72 -313
  238. polyaxon_sdk/models/v1_team_member.py +64 -261
  239. polyaxon_sdk/models/v1_team_settings.py +79 -182
  240. polyaxon_sdk/models/v1_template.py +57 -182
  241. polyaxon_sdk/models/v1_tensorboard_type.py +61 -234
  242. polyaxon_sdk/models/v1_termination.py +57 -182
  243. polyaxon_sdk/models/v1_tf_job.py +87 -286
  244. polyaxon_sdk/models/v1_token.py +72 -365
  245. polyaxon_sdk/models/v1_trial_start.py +63 -260
  246. polyaxon_sdk/models/v1_trigger_policy.py +16 -109
  247. polyaxon_sdk/models/v1_truncation_stopping_policy.py +63 -264
  248. polyaxon_sdk/models/v1_tuner.py +69 -208
  249. polyaxon_sdk/models/v1_uri_type.py +57 -182
  250. polyaxon_sdk/models/v1_url_ref.py +55 -156
  251. polyaxon_sdk/models/v1_user.py +63 -260
  252. polyaxon_sdk/models/v1_user_access.py +77 -0
  253. polyaxon_sdk/models/v1_user_email.py +54 -131
  254. polyaxon_sdk/models/v1_user_singup.py +61 -234
  255. polyaxon_sdk/models/v1_uuids.py +54 -131
  256. polyaxon_sdk/models/v1_validation.py +109 -0
  257. polyaxon_sdk/models/v1_version.py +55 -156
  258. polyaxon_sdk/models/v1_wasb_type.py +57 -182
  259. polyaxon_sdk/models/v1_xg_boost_job.py +73 -234
  260. polyaxon_sdk/rest.py +23 -41
  261. {polyaxon_sdk-1.18.0rc7.dist-info → polyaxon_sdk-2.1.6.dist-info}/METADATA +6 -4
  262. polyaxon_sdk-2.1.6.dist-info/RECORD +264 -0
  263. {polyaxon_sdk-1.18.0rc7.dist-info → polyaxon_sdk-2.1.6.dist-info}/WHEEL +1 -1
  264. polyaxon_sdk/models/mpi_job_implementation.py +0 -128
  265. polyaxon_sdk/models/spark_deploy_mode.py +0 -129
  266. polyaxon_sdk/models/v1_dask.py +0 -436
  267. polyaxon_sdk/models/v1_flink.py +0 -174
  268. polyaxon_sdk/models/v1_k8s_resource_schema.py +0 -226
  269. polyaxon_sdk/models/v1_k8s_resource_type.py +0 -200
  270. polyaxon_sdk/models/v1_project_user_access.py +0 -200
  271. polyaxon_sdk/models/v1_ray.py +0 -174
  272. polyaxon_sdk/models/v1_spark.py +0 -558
  273. polyaxon_sdk/models/v1_spark_replica.py +0 -252
  274. polyaxon_sdk/models/v1_spark_type.py +0 -130
  275. polyaxon_sdk-1.18.0rc7.dist-info/RECORD +0 -255
  276. {polyaxon_sdk-1.18.0rc7.dist-info → polyaxon_sdk-2.1.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1232 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Polyaxon SDKs and REST API specification.
5
+
6
+ # noqa: E501
7
+
8
+ The version of the OpenAPI document: 2.1.6
9
+ Contact: contact@polyaxon.com
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
13
+ """
14
+
15
+
16
+ import re # noqa: F401
17
+
18
+ from pydantic import validate_arguments, ValidationError
19
+ from typing_extensions import Annotated
20
+
21
+ from pydantic import Field, StrictBool, StrictInt, StrictStr
22
+
23
+ from typing import Optional
24
+
25
+ from polyaxon_sdk.models.v1_list_policies_response import V1ListPoliciesResponse
26
+ from polyaxon_sdk.models.v1_policy import V1Policy
27
+
28
+ from polyaxon_sdk.api_client import ApiClient
29
+ from polyaxon_sdk.exceptions import ( # noqa: F401
30
+ ApiTypeError,
31
+ ApiValueError
32
+ )
33
+
34
+
35
+ class PoliciesV1Api(object):
36
+ """NOTE: This class is auto generated by OpenAPI Generator
37
+ Ref: https://openapi-generator.tech
38
+
39
+ Do not edit the class manually.
40
+ """
41
+
42
+ def __init__(self, api_client=None):
43
+ if api_client is None:
44
+ api_client = ApiClient.get_default()
45
+ self.api_client = api_client
46
+
47
+ @validate_arguments
48
+ def create_policy(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], body : Annotated[V1Policy, Field(..., description="Policy body")], **kwargs) -> V1Policy: # noqa: E501
49
+ """Create Policy # noqa: E501
50
+
51
+ This method makes a synchronous HTTP request by default. To make an
52
+ asynchronous HTTP request, please pass async_req=True
53
+
54
+ >>> thread = api.create_policy(owner, body, async_req=True)
55
+ >>> result = thread.get()
56
+
57
+ :param owner: Owner of the namespace (required)
58
+ :type owner: str
59
+ :param body: Policy body (required)
60
+ :type body: V1Policy
61
+ :param async_req: Whether to execute the request asynchronously.
62
+ :type async_req: bool, optional
63
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
64
+ be returned without reading/decoding response
65
+ data. Default is True.
66
+ :type _preload_content: bool, optional
67
+ :param _request_timeout: timeout setting for this request. If one
68
+ number provided, it will be total request
69
+ timeout. It can also be a pair (tuple) of
70
+ (connection, read) timeouts.
71
+ :return: Returns the result object.
72
+ If the method is called asynchronously,
73
+ returns the request thread.
74
+ :rtype: V1Policy
75
+ """
76
+ kwargs['_return_http_data_only'] = True
77
+ return self.create_policy_with_http_info(owner, body, **kwargs) # noqa: E501
78
+
79
+ @validate_arguments
80
+ def create_policy_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], body : Annotated[V1Policy, Field(..., description="Policy body")], **kwargs): # noqa: E501
81
+ """Create Policy # noqa: E501
82
+
83
+ This method makes a synchronous HTTP request by default. To make an
84
+ asynchronous HTTP request, please pass async_req=True
85
+
86
+ >>> thread = api.create_policy_with_http_info(owner, body, async_req=True)
87
+ >>> result = thread.get()
88
+
89
+ :param owner: Owner of the namespace (required)
90
+ :type owner: str
91
+ :param body: Policy body (required)
92
+ :type body: V1Policy
93
+ :param async_req: Whether to execute the request asynchronously.
94
+ :type async_req: bool, optional
95
+ :param _return_http_data_only: response data without head status code
96
+ and headers
97
+ :type _return_http_data_only: bool, optional
98
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
99
+ be returned without reading/decoding response
100
+ data. Default is True.
101
+ :type _preload_content: bool, optional
102
+ :param _request_timeout: timeout setting for this request. If one
103
+ number provided, it will be total request
104
+ timeout. It can also be a pair (tuple) of
105
+ (connection, read) timeouts.
106
+ :param _request_auth: set to override the auth_settings for an a single
107
+ request; this effectively ignores the authentication
108
+ in the spec for a single request.
109
+ :type _request_auth: dict, optional
110
+ :type _content_type: string, optional: force content-type for the request
111
+ :return: Returns the result object.
112
+ If the method is called asynchronously,
113
+ returns the request thread.
114
+ :rtype: tuple(V1Policy, status_code(int), headers(HTTPHeaderDict))
115
+ """
116
+
117
+ _params = locals()
118
+
119
+ _all_params = [
120
+ 'owner',
121
+ 'body'
122
+ ]
123
+ _all_params.extend(
124
+ [
125
+ 'async_req',
126
+ '_return_http_data_only',
127
+ '_preload_content',
128
+ '_request_timeout',
129
+ '_request_auth',
130
+ '_content_type',
131
+ '_headers'
132
+ ]
133
+ )
134
+
135
+ # validate the arguments
136
+ for _key, _val in _params['kwargs'].items():
137
+ if _key not in _all_params:
138
+ raise ApiTypeError(
139
+ "Got an unexpected keyword argument '%s'"
140
+ " to method create_policy" % _key
141
+ )
142
+ _params[_key] = _val
143
+ del _params['kwargs']
144
+
145
+ _collection_formats = {}
146
+
147
+ # process the path parameters
148
+ _path_params = {}
149
+ if _params['owner']:
150
+ _path_params['owner'] = _params['owner']
151
+
152
+
153
+ # process the query parameters
154
+ _query_params = []
155
+ # process the header parameters
156
+ _header_params = dict(_params.get('_headers', {}))
157
+ # process the form parameters
158
+ _form_params = []
159
+ _files = {}
160
+ # process the body parameter
161
+ _body_params = None
162
+ if _params['body']:
163
+ _body_params = _params['body']
164
+
165
+ # set the HTTP header `Accept`
166
+ _header_params['Accept'] = self.api_client.select_header_accept(
167
+ ['application/json']) # noqa: E501
168
+
169
+ # set the HTTP header `Content-Type`
170
+ _content_types_list = _params.get('_content_type',
171
+ self.api_client.select_header_content_type(
172
+ ['application/json']))
173
+ if _content_types_list:
174
+ _header_params['Content-Type'] = _content_types_list
175
+
176
+ # authentication setting
177
+ _auth_settings = ['ApiKey'] # noqa: E501
178
+
179
+ _response_types_map = {
180
+ '200': "V1Policy",
181
+ '204': "object",
182
+ '403': "object",
183
+ '404': "object",
184
+ }
185
+
186
+ return self.api_client.call_api(
187
+ '/api/v1/orgs/{owner}/policies', 'POST',
188
+ _path_params,
189
+ _query_params,
190
+ _header_params,
191
+ body=_body_params,
192
+ post_params=_form_params,
193
+ files=_files,
194
+ response_types_map=_response_types_map,
195
+ auth_settings=_auth_settings,
196
+ async_req=_params.get('async_req'),
197
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
198
+ _preload_content=_params.get('_preload_content', True),
199
+ _request_timeout=_params.get('_request_timeout'),
200
+ collection_formats=_collection_formats,
201
+ _request_auth=_params.get('_request_auth'))
202
+
203
+ @validate_arguments
204
+ def delete_policy(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], uuid : Annotated[StrictStr, Field(..., description="Uuid identifier of the sub-entity")], entity : Annotated[Optional[StrictStr], Field(description="Entity: project name, hub name, registry name, ...")] = None, **kwargs) -> None: # noqa: E501
205
+ """Delete scheduling preset # noqa: E501
206
+
207
+ This method makes a synchronous HTTP request by default. To make an
208
+ asynchronous HTTP request, please pass async_req=True
209
+
210
+ >>> thread = api.delete_policy(owner, uuid, entity, async_req=True)
211
+ >>> result = thread.get()
212
+
213
+ :param owner: Owner of the namespace (required)
214
+ :type owner: str
215
+ :param uuid: Uuid identifier of the sub-entity (required)
216
+ :type uuid: str
217
+ :param entity: Entity: project name, hub name, registry name, ...
218
+ :type entity: str
219
+ :param async_req: Whether to execute the request asynchronously.
220
+ :type async_req: bool, optional
221
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
222
+ be returned without reading/decoding response
223
+ data. Default is True.
224
+ :type _preload_content: bool, optional
225
+ :param _request_timeout: timeout setting for this request. If one
226
+ number provided, it will be total request
227
+ timeout. It can also be a pair (tuple) of
228
+ (connection, read) timeouts.
229
+ :return: Returns the result object.
230
+ If the method is called asynchronously,
231
+ returns the request thread.
232
+ :rtype: None
233
+ """
234
+ kwargs['_return_http_data_only'] = True
235
+ return self.delete_policy_with_http_info(owner, uuid, entity, **kwargs) # noqa: E501
236
+
237
+ @validate_arguments
238
+ def delete_policy_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], uuid : Annotated[StrictStr, Field(..., description="Uuid identifier of the sub-entity")], entity : Annotated[Optional[StrictStr], Field(description="Entity: project name, hub name, registry name, ...")] = None, **kwargs): # noqa: E501
239
+ """Delete scheduling preset # noqa: E501
240
+
241
+ This method makes a synchronous HTTP request by default. To make an
242
+ asynchronous HTTP request, please pass async_req=True
243
+
244
+ >>> thread = api.delete_policy_with_http_info(owner, uuid, entity, async_req=True)
245
+ >>> result = thread.get()
246
+
247
+ :param owner: Owner of the namespace (required)
248
+ :type owner: str
249
+ :param uuid: Uuid identifier of the sub-entity (required)
250
+ :type uuid: str
251
+ :param entity: Entity: project name, hub name, registry name, ...
252
+ :type entity: str
253
+ :param async_req: Whether to execute the request asynchronously.
254
+ :type async_req: bool, optional
255
+ :param _return_http_data_only: response data without head status code
256
+ and headers
257
+ :type _return_http_data_only: bool, optional
258
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
259
+ be returned without reading/decoding response
260
+ data. Default is True.
261
+ :type _preload_content: bool, optional
262
+ :param _request_timeout: timeout setting for this request. If one
263
+ number provided, it will be total request
264
+ timeout. It can also be a pair (tuple) of
265
+ (connection, read) timeouts.
266
+ :param _request_auth: set to override the auth_settings for an a single
267
+ request; this effectively ignores the authentication
268
+ in the spec for a single request.
269
+ :type _request_auth: dict, optional
270
+ :type _content_type: string, optional: force content-type for the request
271
+ :return: Returns the result object.
272
+ If the method is called asynchronously,
273
+ returns the request thread.
274
+ :rtype: None
275
+ """
276
+
277
+ _params = locals()
278
+
279
+ _all_params = [
280
+ 'owner',
281
+ 'uuid',
282
+ 'entity'
283
+ ]
284
+ _all_params.extend(
285
+ [
286
+ 'async_req',
287
+ '_return_http_data_only',
288
+ '_preload_content',
289
+ '_request_timeout',
290
+ '_request_auth',
291
+ '_content_type',
292
+ '_headers'
293
+ ]
294
+ )
295
+
296
+ # validate the arguments
297
+ for _key, _val in _params['kwargs'].items():
298
+ if _key not in _all_params:
299
+ raise ApiTypeError(
300
+ "Got an unexpected keyword argument '%s'"
301
+ " to method delete_policy" % _key
302
+ )
303
+ _params[_key] = _val
304
+ del _params['kwargs']
305
+
306
+ _collection_formats = {}
307
+
308
+ # process the path parameters
309
+ _path_params = {}
310
+ if _params['owner']:
311
+ _path_params['owner'] = _params['owner']
312
+
313
+ if _params['uuid']:
314
+ _path_params['uuid'] = _params['uuid']
315
+
316
+
317
+ # process the query parameters
318
+ _query_params = []
319
+ if _params.get('entity') is not None: # noqa: E501
320
+ _query_params.append(('entity', _params['entity']))
321
+
322
+ # process the header parameters
323
+ _header_params = dict(_params.get('_headers', {}))
324
+ # process the form parameters
325
+ _form_params = []
326
+ _files = {}
327
+ # process the body parameter
328
+ _body_params = None
329
+ # set the HTTP header `Accept`
330
+ _header_params['Accept'] = self.api_client.select_header_accept(
331
+ ['application/json']) # noqa: E501
332
+
333
+ # authentication setting
334
+ _auth_settings = ['ApiKey'] # noqa: E501
335
+
336
+ _response_types_map = {}
337
+
338
+ return self.api_client.call_api(
339
+ '/api/v1/orgs/{owner}/policies/{uuid}', 'DELETE',
340
+ _path_params,
341
+ _query_params,
342
+ _header_params,
343
+ body=_body_params,
344
+ post_params=_form_params,
345
+ files=_files,
346
+ response_types_map=_response_types_map,
347
+ auth_settings=_auth_settings,
348
+ async_req=_params.get('async_req'),
349
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
350
+ _preload_content=_params.get('_preload_content', True),
351
+ _request_timeout=_params.get('_request_timeout'),
352
+ collection_formats=_collection_formats,
353
+ _request_auth=_params.get('_request_auth'))
354
+
355
+ @validate_arguments
356
+ def get_policy(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], uuid : Annotated[StrictStr, Field(..., description="Uuid identifier of the sub-entity")], entity : Annotated[Optional[StrictStr], Field(description="Entity: project name, hub name, registry name, ...")] = None, **kwargs) -> V1Policy: # noqa: E501
357
+ """Get Policy # noqa: E501
358
+
359
+ This method makes a synchronous HTTP request by default. To make an
360
+ asynchronous HTTP request, please pass async_req=True
361
+
362
+ >>> thread = api.get_policy(owner, uuid, entity, async_req=True)
363
+ >>> result = thread.get()
364
+
365
+ :param owner: Owner of the namespace (required)
366
+ :type owner: str
367
+ :param uuid: Uuid identifier of the sub-entity (required)
368
+ :type uuid: str
369
+ :param entity: Entity: project name, hub name, registry name, ...
370
+ :type entity: str
371
+ :param async_req: Whether to execute the request asynchronously.
372
+ :type async_req: bool, optional
373
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
374
+ be returned without reading/decoding response
375
+ data. Default is True.
376
+ :type _preload_content: bool, optional
377
+ :param _request_timeout: timeout setting for this request. If one
378
+ number provided, it will be total request
379
+ timeout. It can also be a pair (tuple) of
380
+ (connection, read) timeouts.
381
+ :return: Returns the result object.
382
+ If the method is called asynchronously,
383
+ returns the request thread.
384
+ :rtype: V1Policy
385
+ """
386
+ kwargs['_return_http_data_only'] = True
387
+ return self.get_policy_with_http_info(owner, uuid, entity, **kwargs) # noqa: E501
388
+
389
+ @validate_arguments
390
+ def get_policy_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], uuid : Annotated[StrictStr, Field(..., description="Uuid identifier of the sub-entity")], entity : Annotated[Optional[StrictStr], Field(description="Entity: project name, hub name, registry name, ...")] = None, **kwargs): # noqa: E501
391
+ """Get Policy # noqa: E501
392
+
393
+ This method makes a synchronous HTTP request by default. To make an
394
+ asynchronous HTTP request, please pass async_req=True
395
+
396
+ >>> thread = api.get_policy_with_http_info(owner, uuid, entity, async_req=True)
397
+ >>> result = thread.get()
398
+
399
+ :param owner: Owner of the namespace (required)
400
+ :type owner: str
401
+ :param uuid: Uuid identifier of the sub-entity (required)
402
+ :type uuid: str
403
+ :param entity: Entity: project name, hub name, registry name, ...
404
+ :type entity: str
405
+ :param async_req: Whether to execute the request asynchronously.
406
+ :type async_req: bool, optional
407
+ :param _return_http_data_only: response data without head status code
408
+ and headers
409
+ :type _return_http_data_only: bool, optional
410
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
411
+ be returned without reading/decoding response
412
+ data. Default is True.
413
+ :type _preload_content: bool, optional
414
+ :param _request_timeout: timeout setting for this request. If one
415
+ number provided, it will be total request
416
+ timeout. It can also be a pair (tuple) of
417
+ (connection, read) timeouts.
418
+ :param _request_auth: set to override the auth_settings for an a single
419
+ request; this effectively ignores the authentication
420
+ in the spec for a single request.
421
+ :type _request_auth: dict, optional
422
+ :type _content_type: string, optional: force content-type for the request
423
+ :return: Returns the result object.
424
+ If the method is called asynchronously,
425
+ returns the request thread.
426
+ :rtype: tuple(V1Policy, status_code(int), headers(HTTPHeaderDict))
427
+ """
428
+
429
+ _params = locals()
430
+
431
+ _all_params = [
432
+ 'owner',
433
+ 'uuid',
434
+ 'entity'
435
+ ]
436
+ _all_params.extend(
437
+ [
438
+ 'async_req',
439
+ '_return_http_data_only',
440
+ '_preload_content',
441
+ '_request_timeout',
442
+ '_request_auth',
443
+ '_content_type',
444
+ '_headers'
445
+ ]
446
+ )
447
+
448
+ # validate the arguments
449
+ for _key, _val in _params['kwargs'].items():
450
+ if _key not in _all_params:
451
+ raise ApiTypeError(
452
+ "Got an unexpected keyword argument '%s'"
453
+ " to method get_policy" % _key
454
+ )
455
+ _params[_key] = _val
456
+ del _params['kwargs']
457
+
458
+ _collection_formats = {}
459
+
460
+ # process the path parameters
461
+ _path_params = {}
462
+ if _params['owner']:
463
+ _path_params['owner'] = _params['owner']
464
+
465
+ if _params['uuid']:
466
+ _path_params['uuid'] = _params['uuid']
467
+
468
+
469
+ # process the query parameters
470
+ _query_params = []
471
+ if _params.get('entity') is not None: # noqa: E501
472
+ _query_params.append(('entity', _params['entity']))
473
+
474
+ # process the header parameters
475
+ _header_params = dict(_params.get('_headers', {}))
476
+ # process the form parameters
477
+ _form_params = []
478
+ _files = {}
479
+ # process the body parameter
480
+ _body_params = None
481
+ # set the HTTP header `Accept`
482
+ _header_params['Accept'] = self.api_client.select_header_accept(
483
+ ['application/json']) # noqa: E501
484
+
485
+ # authentication setting
486
+ _auth_settings = ['ApiKey'] # noqa: E501
487
+
488
+ _response_types_map = {
489
+ '200': "V1Policy",
490
+ '204': "object",
491
+ '403': "object",
492
+ '404': "object",
493
+ }
494
+
495
+ return self.api_client.call_api(
496
+ '/api/v1/orgs/{owner}/policies/{uuid}', 'GET',
497
+ _path_params,
498
+ _query_params,
499
+ _header_params,
500
+ body=_body_params,
501
+ post_params=_form_params,
502
+ files=_files,
503
+ response_types_map=_response_types_map,
504
+ auth_settings=_auth_settings,
505
+ async_req=_params.get('async_req'),
506
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
507
+ _preload_content=_params.get('_preload_content', True),
508
+ _request_timeout=_params.get('_request_timeout'),
509
+ collection_formats=_collection_formats,
510
+ _request_auth=_params.get('_request_auth'))
511
+
512
+ @validate_arguments
513
+ def list_policies(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], offset : Annotated[Optional[StrictInt], Field(description="Pagination offset.")] = None, limit : Annotated[Optional[StrictInt], Field(description="Limit size.")] = None, sort : Annotated[Optional[StrictStr], Field(description="Sort to order the search.")] = None, query : Annotated[Optional[StrictStr], Field(description="Query filter the search.")] = None, bookmarks : Annotated[Optional[StrictBool], Field(description="Filter by bookmarks.")] = None, mode : Annotated[Optional[StrictStr], Field(description="Mode of the search.")] = None, no_page : Annotated[Optional[StrictBool], Field(description="No pagination.")] = None, **kwargs) -> V1ListPoliciesResponse: # noqa: E501
514
+ """List Policies # noqa: E501
515
+
516
+ This method makes a synchronous HTTP request by default. To make an
517
+ asynchronous HTTP request, please pass async_req=True
518
+
519
+ >>> thread = api.list_policies(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
520
+ >>> result = thread.get()
521
+
522
+ :param owner: Owner of the namespace (required)
523
+ :type owner: str
524
+ :param offset: Pagination offset.
525
+ :type offset: int
526
+ :param limit: Limit size.
527
+ :type limit: int
528
+ :param sort: Sort to order the search.
529
+ :type sort: str
530
+ :param query: Query filter the search.
531
+ :type query: str
532
+ :param bookmarks: Filter by bookmarks.
533
+ :type bookmarks: bool
534
+ :param mode: Mode of the search.
535
+ :type mode: str
536
+ :param no_page: No pagination.
537
+ :type no_page: bool
538
+ :param async_req: Whether to execute the request asynchronously.
539
+ :type async_req: bool, optional
540
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
541
+ be returned without reading/decoding response
542
+ data. Default is True.
543
+ :type _preload_content: bool, optional
544
+ :param _request_timeout: timeout setting for this request. If one
545
+ number provided, it will be total request
546
+ timeout. It can also be a pair (tuple) of
547
+ (connection, read) timeouts.
548
+ :return: Returns the result object.
549
+ If the method is called asynchronously,
550
+ returns the request thread.
551
+ :rtype: V1ListPoliciesResponse
552
+ """
553
+ kwargs['_return_http_data_only'] = True
554
+ return self.list_policies_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, **kwargs) # noqa: E501
555
+
556
+ @validate_arguments
557
+ def list_policies_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], offset : Annotated[Optional[StrictInt], Field(description="Pagination offset.")] = None, limit : Annotated[Optional[StrictInt], Field(description="Limit size.")] = None, sort : Annotated[Optional[StrictStr], Field(description="Sort to order the search.")] = None, query : Annotated[Optional[StrictStr], Field(description="Query filter the search.")] = None, bookmarks : Annotated[Optional[StrictBool], Field(description="Filter by bookmarks.")] = None, mode : Annotated[Optional[StrictStr], Field(description="Mode of the search.")] = None, no_page : Annotated[Optional[StrictBool], Field(description="No pagination.")] = None, **kwargs): # noqa: E501
558
+ """List Policies # noqa: E501
559
+
560
+ This method makes a synchronous HTTP request by default. To make an
561
+ asynchronous HTTP request, please pass async_req=True
562
+
563
+ >>> thread = api.list_policies_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
564
+ >>> result = thread.get()
565
+
566
+ :param owner: Owner of the namespace (required)
567
+ :type owner: str
568
+ :param offset: Pagination offset.
569
+ :type offset: int
570
+ :param limit: Limit size.
571
+ :type limit: int
572
+ :param sort: Sort to order the search.
573
+ :type sort: str
574
+ :param query: Query filter the search.
575
+ :type query: str
576
+ :param bookmarks: Filter by bookmarks.
577
+ :type bookmarks: bool
578
+ :param mode: Mode of the search.
579
+ :type mode: str
580
+ :param no_page: No pagination.
581
+ :type no_page: bool
582
+ :param async_req: Whether to execute the request asynchronously.
583
+ :type async_req: bool, optional
584
+ :param _return_http_data_only: response data without head status code
585
+ and headers
586
+ :type _return_http_data_only: bool, optional
587
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
588
+ be returned without reading/decoding response
589
+ data. Default is True.
590
+ :type _preload_content: bool, optional
591
+ :param _request_timeout: timeout setting for this request. If one
592
+ number provided, it will be total request
593
+ timeout. It can also be a pair (tuple) of
594
+ (connection, read) timeouts.
595
+ :param _request_auth: set to override the auth_settings for an a single
596
+ request; this effectively ignores the authentication
597
+ in the spec for a single request.
598
+ :type _request_auth: dict, optional
599
+ :type _content_type: string, optional: force content-type for the request
600
+ :return: Returns the result object.
601
+ If the method is called asynchronously,
602
+ returns the request thread.
603
+ :rtype: tuple(V1ListPoliciesResponse, status_code(int), headers(HTTPHeaderDict))
604
+ """
605
+
606
+ _params = locals()
607
+
608
+ _all_params = [
609
+ 'owner',
610
+ 'offset',
611
+ 'limit',
612
+ 'sort',
613
+ 'query',
614
+ 'bookmarks',
615
+ 'mode',
616
+ 'no_page'
617
+ ]
618
+ _all_params.extend(
619
+ [
620
+ 'async_req',
621
+ '_return_http_data_only',
622
+ '_preload_content',
623
+ '_request_timeout',
624
+ '_request_auth',
625
+ '_content_type',
626
+ '_headers'
627
+ ]
628
+ )
629
+
630
+ # validate the arguments
631
+ for _key, _val in _params['kwargs'].items():
632
+ if _key not in _all_params:
633
+ raise ApiTypeError(
634
+ "Got an unexpected keyword argument '%s'"
635
+ " to method list_policies" % _key
636
+ )
637
+ _params[_key] = _val
638
+ del _params['kwargs']
639
+
640
+ _collection_formats = {}
641
+
642
+ # process the path parameters
643
+ _path_params = {}
644
+ if _params['owner']:
645
+ _path_params['owner'] = _params['owner']
646
+
647
+
648
+ # process the query parameters
649
+ _query_params = []
650
+ if _params.get('offset') is not None: # noqa: E501
651
+ _query_params.append(('offset', _params['offset']))
652
+
653
+ if _params.get('limit') is not None: # noqa: E501
654
+ _query_params.append(('limit', _params['limit']))
655
+
656
+ if _params.get('sort') is not None: # noqa: E501
657
+ _query_params.append(('sort', _params['sort']))
658
+
659
+ if _params.get('query') is not None: # noqa: E501
660
+ _query_params.append(('query', _params['query']))
661
+
662
+ if _params.get('bookmarks') is not None: # noqa: E501
663
+ _query_params.append(('bookmarks', _params['bookmarks']))
664
+
665
+ if _params.get('mode') is not None: # noqa: E501
666
+ _query_params.append(('mode', _params['mode']))
667
+
668
+ if _params.get('no_page') is not None: # noqa: E501
669
+ _query_params.append(('no_page', _params['no_page']))
670
+
671
+ # process the header parameters
672
+ _header_params = dict(_params.get('_headers', {}))
673
+ # process the form parameters
674
+ _form_params = []
675
+ _files = {}
676
+ # process the body parameter
677
+ _body_params = None
678
+ # set the HTTP header `Accept`
679
+ _header_params['Accept'] = self.api_client.select_header_accept(
680
+ ['application/json']) # noqa: E501
681
+
682
+ # authentication setting
683
+ _auth_settings = ['ApiKey'] # noqa: E501
684
+
685
+ _response_types_map = {
686
+ '200': "V1ListPoliciesResponse",
687
+ '204': "object",
688
+ '403': "object",
689
+ '404': "object",
690
+ }
691
+
692
+ return self.api_client.call_api(
693
+ '/api/v1/orgs/{owner}/policies', 'GET',
694
+ _path_params,
695
+ _query_params,
696
+ _header_params,
697
+ body=_body_params,
698
+ post_params=_form_params,
699
+ files=_files,
700
+ response_types_map=_response_types_map,
701
+ auth_settings=_auth_settings,
702
+ async_req=_params.get('async_req'),
703
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
704
+ _preload_content=_params.get('_preload_content', True),
705
+ _request_timeout=_params.get('_request_timeout'),
706
+ collection_formats=_collection_formats,
707
+ _request_auth=_params.get('_request_auth'))
708
+
709
+ @validate_arguments
710
+ def list_policy_names(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], offset : Annotated[Optional[StrictInt], Field(description="Pagination offset.")] = None, limit : Annotated[Optional[StrictInt], Field(description="Limit size.")] = None, sort : Annotated[Optional[StrictStr], Field(description="Sort to order the search.")] = None, query : Annotated[Optional[StrictStr], Field(description="Query filter the search.")] = None, bookmarks : Annotated[Optional[StrictBool], Field(description="Filter by bookmarks.")] = None, mode : Annotated[Optional[StrictStr], Field(description="Mode of the search.")] = None, no_page : Annotated[Optional[StrictBool], Field(description="No pagination.")] = None, **kwargs) -> V1ListPoliciesResponse: # noqa: E501
711
+ """List scheduling policies names # noqa: E501
712
+
713
+ This method makes a synchronous HTTP request by default. To make an
714
+ asynchronous HTTP request, please pass async_req=True
715
+
716
+ >>> thread = api.list_policy_names(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
717
+ >>> result = thread.get()
718
+
719
+ :param owner: Owner of the namespace (required)
720
+ :type owner: str
721
+ :param offset: Pagination offset.
722
+ :type offset: int
723
+ :param limit: Limit size.
724
+ :type limit: int
725
+ :param sort: Sort to order the search.
726
+ :type sort: str
727
+ :param query: Query filter the search.
728
+ :type query: str
729
+ :param bookmarks: Filter by bookmarks.
730
+ :type bookmarks: bool
731
+ :param mode: Mode of the search.
732
+ :type mode: str
733
+ :param no_page: No pagination.
734
+ :type no_page: bool
735
+ :param async_req: Whether to execute the request asynchronously.
736
+ :type async_req: bool, optional
737
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
738
+ be returned without reading/decoding response
739
+ data. Default is True.
740
+ :type _preload_content: bool, optional
741
+ :param _request_timeout: timeout setting for this request. If one
742
+ number provided, it will be total request
743
+ timeout. It can also be a pair (tuple) of
744
+ (connection, read) timeouts.
745
+ :return: Returns the result object.
746
+ If the method is called asynchronously,
747
+ returns the request thread.
748
+ :rtype: V1ListPoliciesResponse
749
+ """
750
+ kwargs['_return_http_data_only'] = True
751
+ return self.list_policy_names_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, **kwargs) # noqa: E501
752
+
753
+ @validate_arguments
754
+ def list_policy_names_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], offset : Annotated[Optional[StrictInt], Field(description="Pagination offset.")] = None, limit : Annotated[Optional[StrictInt], Field(description="Limit size.")] = None, sort : Annotated[Optional[StrictStr], Field(description="Sort to order the search.")] = None, query : Annotated[Optional[StrictStr], Field(description="Query filter the search.")] = None, bookmarks : Annotated[Optional[StrictBool], Field(description="Filter by bookmarks.")] = None, mode : Annotated[Optional[StrictStr], Field(description="Mode of the search.")] = None, no_page : Annotated[Optional[StrictBool], Field(description="No pagination.")] = None, **kwargs): # noqa: E501
755
+ """List scheduling policies names # noqa: E501
756
+
757
+ This method makes a synchronous HTTP request by default. To make an
758
+ asynchronous HTTP request, please pass async_req=True
759
+
760
+ >>> thread = api.list_policy_names_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
761
+ >>> result = thread.get()
762
+
763
+ :param owner: Owner of the namespace (required)
764
+ :type owner: str
765
+ :param offset: Pagination offset.
766
+ :type offset: int
767
+ :param limit: Limit size.
768
+ :type limit: int
769
+ :param sort: Sort to order the search.
770
+ :type sort: str
771
+ :param query: Query filter the search.
772
+ :type query: str
773
+ :param bookmarks: Filter by bookmarks.
774
+ :type bookmarks: bool
775
+ :param mode: Mode of the search.
776
+ :type mode: str
777
+ :param no_page: No pagination.
778
+ :type no_page: bool
779
+ :param async_req: Whether to execute the request asynchronously.
780
+ :type async_req: bool, optional
781
+ :param _return_http_data_only: response data without head status code
782
+ and headers
783
+ :type _return_http_data_only: bool, optional
784
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
785
+ be returned without reading/decoding response
786
+ data. Default is True.
787
+ :type _preload_content: bool, optional
788
+ :param _request_timeout: timeout setting for this request. If one
789
+ number provided, it will be total request
790
+ timeout. It can also be a pair (tuple) of
791
+ (connection, read) timeouts.
792
+ :param _request_auth: set to override the auth_settings for an a single
793
+ request; this effectively ignores the authentication
794
+ in the spec for a single request.
795
+ :type _request_auth: dict, optional
796
+ :type _content_type: string, optional: force content-type for the request
797
+ :return: Returns the result object.
798
+ If the method is called asynchronously,
799
+ returns the request thread.
800
+ :rtype: tuple(V1ListPoliciesResponse, status_code(int), headers(HTTPHeaderDict))
801
+ """
802
+
803
+ _params = locals()
804
+
805
+ _all_params = [
806
+ 'owner',
807
+ 'offset',
808
+ 'limit',
809
+ 'sort',
810
+ 'query',
811
+ 'bookmarks',
812
+ 'mode',
813
+ 'no_page'
814
+ ]
815
+ _all_params.extend(
816
+ [
817
+ 'async_req',
818
+ '_return_http_data_only',
819
+ '_preload_content',
820
+ '_request_timeout',
821
+ '_request_auth',
822
+ '_content_type',
823
+ '_headers'
824
+ ]
825
+ )
826
+
827
+ # validate the arguments
828
+ for _key, _val in _params['kwargs'].items():
829
+ if _key not in _all_params:
830
+ raise ApiTypeError(
831
+ "Got an unexpected keyword argument '%s'"
832
+ " to method list_policy_names" % _key
833
+ )
834
+ _params[_key] = _val
835
+ del _params['kwargs']
836
+
837
+ _collection_formats = {}
838
+
839
+ # process the path parameters
840
+ _path_params = {}
841
+ if _params['owner']:
842
+ _path_params['owner'] = _params['owner']
843
+
844
+
845
+ # process the query parameters
846
+ _query_params = []
847
+ if _params.get('offset') is not None: # noqa: E501
848
+ _query_params.append(('offset', _params['offset']))
849
+
850
+ if _params.get('limit') is not None: # noqa: E501
851
+ _query_params.append(('limit', _params['limit']))
852
+
853
+ if _params.get('sort') is not None: # noqa: E501
854
+ _query_params.append(('sort', _params['sort']))
855
+
856
+ if _params.get('query') is not None: # noqa: E501
857
+ _query_params.append(('query', _params['query']))
858
+
859
+ if _params.get('bookmarks') is not None: # noqa: E501
860
+ _query_params.append(('bookmarks', _params['bookmarks']))
861
+
862
+ if _params.get('mode') is not None: # noqa: E501
863
+ _query_params.append(('mode', _params['mode']))
864
+
865
+ if _params.get('no_page') is not None: # noqa: E501
866
+ _query_params.append(('no_page', _params['no_page']))
867
+
868
+ # process the header parameters
869
+ _header_params = dict(_params.get('_headers', {}))
870
+ # process the form parameters
871
+ _form_params = []
872
+ _files = {}
873
+ # process the body parameter
874
+ _body_params = None
875
+ # set the HTTP header `Accept`
876
+ _header_params['Accept'] = self.api_client.select_header_accept(
877
+ ['application/json']) # noqa: E501
878
+
879
+ # authentication setting
880
+ _auth_settings = ['ApiKey'] # noqa: E501
881
+
882
+ _response_types_map = {
883
+ '200': "V1ListPoliciesResponse",
884
+ '204': "object",
885
+ '403': "object",
886
+ '404': "object",
887
+ }
888
+
889
+ return self.api_client.call_api(
890
+ '/api/v1/orgs/{owner}/policies/names', 'GET',
891
+ _path_params,
892
+ _query_params,
893
+ _header_params,
894
+ body=_body_params,
895
+ post_params=_form_params,
896
+ files=_files,
897
+ response_types_map=_response_types_map,
898
+ auth_settings=_auth_settings,
899
+ async_req=_params.get('async_req'),
900
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
901
+ _preload_content=_params.get('_preload_content', True),
902
+ _request_timeout=_params.get('_request_timeout'),
903
+ collection_formats=_collection_formats,
904
+ _request_auth=_params.get('_request_auth'))
905
+
906
+ @validate_arguments
907
+ def patch_policy(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], policy_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Policy, Field(..., description="Policy body")], **kwargs) -> V1Policy: # noqa: E501
908
+ """Patch Policy # noqa: E501
909
+
910
+ This method makes a synchronous HTTP request by default. To make an
911
+ asynchronous HTTP request, please pass async_req=True
912
+
913
+ >>> thread = api.patch_policy(owner, policy_uuid, body, async_req=True)
914
+ >>> result = thread.get()
915
+
916
+ :param owner: Owner of the namespace (required)
917
+ :type owner: str
918
+ :param policy_uuid: UUID (required)
919
+ :type policy_uuid: str
920
+ :param body: Policy body (required)
921
+ :type body: V1Policy
922
+ :param async_req: Whether to execute the request asynchronously.
923
+ :type async_req: bool, optional
924
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
925
+ be returned without reading/decoding response
926
+ data. Default is True.
927
+ :type _preload_content: bool, optional
928
+ :param _request_timeout: timeout setting for this request. If one
929
+ number provided, it will be total request
930
+ timeout. It can also be a pair (tuple) of
931
+ (connection, read) timeouts.
932
+ :return: Returns the result object.
933
+ If the method is called asynchronously,
934
+ returns the request thread.
935
+ :rtype: V1Policy
936
+ """
937
+ kwargs['_return_http_data_only'] = True
938
+ return self.patch_policy_with_http_info(owner, policy_uuid, body, **kwargs) # noqa: E501
939
+
940
+ @validate_arguments
941
+ def patch_policy_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], policy_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Policy, Field(..., description="Policy body")], **kwargs): # noqa: E501
942
+ """Patch Policy # noqa: E501
943
+
944
+ This method makes a synchronous HTTP request by default. To make an
945
+ asynchronous HTTP request, please pass async_req=True
946
+
947
+ >>> thread = api.patch_policy_with_http_info(owner, policy_uuid, body, async_req=True)
948
+ >>> result = thread.get()
949
+
950
+ :param owner: Owner of the namespace (required)
951
+ :type owner: str
952
+ :param policy_uuid: UUID (required)
953
+ :type policy_uuid: str
954
+ :param body: Policy body (required)
955
+ :type body: V1Policy
956
+ :param async_req: Whether to execute the request asynchronously.
957
+ :type async_req: bool, optional
958
+ :param _return_http_data_only: response data without head status code
959
+ and headers
960
+ :type _return_http_data_only: bool, optional
961
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
962
+ be returned without reading/decoding response
963
+ data. Default is True.
964
+ :type _preload_content: bool, optional
965
+ :param _request_timeout: timeout setting for this request. If one
966
+ number provided, it will be total request
967
+ timeout. It can also be a pair (tuple) of
968
+ (connection, read) timeouts.
969
+ :param _request_auth: set to override the auth_settings for an a single
970
+ request; this effectively ignores the authentication
971
+ in the spec for a single request.
972
+ :type _request_auth: dict, optional
973
+ :type _content_type: string, optional: force content-type for the request
974
+ :return: Returns the result object.
975
+ If the method is called asynchronously,
976
+ returns the request thread.
977
+ :rtype: tuple(V1Policy, status_code(int), headers(HTTPHeaderDict))
978
+ """
979
+
980
+ _params = locals()
981
+
982
+ _all_params = [
983
+ 'owner',
984
+ 'policy_uuid',
985
+ 'body'
986
+ ]
987
+ _all_params.extend(
988
+ [
989
+ 'async_req',
990
+ '_return_http_data_only',
991
+ '_preload_content',
992
+ '_request_timeout',
993
+ '_request_auth',
994
+ '_content_type',
995
+ '_headers'
996
+ ]
997
+ )
998
+
999
+ # validate the arguments
1000
+ for _key, _val in _params['kwargs'].items():
1001
+ if _key not in _all_params:
1002
+ raise ApiTypeError(
1003
+ "Got an unexpected keyword argument '%s'"
1004
+ " to method patch_policy" % _key
1005
+ )
1006
+ _params[_key] = _val
1007
+ del _params['kwargs']
1008
+
1009
+ _collection_formats = {}
1010
+
1011
+ # process the path parameters
1012
+ _path_params = {}
1013
+ if _params['owner']:
1014
+ _path_params['owner'] = _params['owner']
1015
+
1016
+ if _params['policy_uuid']:
1017
+ _path_params['policy.uuid'] = _params['policy_uuid']
1018
+
1019
+
1020
+ # process the query parameters
1021
+ _query_params = []
1022
+ # process the header parameters
1023
+ _header_params = dict(_params.get('_headers', {}))
1024
+ # process the form parameters
1025
+ _form_params = []
1026
+ _files = {}
1027
+ # process the body parameter
1028
+ _body_params = None
1029
+ if _params['body']:
1030
+ _body_params = _params['body']
1031
+
1032
+ # set the HTTP header `Accept`
1033
+ _header_params['Accept'] = self.api_client.select_header_accept(
1034
+ ['application/json']) # noqa: E501
1035
+
1036
+ # set the HTTP header `Content-Type`
1037
+ _content_types_list = _params.get('_content_type',
1038
+ self.api_client.select_header_content_type(
1039
+ ['application/json']))
1040
+ if _content_types_list:
1041
+ _header_params['Content-Type'] = _content_types_list
1042
+
1043
+ # authentication setting
1044
+ _auth_settings = ['ApiKey'] # noqa: E501
1045
+
1046
+ _response_types_map = {
1047
+ '200': "V1Policy",
1048
+ '204': "object",
1049
+ '403': "object",
1050
+ '404': "object",
1051
+ }
1052
+
1053
+ return self.api_client.call_api(
1054
+ '/api/v1/orgs/{owner}/policies/{policy.uuid}', 'PATCH',
1055
+ _path_params,
1056
+ _query_params,
1057
+ _header_params,
1058
+ body=_body_params,
1059
+ post_params=_form_params,
1060
+ files=_files,
1061
+ response_types_map=_response_types_map,
1062
+ auth_settings=_auth_settings,
1063
+ async_req=_params.get('async_req'),
1064
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1065
+ _preload_content=_params.get('_preload_content', True),
1066
+ _request_timeout=_params.get('_request_timeout'),
1067
+ collection_formats=_collection_formats,
1068
+ _request_auth=_params.get('_request_auth'))
1069
+
1070
+ @validate_arguments
1071
+ def update_policy(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], policy_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Policy, Field(..., description="Policy body")], **kwargs) -> V1Policy: # noqa: E501
1072
+ """Update Policy # noqa: E501
1073
+
1074
+ This method makes a synchronous HTTP request by default. To make an
1075
+ asynchronous HTTP request, please pass async_req=True
1076
+
1077
+ >>> thread = api.update_policy(owner, policy_uuid, body, async_req=True)
1078
+ >>> result = thread.get()
1079
+
1080
+ :param owner: Owner of the namespace (required)
1081
+ :type owner: str
1082
+ :param policy_uuid: UUID (required)
1083
+ :type policy_uuid: str
1084
+ :param body: Policy body (required)
1085
+ :type body: V1Policy
1086
+ :param async_req: Whether to execute the request asynchronously.
1087
+ :type async_req: bool, optional
1088
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1089
+ be returned without reading/decoding response
1090
+ data. Default is True.
1091
+ :type _preload_content: bool, optional
1092
+ :param _request_timeout: timeout setting for this request. If one
1093
+ number provided, it will be total request
1094
+ timeout. It can also be a pair (tuple) of
1095
+ (connection, read) timeouts.
1096
+ :return: Returns the result object.
1097
+ If the method is called asynchronously,
1098
+ returns the request thread.
1099
+ :rtype: V1Policy
1100
+ """
1101
+ kwargs['_return_http_data_only'] = True
1102
+ return self.update_policy_with_http_info(owner, policy_uuid, body, **kwargs) # noqa: E501
1103
+
1104
+ @validate_arguments
1105
+ def update_policy_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], policy_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Policy, Field(..., description="Policy body")], **kwargs): # noqa: E501
1106
+ """Update Policy # noqa: E501
1107
+
1108
+ This method makes a synchronous HTTP request by default. To make an
1109
+ asynchronous HTTP request, please pass async_req=True
1110
+
1111
+ >>> thread = api.update_policy_with_http_info(owner, policy_uuid, body, async_req=True)
1112
+ >>> result = thread.get()
1113
+
1114
+ :param owner: Owner of the namespace (required)
1115
+ :type owner: str
1116
+ :param policy_uuid: UUID (required)
1117
+ :type policy_uuid: str
1118
+ :param body: Policy body (required)
1119
+ :type body: V1Policy
1120
+ :param async_req: Whether to execute the request asynchronously.
1121
+ :type async_req: bool, optional
1122
+ :param _return_http_data_only: response data without head status code
1123
+ and headers
1124
+ :type _return_http_data_only: bool, optional
1125
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
1126
+ be returned without reading/decoding response
1127
+ data. Default is True.
1128
+ :type _preload_content: bool, optional
1129
+ :param _request_timeout: timeout setting for this request. If one
1130
+ number provided, it will be total request
1131
+ timeout. It can also be a pair (tuple) of
1132
+ (connection, read) timeouts.
1133
+ :param _request_auth: set to override the auth_settings for an a single
1134
+ request; this effectively ignores the authentication
1135
+ in the spec for a single request.
1136
+ :type _request_auth: dict, optional
1137
+ :type _content_type: string, optional: force content-type for the request
1138
+ :return: Returns the result object.
1139
+ If the method is called asynchronously,
1140
+ returns the request thread.
1141
+ :rtype: tuple(V1Policy, status_code(int), headers(HTTPHeaderDict))
1142
+ """
1143
+
1144
+ _params = locals()
1145
+
1146
+ _all_params = [
1147
+ 'owner',
1148
+ 'policy_uuid',
1149
+ 'body'
1150
+ ]
1151
+ _all_params.extend(
1152
+ [
1153
+ 'async_req',
1154
+ '_return_http_data_only',
1155
+ '_preload_content',
1156
+ '_request_timeout',
1157
+ '_request_auth',
1158
+ '_content_type',
1159
+ '_headers'
1160
+ ]
1161
+ )
1162
+
1163
+ # validate the arguments
1164
+ for _key, _val in _params['kwargs'].items():
1165
+ if _key not in _all_params:
1166
+ raise ApiTypeError(
1167
+ "Got an unexpected keyword argument '%s'"
1168
+ " to method update_policy" % _key
1169
+ )
1170
+ _params[_key] = _val
1171
+ del _params['kwargs']
1172
+
1173
+ _collection_formats = {}
1174
+
1175
+ # process the path parameters
1176
+ _path_params = {}
1177
+ if _params['owner']:
1178
+ _path_params['owner'] = _params['owner']
1179
+
1180
+ if _params['policy_uuid']:
1181
+ _path_params['policy.uuid'] = _params['policy_uuid']
1182
+
1183
+
1184
+ # process the query parameters
1185
+ _query_params = []
1186
+ # process the header parameters
1187
+ _header_params = dict(_params.get('_headers', {}))
1188
+ # process the form parameters
1189
+ _form_params = []
1190
+ _files = {}
1191
+ # process the body parameter
1192
+ _body_params = None
1193
+ if _params['body']:
1194
+ _body_params = _params['body']
1195
+
1196
+ # set the HTTP header `Accept`
1197
+ _header_params['Accept'] = self.api_client.select_header_accept(
1198
+ ['application/json']) # noqa: E501
1199
+
1200
+ # set the HTTP header `Content-Type`
1201
+ _content_types_list = _params.get('_content_type',
1202
+ self.api_client.select_header_content_type(
1203
+ ['application/json']))
1204
+ if _content_types_list:
1205
+ _header_params['Content-Type'] = _content_types_list
1206
+
1207
+ # authentication setting
1208
+ _auth_settings = ['ApiKey'] # noqa: E501
1209
+
1210
+ _response_types_map = {
1211
+ '200': "V1Policy",
1212
+ '204': "object",
1213
+ '403': "object",
1214
+ '404': "object",
1215
+ }
1216
+
1217
+ return self.api_client.call_api(
1218
+ '/api/v1/orgs/{owner}/policies/{policy.uuid}', 'PUT',
1219
+ _path_params,
1220
+ _query_params,
1221
+ _header_params,
1222
+ body=_body_params,
1223
+ post_params=_form_params,
1224
+ files=_files,
1225
+ response_types_map=_response_types_map,
1226
+ auth_settings=_auth_settings,
1227
+ async_req=_params.get('async_req'),
1228
+ _return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
1229
+ _preload_content=_params.get('_preload_content', True),
1230
+ _request_timeout=_params.get('_request_timeout'),
1231
+ collection_formats=_collection_formats,
1232
+ _request_auth=_params.get('_request_auth'))