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
@@ -1,38 +1,29 @@
1
- #!/usr/bin/python
2
- #
3
- # Copyright 2018-2022 Polyaxon, Inc.
4
- #
5
- # Licensed under the Apache License, Version 2.0 (the "License");
6
- # you may not use this file except in compliance with the License.
7
- # You may obtain a copy of the License at
8
- #
9
- # http://www.apache.org/licenses/LICENSE-2.0
10
- #
11
- # Unless required by applicable law or agreed to in writing, software
12
- # distributed under the License is distributed on an "AS IS" BASIS,
13
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
- # See the License for the specific language governing permissions and
15
- # limitations under the License.
16
-
17
1
  # coding: utf-8
18
2
 
19
3
  """
20
4
  Polyaxon SDKs and REST API specification.
21
5
 
22
- Polyaxon SDKs and REST API specification. # noqa: E501
6
+ # noqa: E501
23
7
 
24
- The version of the OpenAPI document: 1.18.0
8
+ The version of the OpenAPI document: 2.1.6
25
9
  Contact: contact@polyaxon.com
26
- Generated by: https://openapi-generator.tech
27
- """
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
28
11
 
12
+ Do not edit the class manually.
13
+ """
29
14
 
30
- from __future__ import absolute_import
31
15
 
32
16
  import re # noqa: F401
33
17
 
34
- # python 2 and python 3 compatibility library
35
- import six
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_presets_response import V1ListPresetsResponse
26
+ from polyaxon_sdk.models.v1_preset import V1Preset
36
27
 
37
28
  from polyaxon_sdk.api_client import ApiClient
38
29
  from polyaxon_sdk.exceptions import ( # noqa: F401
@@ -50,10 +41,11 @@ class PresetsV1Api(object):
50
41
 
51
42
  def __init__(self, api_client=None):
52
43
  if api_client is None:
53
- api_client = ApiClient()
44
+ api_client = ApiClient.get_default()
54
45
  self.api_client = api_client
55
46
 
56
- def create_preset(self, owner, body, **kwargs): # noqa: E501
47
+ @validate_arguments
48
+ def create_preset(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], body : Annotated[V1Preset, Field(..., description="Preset body")], **kwargs) -> V1Preset: # noqa: E501
57
49
  """Create scheduling presets # noqa: E501
58
50
 
59
51
  This method makes a synchronous HTTP request by default. To make an
@@ -84,7 +76,8 @@ class PresetsV1Api(object):
84
76
  kwargs['_return_http_data_only'] = True
85
77
  return self.create_preset_with_http_info(owner, body, **kwargs) # noqa: E501
86
78
 
87
- def create_preset_with_http_info(self, owner, body, **kwargs): # noqa: E501
79
+ @validate_arguments
80
+ def create_preset_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], body : Annotated[V1Preset, Field(..., description="Preset body")], **kwargs): # noqa: E501
88
81
  """Create scheduling presets # noqa: E501
89
82
 
90
83
  This method makes a synchronous HTTP request by default. To make an
@@ -114,103 +107,107 @@ class PresetsV1Api(object):
114
107
  request; this effectively ignores the authentication
115
108
  in the spec for a single request.
116
109
  :type _request_auth: dict, optional
110
+ :type _content_type: string, optional: force content-type for the request
117
111
  :return: Returns the result object.
118
112
  If the method is called asynchronously,
119
113
  returns the request thread.
120
114
  :rtype: tuple(V1Preset, status_code(int), headers(HTTPHeaderDict))
121
115
  """
122
116
 
123
- local_var_params = locals()
117
+ _params = locals()
124
118
 
125
- all_params = [
119
+ _all_params = [
126
120
  'owner',
127
121
  'body'
128
122
  ]
129
- all_params.extend(
123
+ _all_params.extend(
130
124
  [
131
125
  'async_req',
132
126
  '_return_http_data_only',
133
127
  '_preload_content',
134
128
  '_request_timeout',
135
- '_request_auth'
129
+ '_request_auth',
130
+ '_content_type',
131
+ '_headers'
136
132
  ]
137
133
  )
138
134
 
139
- for key, val in six.iteritems(local_var_params['kwargs']):
140
- if key not in all_params:
135
+ # validate the arguments
136
+ for _key, _val in _params['kwargs'].items():
137
+ if _key not in _all_params:
141
138
  raise ApiTypeError(
142
139
  "Got an unexpected keyword argument '%s'"
143
- " to method create_preset" % key
140
+ " to method create_preset" % _key
144
141
  )
145
- local_var_params[key] = val
146
- del local_var_params['kwargs']
147
- # verify the required parameter 'owner' is set
148
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
149
- local_var_params['owner'] is None): # noqa: E501
150
- raise ApiValueError("Missing the required parameter `owner` when calling `create_preset`") # noqa: E501
151
- # verify the required parameter 'body' is set
152
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
153
- local_var_params['body'] is None): # noqa: E501
154
- raise ApiValueError("Missing the required parameter `body` when calling `create_preset`") # noqa: E501
155
-
156
- collection_formats = {}
157
-
158
- path_params = {}
159
- if 'owner' in local_var_params:
160
- path_params['owner'] = local_var_params['owner'] # noqa: E501
161
-
162
- query_params = []
163
-
164
- header_params = {}
165
-
166
- form_params = []
167
- local_var_files = {}
168
-
169
- body_params = None
170
- if 'body' in local_var_params:
171
- body_params = local_var_params['body']
172
- # HTTP header `Accept`
173
- header_params['Accept'] = self.api_client.select_header_accept(
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(
174
167
  ['application/json']) # noqa: E501
175
168
 
176
- # HTTP header `Content-Type`
177
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
178
- ['application/json']) # noqa: E501
179
-
180
- # Authentication setting
181
- auth_settings = ['ApiKey'] # noqa: E501
182
-
183
- response_types_map = {
184
- 200: "V1Preset",
185
- 204: "object",
186
- 403: "object",
187
- 404: "object",
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': "V1Preset",
181
+ '204': "object",
182
+ '403': "object",
183
+ '404': "object",
188
184
  }
189
185
 
190
186
  return self.api_client.call_api(
191
187
  '/api/v1/orgs/{owner}/presets', 'POST',
192
- path_params,
193
- query_params,
194
- header_params,
195
- body=body_params,
196
- post_params=form_params,
197
- files=local_var_files,
198
- response_types_map=response_types_map,
199
- auth_settings=auth_settings,
200
- async_req=local_var_params.get('async_req'),
201
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
202
- _preload_content=local_var_params.get('_preload_content', True),
203
- _request_timeout=local_var_params.get('_request_timeout'),
204
- collection_formats=collection_formats,
205
- _request_auth=local_var_params.get('_request_auth'))
206
-
207
- def delete_preset(self, owner, uuid, **kwargs): # noqa: E501
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_preset(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
208
205
  """Delete scheduling preset # noqa: E501
209
206
 
210
207
  This method makes a synchronous HTTP request by default. To make an
211
208
  asynchronous HTTP request, please pass async_req=True
212
209
 
213
- >>> thread = api.delete_preset(owner, uuid, async_req=True)
210
+ >>> thread = api.delete_preset(owner, uuid, entity, async_req=True)
214
211
  >>> result = thread.get()
215
212
 
216
213
  :param owner: Owner of the namespace (required)
@@ -235,15 +232,16 @@ class PresetsV1Api(object):
235
232
  :rtype: None
236
233
  """
237
234
  kwargs['_return_http_data_only'] = True
238
- return self.delete_preset_with_http_info(owner, uuid, **kwargs) # noqa: E501
235
+ return self.delete_preset_with_http_info(owner, uuid, entity, **kwargs) # noqa: E501
239
236
 
240
- def delete_preset_with_http_info(self, owner, uuid, **kwargs): # noqa: E501
237
+ @validate_arguments
238
+ def delete_preset_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
241
239
  """Delete scheduling preset # noqa: E501
242
240
 
243
241
  This method makes a synchronous HTTP request by default. To make an
244
242
  asynchronous HTTP request, please pass async_req=True
245
243
 
246
- >>> thread = api.delete_preset_with_http_info(owner, uuid, async_req=True)
244
+ >>> thread = api.delete_preset_with_http_info(owner, uuid, entity, async_req=True)
247
245
  >>> result = thread.get()
248
246
 
249
247
  :param owner: Owner of the namespace (required)
@@ -269,97 +267,99 @@ class PresetsV1Api(object):
269
267
  request; this effectively ignores the authentication
270
268
  in the spec for a single request.
271
269
  :type _request_auth: dict, optional
270
+ :type _content_type: string, optional: force content-type for the request
272
271
  :return: Returns the result object.
273
272
  If the method is called asynchronously,
274
273
  returns the request thread.
275
274
  :rtype: None
276
275
  """
277
276
 
278
- local_var_params = locals()
277
+ _params = locals()
279
278
 
280
- all_params = [
279
+ _all_params = [
281
280
  'owner',
282
281
  'uuid',
283
282
  'entity'
284
283
  ]
285
- all_params.extend(
284
+ _all_params.extend(
286
285
  [
287
286
  'async_req',
288
287
  '_return_http_data_only',
289
288
  '_preload_content',
290
289
  '_request_timeout',
291
- '_request_auth'
290
+ '_request_auth',
291
+ '_content_type',
292
+ '_headers'
292
293
  ]
293
294
  )
294
295
 
295
- for key, val in six.iteritems(local_var_params['kwargs']):
296
- if key not in all_params:
296
+ # validate the arguments
297
+ for _key, _val in _params['kwargs'].items():
298
+ if _key not in _all_params:
297
299
  raise ApiTypeError(
298
300
  "Got an unexpected keyword argument '%s'"
299
- " to method delete_preset" % key
301
+ " to method delete_preset" % _key
300
302
  )
301
- local_var_params[key] = val
302
- del local_var_params['kwargs']
303
- # verify the required parameter 'owner' is set
304
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
305
- local_var_params['owner'] is None): # noqa: E501
306
- raise ApiValueError("Missing the required parameter `owner` when calling `delete_preset`") # noqa: E501
307
- # verify the required parameter 'uuid' is set
308
- if self.api_client.client_side_validation and ('uuid' not in local_var_params or # noqa: E501
309
- local_var_params['uuid'] is None): # noqa: E501
310
- raise ApiValueError("Missing the required parameter `uuid` when calling `delete_preset`") # noqa: E501
311
-
312
- collection_formats = {}
313
-
314
- path_params = {}
315
- if 'owner' in local_var_params:
316
- path_params['owner'] = local_var_params['owner'] # noqa: E501
317
- if 'uuid' in local_var_params:
318
- path_params['uuid'] = local_var_params['uuid'] # noqa: E501
319
-
320
- query_params = []
321
- if 'entity' in local_var_params and local_var_params['entity'] is not None: # noqa: E501
322
- query_params.append(('entity', local_var_params['entity'])) # noqa: E501
323
-
324
- header_params = {}
325
-
326
- form_params = []
327
- local_var_files = {}
328
-
329
- body_params = None
330
- # HTTP header `Accept`
331
- header_params['Accept'] = self.api_client.select_header_accept(
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(
332
331
  ['application/json']) # noqa: E501
333
332
 
334
- # Authentication setting
335
- auth_settings = ['ApiKey'] # noqa: E501
333
+ # authentication setting
334
+ _auth_settings = ['ApiKey'] # noqa: E501
336
335
 
337
- response_types_map = {}
336
+ _response_types_map = {}
338
337
 
339
338
  return self.api_client.call_api(
340
339
  '/api/v1/orgs/{owner}/presets/{uuid}', 'DELETE',
341
- path_params,
342
- query_params,
343
- header_params,
344
- body=body_params,
345
- post_params=form_params,
346
- files=local_var_files,
347
- response_types_map=response_types_map,
348
- auth_settings=auth_settings,
349
- async_req=local_var_params.get('async_req'),
350
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
351
- _preload_content=local_var_params.get('_preload_content', True),
352
- _request_timeout=local_var_params.get('_request_timeout'),
353
- collection_formats=collection_formats,
354
- _request_auth=local_var_params.get('_request_auth'))
355
-
356
- def get_preset(self, owner, uuid, **kwargs): # noqa: E501
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_preset(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) -> V1Preset: # noqa: E501
357
357
  """Get scheduling preset # noqa: E501
358
358
 
359
359
  This method makes a synchronous HTTP request by default. To make an
360
360
  asynchronous HTTP request, please pass async_req=True
361
361
 
362
- >>> thread = api.get_preset(owner, uuid, async_req=True)
362
+ >>> thread = api.get_preset(owner, uuid, entity, async_req=True)
363
363
  >>> result = thread.get()
364
364
 
365
365
  :param owner: Owner of the namespace (required)
@@ -384,15 +384,16 @@ class PresetsV1Api(object):
384
384
  :rtype: V1Preset
385
385
  """
386
386
  kwargs['_return_http_data_only'] = True
387
- return self.get_preset_with_http_info(owner, uuid, **kwargs) # noqa: E501
387
+ return self.get_preset_with_http_info(owner, uuid, entity, **kwargs) # noqa: E501
388
388
 
389
- def get_preset_with_http_info(self, owner, uuid, **kwargs): # noqa: E501
389
+ @validate_arguments
390
+ def get_preset_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
390
391
  """Get scheduling preset # noqa: E501
391
392
 
392
393
  This method makes a synchronous HTTP request by default. To make an
393
394
  asynchronous HTTP request, please pass async_req=True
394
395
 
395
- >>> thread = api.get_preset_with_http_info(owner, uuid, async_req=True)
396
+ >>> thread = api.get_preset_with_http_info(owner, uuid, entity, async_req=True)
396
397
  >>> result = thread.get()
397
398
 
398
399
  :param owner: Owner of the namespace (required)
@@ -418,102 +419,104 @@ class PresetsV1Api(object):
418
419
  request; this effectively ignores the authentication
419
420
  in the spec for a single request.
420
421
  :type _request_auth: dict, optional
422
+ :type _content_type: string, optional: force content-type for the request
421
423
  :return: Returns the result object.
422
424
  If the method is called asynchronously,
423
425
  returns the request thread.
424
426
  :rtype: tuple(V1Preset, status_code(int), headers(HTTPHeaderDict))
425
427
  """
426
428
 
427
- local_var_params = locals()
429
+ _params = locals()
428
430
 
429
- all_params = [
431
+ _all_params = [
430
432
  'owner',
431
433
  'uuid',
432
434
  'entity'
433
435
  ]
434
- all_params.extend(
436
+ _all_params.extend(
435
437
  [
436
438
  'async_req',
437
439
  '_return_http_data_only',
438
440
  '_preload_content',
439
441
  '_request_timeout',
440
- '_request_auth'
442
+ '_request_auth',
443
+ '_content_type',
444
+ '_headers'
441
445
  ]
442
446
  )
443
447
 
444
- for key, val in six.iteritems(local_var_params['kwargs']):
445
- if key not in all_params:
448
+ # validate the arguments
449
+ for _key, _val in _params['kwargs'].items():
450
+ if _key not in _all_params:
446
451
  raise ApiTypeError(
447
452
  "Got an unexpected keyword argument '%s'"
448
- " to method get_preset" % key
453
+ " to method get_preset" % _key
449
454
  )
450
- local_var_params[key] = val
451
- del local_var_params['kwargs']
452
- # verify the required parameter 'owner' is set
453
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
454
- local_var_params['owner'] is None): # noqa: E501
455
- raise ApiValueError("Missing the required parameter `owner` when calling `get_preset`") # noqa: E501
456
- # verify the required parameter 'uuid' is set
457
- if self.api_client.client_side_validation and ('uuid' not in local_var_params or # noqa: E501
458
- local_var_params['uuid'] is None): # noqa: E501
459
- raise ApiValueError("Missing the required parameter `uuid` when calling `get_preset`") # noqa: E501
460
-
461
- collection_formats = {}
462
-
463
- path_params = {}
464
- if 'owner' in local_var_params:
465
- path_params['owner'] = local_var_params['owner'] # noqa: E501
466
- if 'uuid' in local_var_params:
467
- path_params['uuid'] = local_var_params['uuid'] # noqa: E501
468
-
469
- query_params = []
470
- if 'entity' in local_var_params and local_var_params['entity'] is not None: # noqa: E501
471
- query_params.append(('entity', local_var_params['entity'])) # noqa: E501
472
-
473
- header_params = {}
474
-
475
- form_params = []
476
- local_var_files = {}
477
-
478
- body_params = None
479
- # HTTP header `Accept`
480
- header_params['Accept'] = self.api_client.select_header_accept(
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(
481
483
  ['application/json']) # noqa: E501
482
484
 
483
- # Authentication setting
484
- auth_settings = ['ApiKey'] # noqa: E501
485
+ # authentication setting
486
+ _auth_settings = ['ApiKey'] # noqa: E501
485
487
 
486
- response_types_map = {
487
- 200: "V1Preset",
488
- 204: "object",
489
- 403: "object",
490
- 404: "object",
488
+ _response_types_map = {
489
+ '200': "V1Preset",
490
+ '204': "object",
491
+ '403': "object",
492
+ '404': "object",
491
493
  }
492
494
 
493
495
  return self.api_client.call_api(
494
496
  '/api/v1/orgs/{owner}/presets/{uuid}', 'GET',
495
- path_params,
496
- query_params,
497
- header_params,
498
- body=body_params,
499
- post_params=form_params,
500
- files=local_var_files,
501
- response_types_map=response_types_map,
502
- auth_settings=auth_settings,
503
- async_req=local_var_params.get('async_req'),
504
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
505
- _preload_content=local_var_params.get('_preload_content', True),
506
- _request_timeout=local_var_params.get('_request_timeout'),
507
- collection_formats=collection_formats,
508
- _request_auth=local_var_params.get('_request_auth'))
509
-
510
- def list_preset_names(self, owner, **kwargs): # noqa: E501
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_preset_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) -> V1ListPresetsResponse: # noqa: E501
511
514
  """List scheduling presets names # noqa: E501
512
515
 
513
516
  This method makes a synchronous HTTP request by default. To make an
514
517
  asynchronous HTTP request, please pass async_req=True
515
518
 
516
- >>> thread = api.list_preset_names(owner, async_req=True)
519
+ >>> thread = api.list_preset_names(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
517
520
  >>> result = thread.get()
518
521
 
519
522
  :param owner: Owner of the namespace (required)
@@ -548,15 +551,16 @@ class PresetsV1Api(object):
548
551
  :rtype: V1ListPresetsResponse
549
552
  """
550
553
  kwargs['_return_http_data_only'] = True
551
- return self.list_preset_names_with_http_info(owner, **kwargs) # noqa: E501
554
+ return self.list_preset_names_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, **kwargs) # noqa: E501
552
555
 
553
- def list_preset_names_with_http_info(self, owner, **kwargs): # noqa: E501
556
+ @validate_arguments
557
+ def list_preset_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
554
558
  """List scheduling presets names # noqa: E501
555
559
 
556
560
  This method makes a synchronous HTTP request by default. To make an
557
561
  asynchronous HTTP request, please pass async_req=True
558
562
 
559
- >>> thread = api.list_preset_names_with_http_info(owner, async_req=True)
563
+ >>> thread = api.list_preset_names_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
560
564
  >>> result = thread.get()
561
565
 
562
566
  :param owner: Owner of the namespace (required)
@@ -592,15 +596,16 @@ class PresetsV1Api(object):
592
596
  request; this effectively ignores the authentication
593
597
  in the spec for a single request.
594
598
  :type _request_auth: dict, optional
599
+ :type _content_type: string, optional: force content-type for the request
595
600
  :return: Returns the result object.
596
601
  If the method is called asynchronously,
597
602
  returns the request thread.
598
603
  :rtype: tuple(V1ListPresetsResponse, status_code(int), headers(HTTPHeaderDict))
599
604
  """
600
605
 
601
- local_var_params = locals()
606
+ _params = locals()
602
607
 
603
- all_params = [
608
+ _all_params = [
604
609
  'owner',
605
610
  'offset',
606
611
  'limit',
@@ -610,95 +615,105 @@ class PresetsV1Api(object):
610
615
  'mode',
611
616
  'no_page'
612
617
  ]
613
- all_params.extend(
618
+ _all_params.extend(
614
619
  [
615
620
  'async_req',
616
621
  '_return_http_data_only',
617
622
  '_preload_content',
618
623
  '_request_timeout',
619
- '_request_auth'
624
+ '_request_auth',
625
+ '_content_type',
626
+ '_headers'
620
627
  ]
621
628
  )
622
629
 
623
- for key, val in six.iteritems(local_var_params['kwargs']):
624
- if key not in all_params:
630
+ # validate the arguments
631
+ for _key, _val in _params['kwargs'].items():
632
+ if _key not in _all_params:
625
633
  raise ApiTypeError(
626
634
  "Got an unexpected keyword argument '%s'"
627
- " to method list_preset_names" % key
635
+ " to method list_preset_names" % _key
628
636
  )
629
- local_var_params[key] = val
630
- del local_var_params['kwargs']
631
- # verify the required parameter 'owner' is set
632
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
633
- local_var_params['owner'] is None): # noqa: E501
634
- raise ApiValueError("Missing the required parameter `owner` when calling `list_preset_names`") # noqa: E501
635
-
636
- collection_formats = {}
637
-
638
- path_params = {}
639
- if 'owner' in local_var_params:
640
- path_params['owner'] = local_var_params['owner'] # noqa: E501
641
-
642
- query_params = []
643
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
644
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
645
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
646
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
647
- if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501
648
- query_params.append(('sort', local_var_params['sort'])) # noqa: E501
649
- if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501
650
- query_params.append(('query', local_var_params['query'])) # noqa: E501
651
- if 'bookmarks' in local_var_params and local_var_params['bookmarks'] is not None: # noqa: E501
652
- query_params.append(('bookmarks', local_var_params['bookmarks'])) # noqa: E501
653
- if 'mode' in local_var_params and local_var_params['mode'] is not None: # noqa: E501
654
- query_params.append(('mode', local_var_params['mode'])) # noqa: E501
655
- if 'no_page' in local_var_params and local_var_params['no_page'] is not None: # noqa: E501
656
- query_params.append(('no_page', local_var_params['no_page'])) # noqa: E501
657
-
658
- header_params = {}
659
-
660
- form_params = []
661
- local_var_files = {}
662
-
663
- body_params = None
664
- # HTTP header `Accept`
665
- header_params['Accept'] = self.api_client.select_header_accept(
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(
666
680
  ['application/json']) # noqa: E501
667
681
 
668
- # Authentication setting
669
- auth_settings = ['ApiKey'] # noqa: E501
682
+ # authentication setting
683
+ _auth_settings = ['ApiKey'] # noqa: E501
670
684
 
671
- response_types_map = {
672
- 200: "V1ListPresetsResponse",
673
- 204: "object",
674
- 403: "object",
675
- 404: "object",
685
+ _response_types_map = {
686
+ '200': "V1ListPresetsResponse",
687
+ '204': "object",
688
+ '403': "object",
689
+ '404': "object",
676
690
  }
677
691
 
678
692
  return self.api_client.call_api(
679
693
  '/api/v1/orgs/{owner}/presets/names', 'GET',
680
- path_params,
681
- query_params,
682
- header_params,
683
- body=body_params,
684
- post_params=form_params,
685
- files=local_var_files,
686
- response_types_map=response_types_map,
687
- auth_settings=auth_settings,
688
- async_req=local_var_params.get('async_req'),
689
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
690
- _preload_content=local_var_params.get('_preload_content', True),
691
- _request_timeout=local_var_params.get('_request_timeout'),
692
- collection_formats=collection_formats,
693
- _request_auth=local_var_params.get('_request_auth'))
694
-
695
- def list_presets(self, owner, **kwargs): # noqa: E501
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_presets(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) -> V1ListPresetsResponse: # noqa: E501
696
711
  """List scheduling presets # noqa: E501
697
712
 
698
713
  This method makes a synchronous HTTP request by default. To make an
699
714
  asynchronous HTTP request, please pass async_req=True
700
715
 
701
- >>> thread = api.list_presets(owner, async_req=True)
716
+ >>> thread = api.list_presets(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
702
717
  >>> result = thread.get()
703
718
 
704
719
  :param owner: Owner of the namespace (required)
@@ -733,15 +748,16 @@ class PresetsV1Api(object):
733
748
  :rtype: V1ListPresetsResponse
734
749
  """
735
750
  kwargs['_return_http_data_only'] = True
736
- return self.list_presets_with_http_info(owner, **kwargs) # noqa: E501
751
+ return self.list_presets_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, **kwargs) # noqa: E501
737
752
 
738
- def list_presets_with_http_info(self, owner, **kwargs): # noqa: E501
753
+ @validate_arguments
754
+ def list_presets_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
739
755
  """List scheduling presets # noqa: E501
740
756
 
741
757
  This method makes a synchronous HTTP request by default. To make an
742
758
  asynchronous HTTP request, please pass async_req=True
743
759
 
744
- >>> thread = api.list_presets_with_http_info(owner, async_req=True)
760
+ >>> thread = api.list_presets_with_http_info(owner, offset, limit, sort, query, bookmarks, mode, no_page, async_req=True)
745
761
  >>> result = thread.get()
746
762
 
747
763
  :param owner: Owner of the namespace (required)
@@ -777,15 +793,16 @@ class PresetsV1Api(object):
777
793
  request; this effectively ignores the authentication
778
794
  in the spec for a single request.
779
795
  :type _request_auth: dict, optional
796
+ :type _content_type: string, optional: force content-type for the request
780
797
  :return: Returns the result object.
781
798
  If the method is called asynchronously,
782
799
  returns the request thread.
783
800
  :rtype: tuple(V1ListPresetsResponse, status_code(int), headers(HTTPHeaderDict))
784
801
  """
785
802
 
786
- local_var_params = locals()
803
+ _params = locals()
787
804
 
788
- all_params = [
805
+ _all_params = [
789
806
  'owner',
790
807
  'offset',
791
808
  'limit',
@@ -795,89 +812,99 @@ class PresetsV1Api(object):
795
812
  'mode',
796
813
  'no_page'
797
814
  ]
798
- all_params.extend(
815
+ _all_params.extend(
799
816
  [
800
817
  'async_req',
801
818
  '_return_http_data_only',
802
819
  '_preload_content',
803
820
  '_request_timeout',
804
- '_request_auth'
821
+ '_request_auth',
822
+ '_content_type',
823
+ '_headers'
805
824
  ]
806
825
  )
807
826
 
808
- for key, val in six.iteritems(local_var_params['kwargs']):
809
- if key not in all_params:
827
+ # validate the arguments
828
+ for _key, _val in _params['kwargs'].items():
829
+ if _key not in _all_params:
810
830
  raise ApiTypeError(
811
831
  "Got an unexpected keyword argument '%s'"
812
- " to method list_presets" % key
832
+ " to method list_presets" % _key
813
833
  )
814
- local_var_params[key] = val
815
- del local_var_params['kwargs']
816
- # verify the required parameter 'owner' is set
817
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
818
- local_var_params['owner'] is None): # noqa: E501
819
- raise ApiValueError("Missing the required parameter `owner` when calling `list_presets`") # noqa: E501
820
-
821
- collection_formats = {}
822
-
823
- path_params = {}
824
- if 'owner' in local_var_params:
825
- path_params['owner'] = local_var_params['owner'] # noqa: E501
826
-
827
- query_params = []
828
- if 'offset' in local_var_params and local_var_params['offset'] is not None: # noqa: E501
829
- query_params.append(('offset', local_var_params['offset'])) # noqa: E501
830
- if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501
831
- query_params.append(('limit', local_var_params['limit'])) # noqa: E501
832
- if 'sort' in local_var_params and local_var_params['sort'] is not None: # noqa: E501
833
- query_params.append(('sort', local_var_params['sort'])) # noqa: E501
834
- if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501
835
- query_params.append(('query', local_var_params['query'])) # noqa: E501
836
- if 'bookmarks' in local_var_params and local_var_params['bookmarks'] is not None: # noqa: E501
837
- query_params.append(('bookmarks', local_var_params['bookmarks'])) # noqa: E501
838
- if 'mode' in local_var_params and local_var_params['mode'] is not None: # noqa: E501
839
- query_params.append(('mode', local_var_params['mode'])) # noqa: E501
840
- if 'no_page' in local_var_params and local_var_params['no_page'] is not None: # noqa: E501
841
- query_params.append(('no_page', local_var_params['no_page'])) # noqa: E501
842
-
843
- header_params = {}
844
-
845
- form_params = []
846
- local_var_files = {}
847
-
848
- body_params = None
849
- # HTTP header `Accept`
850
- header_params['Accept'] = self.api_client.select_header_accept(
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(
851
877
  ['application/json']) # noqa: E501
852
878
 
853
- # Authentication setting
854
- auth_settings = ['ApiKey'] # noqa: E501
879
+ # authentication setting
880
+ _auth_settings = ['ApiKey'] # noqa: E501
855
881
 
856
- response_types_map = {
857
- 200: "V1ListPresetsResponse",
858
- 204: "object",
859
- 403: "object",
860
- 404: "object",
882
+ _response_types_map = {
883
+ '200': "V1ListPresetsResponse",
884
+ '204': "object",
885
+ '403': "object",
886
+ '404': "object",
861
887
  }
862
888
 
863
889
  return self.api_client.call_api(
864
890
  '/api/v1/orgs/{owner}/presets', 'GET',
865
- path_params,
866
- query_params,
867
- header_params,
868
- body=body_params,
869
- post_params=form_params,
870
- files=local_var_files,
871
- response_types_map=response_types_map,
872
- auth_settings=auth_settings,
873
- async_req=local_var_params.get('async_req'),
874
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
875
- _preload_content=local_var_params.get('_preload_content', True),
876
- _request_timeout=local_var_params.get('_request_timeout'),
877
- collection_formats=collection_formats,
878
- _request_auth=local_var_params.get('_request_auth'))
879
-
880
- def patch_preset(self, owner, preset_uuid, body, **kwargs): # noqa: E501
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_preset(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], preset_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Preset, Field(..., description="Preset body")], **kwargs) -> V1Preset: # noqa: E501
881
908
  """Patch scheduling preset # noqa: E501
882
909
 
883
910
  This method makes a synchronous HTTP request by default. To make an
@@ -910,7 +937,8 @@ class PresetsV1Api(object):
910
937
  kwargs['_return_http_data_only'] = True
911
938
  return self.patch_preset_with_http_info(owner, preset_uuid, body, **kwargs) # noqa: E501
912
939
 
913
- def patch_preset_with_http_info(self, owner, preset_uuid, body, **kwargs): # noqa: E501
940
+ @validate_arguments
941
+ def patch_preset_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], preset_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Preset, Field(..., description="Preset body")], **kwargs): # noqa: E501
914
942
  """Patch scheduling preset # noqa: E501
915
943
 
916
944
  This method makes a synchronous HTTP request by default. To make an
@@ -942,104 +970,105 @@ class PresetsV1Api(object):
942
970
  request; this effectively ignores the authentication
943
971
  in the spec for a single request.
944
972
  :type _request_auth: dict, optional
973
+ :type _content_type: string, optional: force content-type for the request
945
974
  :return: Returns the result object.
946
975
  If the method is called asynchronously,
947
976
  returns the request thread.
948
977
  :rtype: tuple(V1Preset, status_code(int), headers(HTTPHeaderDict))
949
978
  """
950
979
 
951
- local_var_params = locals()
980
+ _params = locals()
952
981
 
953
- all_params = [
982
+ _all_params = [
954
983
  'owner',
955
984
  'preset_uuid',
956
985
  'body'
957
986
  ]
958
- all_params.extend(
987
+ _all_params.extend(
959
988
  [
960
989
  'async_req',
961
990
  '_return_http_data_only',
962
991
  '_preload_content',
963
992
  '_request_timeout',
964
- '_request_auth'
993
+ '_request_auth',
994
+ '_content_type',
995
+ '_headers'
965
996
  ]
966
997
  )
967
998
 
968
- for key, val in six.iteritems(local_var_params['kwargs']):
969
- if key not in all_params:
999
+ # validate the arguments
1000
+ for _key, _val in _params['kwargs'].items():
1001
+ if _key not in _all_params:
970
1002
  raise ApiTypeError(
971
1003
  "Got an unexpected keyword argument '%s'"
972
- " to method patch_preset" % key
1004
+ " to method patch_preset" % _key
973
1005
  )
974
- local_var_params[key] = val
975
- del local_var_params['kwargs']
976
- # verify the required parameter 'owner' is set
977
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
978
- local_var_params['owner'] is None): # noqa: E501
979
- raise ApiValueError("Missing the required parameter `owner` when calling `patch_preset`") # noqa: E501
980
- # verify the required parameter 'preset_uuid' is set
981
- if self.api_client.client_side_validation and ('preset_uuid' not in local_var_params or # noqa: E501
982
- local_var_params['preset_uuid'] is None): # noqa: E501
983
- raise ApiValueError("Missing the required parameter `preset_uuid` when calling `patch_preset`") # noqa: E501
984
- # verify the required parameter 'body' is set
985
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
986
- local_var_params['body'] is None): # noqa: E501
987
- raise ApiValueError("Missing the required parameter `body` when calling `patch_preset`") # noqa: E501
988
-
989
- collection_formats = {}
990
-
991
- path_params = {}
992
- if 'owner' in local_var_params:
993
- path_params['owner'] = local_var_params['owner'] # noqa: E501
994
- if 'preset_uuid' in local_var_params:
995
- path_params['preset.uuid'] = local_var_params['preset_uuid'] # noqa: E501
996
-
997
- query_params = []
998
-
999
- header_params = {}
1000
-
1001
- form_params = []
1002
- local_var_files = {}
1003
-
1004
- body_params = None
1005
- if 'body' in local_var_params:
1006
- body_params = local_var_params['body']
1007
- # HTTP header `Accept`
1008
- header_params['Accept'] = self.api_client.select_header_accept(
1009
- ['application/json']) # noqa: E501
1010
-
1011
- # HTTP header `Content-Type`
1012
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
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['preset_uuid']:
1017
+ _path_params['preset.uuid'] = _params['preset_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(
1013
1034
  ['application/json']) # noqa: E501
1014
1035
 
1015
- # Authentication setting
1016
- auth_settings = ['ApiKey'] # noqa: E501
1017
-
1018
- response_types_map = {
1019
- 200: "V1Preset",
1020
- 204: "object",
1021
- 403: "object",
1022
- 404: "object",
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': "V1Preset",
1048
+ '204': "object",
1049
+ '403': "object",
1050
+ '404': "object",
1023
1051
  }
1024
1052
 
1025
1053
  return self.api_client.call_api(
1026
1054
  '/api/v1/orgs/{owner}/presets/{preset.uuid}', 'PATCH',
1027
- path_params,
1028
- query_params,
1029
- header_params,
1030
- body=body_params,
1031
- post_params=form_params,
1032
- files=local_var_files,
1033
- response_types_map=response_types_map,
1034
- auth_settings=auth_settings,
1035
- async_req=local_var_params.get('async_req'),
1036
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1037
- _preload_content=local_var_params.get('_preload_content', True),
1038
- _request_timeout=local_var_params.get('_request_timeout'),
1039
- collection_formats=collection_formats,
1040
- _request_auth=local_var_params.get('_request_auth'))
1041
-
1042
- def update_preset(self, owner, preset_uuid, body, **kwargs): # noqa: E501
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_preset(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], preset_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Preset, Field(..., description="Preset body")], **kwargs) -> V1Preset: # noqa: E501
1043
1072
  """Update scheduling preset # noqa: E501
1044
1073
 
1045
1074
  This method makes a synchronous HTTP request by default. To make an
@@ -1072,7 +1101,8 @@ class PresetsV1Api(object):
1072
1101
  kwargs['_return_http_data_only'] = True
1073
1102
  return self.update_preset_with_http_info(owner, preset_uuid, body, **kwargs) # noqa: E501
1074
1103
 
1075
- def update_preset_with_http_info(self, owner, preset_uuid, body, **kwargs): # noqa: E501
1104
+ @validate_arguments
1105
+ def update_preset_with_http_info(self, owner : Annotated[StrictStr, Field(..., description="Owner of the namespace")], preset_uuid : Annotated[StrictStr, Field(..., description="UUID")], body : Annotated[V1Preset, Field(..., description="Preset body")], **kwargs): # noqa: E501
1076
1106
  """Update scheduling preset # noqa: E501
1077
1107
 
1078
1108
  This method makes a synchronous HTTP request by default. To make an
@@ -1104,99 +1134,99 @@ class PresetsV1Api(object):
1104
1134
  request; this effectively ignores the authentication
1105
1135
  in the spec for a single request.
1106
1136
  :type _request_auth: dict, optional
1137
+ :type _content_type: string, optional: force content-type for the request
1107
1138
  :return: Returns the result object.
1108
1139
  If the method is called asynchronously,
1109
1140
  returns the request thread.
1110
1141
  :rtype: tuple(V1Preset, status_code(int), headers(HTTPHeaderDict))
1111
1142
  """
1112
1143
 
1113
- local_var_params = locals()
1144
+ _params = locals()
1114
1145
 
1115
- all_params = [
1146
+ _all_params = [
1116
1147
  'owner',
1117
1148
  'preset_uuid',
1118
1149
  'body'
1119
1150
  ]
1120
- all_params.extend(
1151
+ _all_params.extend(
1121
1152
  [
1122
1153
  'async_req',
1123
1154
  '_return_http_data_only',
1124
1155
  '_preload_content',
1125
1156
  '_request_timeout',
1126
- '_request_auth'
1157
+ '_request_auth',
1158
+ '_content_type',
1159
+ '_headers'
1127
1160
  ]
1128
1161
  )
1129
1162
 
1130
- for key, val in six.iteritems(local_var_params['kwargs']):
1131
- if key not in all_params:
1163
+ # validate the arguments
1164
+ for _key, _val in _params['kwargs'].items():
1165
+ if _key not in _all_params:
1132
1166
  raise ApiTypeError(
1133
1167
  "Got an unexpected keyword argument '%s'"
1134
- " to method update_preset" % key
1168
+ " to method update_preset" % _key
1135
1169
  )
1136
- local_var_params[key] = val
1137
- del local_var_params['kwargs']
1138
- # verify the required parameter 'owner' is set
1139
- if self.api_client.client_side_validation and ('owner' not in local_var_params or # noqa: E501
1140
- local_var_params['owner'] is None): # noqa: E501
1141
- raise ApiValueError("Missing the required parameter `owner` when calling `update_preset`") # noqa: E501
1142
- # verify the required parameter 'preset_uuid' is set
1143
- if self.api_client.client_side_validation and ('preset_uuid' not in local_var_params or # noqa: E501
1144
- local_var_params['preset_uuid'] is None): # noqa: E501
1145
- raise ApiValueError("Missing the required parameter `preset_uuid` when calling `update_preset`") # noqa: E501
1146
- # verify the required parameter 'body' is set
1147
- if self.api_client.client_side_validation and ('body' not in local_var_params or # noqa: E501
1148
- local_var_params['body'] is None): # noqa: E501
1149
- raise ApiValueError("Missing the required parameter `body` when calling `update_preset`") # noqa: E501
1150
-
1151
- collection_formats = {}
1152
-
1153
- path_params = {}
1154
- if 'owner' in local_var_params:
1155
- path_params['owner'] = local_var_params['owner'] # noqa: E501
1156
- if 'preset_uuid' in local_var_params:
1157
- path_params['preset.uuid'] = local_var_params['preset_uuid'] # noqa: E501
1158
-
1159
- query_params = []
1160
-
1161
- header_params = {}
1162
-
1163
- form_params = []
1164
- local_var_files = {}
1165
-
1166
- body_params = None
1167
- if 'body' in local_var_params:
1168
- body_params = local_var_params['body']
1169
- # HTTP header `Accept`
1170
- header_params['Accept'] = self.api_client.select_header_accept(
1171
- ['application/json']) # noqa: E501
1172
-
1173
- # HTTP header `Content-Type`
1174
- header_params['Content-Type'] = self.api_client.select_header_content_type( # noqa: E501
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['preset_uuid']:
1181
+ _path_params['preset.uuid'] = _params['preset_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(
1175
1198
  ['application/json']) # noqa: E501
1176
1199
 
1177
- # Authentication setting
1178
- auth_settings = ['ApiKey'] # noqa: E501
1179
-
1180
- response_types_map = {
1181
- 200: "V1Preset",
1182
- 204: "object",
1183
- 403: "object",
1184
- 404: "object",
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': "V1Preset",
1212
+ '204': "object",
1213
+ '403': "object",
1214
+ '404': "object",
1185
1215
  }
1186
1216
 
1187
1217
  return self.api_client.call_api(
1188
1218
  '/api/v1/orgs/{owner}/presets/{preset.uuid}', 'PUT',
1189
- path_params,
1190
- query_params,
1191
- header_params,
1192
- body=body_params,
1193
- post_params=form_params,
1194
- files=local_var_files,
1195
- response_types_map=response_types_map,
1196
- auth_settings=auth_settings,
1197
- async_req=local_var_params.get('async_req'),
1198
- _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501
1199
- _preload_content=local_var_params.get('_preload_content', True),
1200
- _request_timeout=local_var_params.get('_request_timeout'),
1201
- collection_formats=collection_formats,
1202
- _request_auth=local_var_params.get('_request_auth'))
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'))