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,356 +1,88 @@
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
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
27
13
  """
28
14
 
29
15
 
30
- try:
31
- from inspect import getfullargspec
32
- except ImportError:
33
- from inspect import getargspec as getfullargspec
16
+ from __future__ import annotations
17
+ from inspect import getfullargspec
34
18
  import pprint
35
19
  import re # noqa: F401
36
- import six
20
+ import json
37
21
 
38
- from polyaxon_sdk.configuration import Configuration
39
22
 
23
+ from typing import Any, Dict, Optional
24
+ from pydantic import BaseModel, StrictBool, StrictStr
25
+ from polyaxon_sdk.models.v1_artifact_kind import V1ArtifactKind
40
26
 
41
- class V1RunArtifact(object):
42
- """NOTE: This class is auto generated by OpenAPI Generator.
43
- Ref: https://openapi-generator.tech
44
-
45
- Do not edit the class manually.
27
+ class V1RunArtifact(BaseModel):
46
28
  """
47
-
29
+ V1RunArtifact
48
30
  """
49
- Attributes:
50
- openapi_types (dict): The key is attribute name
51
- and the value is attribute type.
52
- attribute_map (dict): The key is attribute name
53
- and the value is json key in definition.
54
- """
55
- openapi_types = {
56
- 'name': 'str',
57
- 'state': 'str',
58
- 'kind': 'V1ArtifactKind',
59
- 'path': 'str',
60
- 'connection': 'str',
61
- 'run': 'str',
62
- 'summary': 'object',
63
- 'is_input': 'bool',
64
- 'meta_info': 'object'
65
- }
66
-
67
- attribute_map = {
68
- 'name': 'name',
69
- 'state': 'state',
70
- 'kind': 'kind',
71
- 'path': 'path',
72
- 'connection': 'connection',
73
- 'run': 'run',
74
- 'summary': 'summary',
75
- 'is_input': 'is_input',
76
- 'meta_info': 'meta_info'
77
- }
78
-
79
- def __init__(self, name=None, state=None, kind=None, path=None, connection=None, run=None, summary=None, is_input=None, meta_info=None, local_vars_configuration=None): # noqa: E501
80
- """V1RunArtifact - a model defined in OpenAPI""" # noqa: E501
81
- if local_vars_configuration is None:
82
- local_vars_configuration = Configuration.get_default_copy()
83
- self.local_vars_configuration = local_vars_configuration
84
-
85
- self._name = None
86
- self._state = None
87
- self._kind = None
88
- self._path = None
89
- self._connection = None
90
- self._run = None
91
- self._summary = None
92
- self._is_input = None
93
- self._meta_info = None
94
- self.discriminator = None
95
-
96
- if name is not None:
97
- self.name = name
98
- if state is not None:
99
- self.state = state
100
- if kind is not None:
101
- self.kind = kind
102
- if path is not None:
103
- self.path = path
104
- if connection is not None:
105
- self.connection = connection
106
- if run is not None:
107
- self.run = run
108
- if summary is not None:
109
- self.summary = summary
110
- if is_input is not None:
111
- self.is_input = is_input
112
- if meta_info is not None:
113
- self.meta_info = meta_info
114
-
115
- @property
116
- def name(self):
117
- """Gets the name of this V1RunArtifact. # noqa: E501
118
-
119
-
120
- :return: The name of this V1RunArtifact. # noqa: E501
121
- :rtype: str
122
- """
123
- return self._name
124
-
125
- @name.setter
126
- def name(self, name):
127
- """Sets the name of this V1RunArtifact.
128
-
129
-
130
- :param name: The name of this V1RunArtifact. # noqa: E501
131
- :type name: str
132
- """
133
-
134
- self._name = name
135
-
136
- @property
137
- def state(self):
138
- """Gets the state of this V1RunArtifact. # noqa: E501
139
-
140
-
141
- :return: The state of this V1RunArtifact. # noqa: E501
142
- :rtype: str
143
- """
144
- return self._state
145
-
146
- @state.setter
147
- def state(self, state):
148
- """Sets the state of this V1RunArtifact.
149
-
150
-
151
- :param state: The state of this V1RunArtifact. # noqa: E501
152
- :type state: str
153
- """
154
-
155
- self._state = state
156
-
157
- @property
158
- def kind(self):
159
- """Gets the kind of this V1RunArtifact. # noqa: E501
160
-
161
-
162
- :return: The kind of this V1RunArtifact. # noqa: E501
163
- :rtype: V1ArtifactKind
164
- """
165
- return self._kind
166
-
167
- @kind.setter
168
- def kind(self, kind):
169
- """Sets the kind of this V1RunArtifact.
170
-
171
-
172
- :param kind: The kind of this V1RunArtifact. # noqa: E501
173
- :type kind: V1ArtifactKind
174
- """
175
-
176
- self._kind = kind
177
-
178
- @property
179
- def path(self):
180
- """Gets the path of this V1RunArtifact. # noqa: E501
181
-
182
-
183
- :return: The path of this V1RunArtifact. # noqa: E501
184
- :rtype: str
185
- """
186
- return self._path
187
-
188
- @path.setter
189
- def path(self, path):
190
- """Sets the path of this V1RunArtifact.
191
-
192
-
193
- :param path: The path of this V1RunArtifact. # noqa: E501
194
- :type path: str
195
- """
196
-
197
- self._path = path
198
-
199
- @property
200
- def connection(self):
201
- """Gets the connection of this V1RunArtifact. # noqa: E501
202
-
203
-
204
- :return: The connection of this V1RunArtifact. # noqa: E501
205
- :rtype: str
206
- """
207
- return self._connection
208
-
209
- @connection.setter
210
- def connection(self, connection):
211
- """Sets the connection of this V1RunArtifact.
212
-
213
-
214
- :param connection: The connection of this V1RunArtifact. # noqa: E501
215
- :type connection: str
216
- """
217
-
218
- self._connection = connection
219
-
220
- @property
221
- def run(self):
222
- """Gets the run of this V1RunArtifact. # noqa: E501
223
-
224
-
225
- :return: The run of this V1RunArtifact. # noqa: E501
226
- :rtype: str
227
- """
228
- return self._run
229
-
230
- @run.setter
231
- def run(self, run):
232
- """Sets the run of this V1RunArtifact.
233
-
234
-
235
- :param run: The run of this V1RunArtifact. # noqa: E501
236
- :type run: str
237
- """
238
-
239
- self._run = run
240
-
241
- @property
242
- def summary(self):
243
- """Gets the summary of this V1RunArtifact. # noqa: E501
244
-
245
-
246
- :return: The summary of this V1RunArtifact. # noqa: E501
247
- :rtype: object
248
- """
249
- return self._summary
250
-
251
- @summary.setter
252
- def summary(self, summary):
253
- """Sets the summary of this V1RunArtifact.
254
-
255
-
256
- :param summary: The summary of this V1RunArtifact. # noqa: E501
257
- :type summary: object
258
- """
259
-
260
- self._summary = summary
261
-
262
- @property
263
- def is_input(self):
264
- """Gets the is_input of this V1RunArtifact. # noqa: E501
265
-
266
-
267
- :return: The is_input of this V1RunArtifact. # noqa: E501
268
- :rtype: bool
269
- """
270
- return self._is_input
271
-
272
- @is_input.setter
273
- def is_input(self, is_input):
274
- """Sets the is_input of this V1RunArtifact.
275
-
276
-
277
- :param is_input: The is_input of this V1RunArtifact. # noqa: E501
278
- :type is_input: bool
279
- """
280
-
281
- self._is_input = is_input
282
-
283
- @property
284
- def meta_info(self):
285
- """Gets the meta_info of this V1RunArtifact. # noqa: E501
286
-
287
-
288
- :return: The meta_info of this V1RunArtifact. # noqa: E501
289
- :rtype: object
290
- """
291
- return self._meta_info
292
-
293
- @meta_info.setter
294
- def meta_info(self, meta_info):
295
- """Sets the meta_info of this V1RunArtifact.
296
-
297
-
298
- :param meta_info: The meta_info of this V1RunArtifact. # noqa: E501
299
- :type meta_info: object
300
- """
301
-
302
- self._meta_info = meta_info
303
-
304
- def to_dict(self, serialize=False):
305
- """Returns the model properties as a dict"""
306
- result = {}
307
-
308
- def convert(x):
309
- if hasattr(x, "to_dict"):
310
- args = getfullargspec(x.to_dict).args
311
- if len(args) == 1:
312
- return x.to_dict()
313
- else:
314
- return x.to_dict(serialize)
315
- else:
316
- return x
317
-
318
- for attr, _ in six.iteritems(self.openapi_types):
319
- value = getattr(self, attr)
320
- attr = self.attribute_map.get(attr, attr) if serialize else attr
321
- if isinstance(value, list):
322
- result[attr] = list(map(
323
- lambda x: convert(x),
324
- value
325
- ))
326
- elif isinstance(value, dict):
327
- result[attr] = dict(map(
328
- lambda item: (item[0], convert(item[1])),
329
- value.items()
330
- ))
331
- else:
332
- result[attr] = convert(value)
333
-
334
- return result
335
-
336
- def to_str(self):
337
- """Returns the string representation of the model"""
338
- return pprint.pformat(self.to_dict())
339
-
340
- def __repr__(self):
341
- """For `print` and `pprint`"""
342
- return self.to_str()
343
-
344
- def __eq__(self, other):
345
- """Returns true if both objects are equal"""
346
- if not isinstance(other, V1RunArtifact):
347
- return False
348
-
349
- return self.to_dict() == other.to_dict()
350
-
351
- def __ne__(self, other):
352
- """Returns true if both objects are not equal"""
353
- if not isinstance(other, V1RunArtifact):
354
- return True
31
+ name: Optional[StrictStr] = None
32
+ state: Optional[StrictStr] = None
33
+ kind: Optional[V1ArtifactKind] = None
34
+ path: Optional[StrictStr] = None
35
+ connection: Optional[StrictStr] = None
36
+ run: Optional[StrictStr] = None
37
+ summary: Optional[Dict[str, Any]] = None
38
+ is_input: Optional[StrictBool] = None
39
+ meta_info: Optional[Dict[str, Any]] = None
40
+ __properties = ["name", "state", "kind", "path", "connection", "run", "summary", "is_input", "meta_info"]
41
+
42
+ class Config:
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> V1RunArtifact:
56
+ """Create an instance of V1RunArtifact from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ return _dict
66
+
67
+ @classmethod
68
+ def from_dict(cls, obj: dict) -> V1RunArtifact:
69
+ """Create an instance of V1RunArtifact from a dict"""
70
+ if obj is None:
71
+ return None
72
+
73
+ if type(obj) is not dict:
74
+ return V1RunArtifact.parse_obj(obj)
75
+
76
+ _obj = V1RunArtifact.parse_obj({
77
+ "name": obj.get("name"),
78
+ "state": obj.get("state"),
79
+ "kind": obj.get("kind"),
80
+ "path": obj.get("path"),
81
+ "connection": obj.get("connection"),
82
+ "run": obj.get("run"),
83
+ "summary": obj.get("summary"),
84
+ "is_input": obj.get("is_input"),
85
+ "meta_info": obj.get("meta_info")
86
+ })
87
+ return _obj
355
88
 
356
- return self.to_dict() != other.to_dict()
@@ -1,148 +1,79 @@
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
10
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
+
12
+ Do not edit the class manually.
27
13
  """
28
14
 
29
15
 
30
- try:
31
- from inspect import getfullargspec
32
- except ImportError:
33
- from inspect import getargspec as getfullargspec
16
+ from __future__ import annotations
17
+ from inspect import getfullargspec
34
18
  import pprint
35
19
  import re # noqa: F401
36
- import six
37
-
38
- from polyaxon_sdk.configuration import Configuration
20
+ import json
39
21
 
40
22
 
41
- class V1RunArtifacts(object):
42
- """NOTE: This class is auto generated by OpenAPI Generator.
43
- Ref: https://openapi-generator.tech
44
-
45
- Do not edit the class manually.
46
- """
23
+ from typing import List, Optional
24
+ from pydantic import BaseModel, conlist
25
+ from polyaxon_sdk.models.v1_run_artifact import V1RunArtifact
47
26
 
27
+ class V1RunArtifacts(BaseModel):
48
28
  """
49
- Attributes:
50
- openapi_types (dict): The key is attribute name
51
- and the value is attribute type.
52
- attribute_map (dict): The key is attribute name
53
- and the value is json key in definition.
29
+ V1RunArtifacts
54
30
  """
55
- openapi_types = {
56
- 'artifacts': 'list[V1RunArtifact]'
57
- }
58
-
59
- attribute_map = {
60
- 'artifacts': 'artifacts'
61
- }
62
-
63
- def __init__(self, artifacts=None, local_vars_configuration=None): # noqa: E501
64
- """V1RunArtifacts - a model defined in OpenAPI""" # noqa: E501
65
- if local_vars_configuration is None:
66
- local_vars_configuration = Configuration.get_default_copy()
67
- self.local_vars_configuration = local_vars_configuration
68
-
69
- self._artifacts = None
70
- self.discriminator = None
71
-
72
- if artifacts is not None:
73
- self.artifacts = artifacts
74
-
75
- @property
76
- def artifacts(self):
77
- """Gets the artifacts of this V1RunArtifacts. # noqa: E501
78
-
79
-
80
- :return: The artifacts of this V1RunArtifacts. # noqa: E501
81
- :rtype: list[V1RunArtifact]
82
- """
83
- return self._artifacts
84
-
85
- @artifacts.setter
86
- def artifacts(self, artifacts):
87
- """Sets the artifacts of this V1RunArtifacts.
88
-
89
-
90
- :param artifacts: The artifacts of this V1RunArtifacts. # noqa: E501
91
- :type artifacts: list[V1RunArtifact]
92
- """
93
-
94
- self._artifacts = artifacts
95
-
96
- def to_dict(self, serialize=False):
97
- """Returns the model properties as a dict"""
98
- result = {}
99
-
100
- def convert(x):
101
- if hasattr(x, "to_dict"):
102
- args = getfullargspec(x.to_dict).args
103
- if len(args) == 1:
104
- return x.to_dict()
105
- else:
106
- return x.to_dict(serialize)
107
- else:
108
- return x
109
-
110
- for attr, _ in six.iteritems(self.openapi_types):
111
- value = getattr(self, attr)
112
- attr = self.attribute_map.get(attr, attr) if serialize else attr
113
- if isinstance(value, list):
114
- result[attr] = list(map(
115
- lambda x: convert(x),
116
- value
117
- ))
118
- elif isinstance(value, dict):
119
- result[attr] = dict(map(
120
- lambda item: (item[0], convert(item[1])),
121
- value.items()
122
- ))
123
- else:
124
- result[attr] = convert(value)
125
-
126
- return result
127
-
128
- def to_str(self):
129
- """Returns the string representation of the model"""
130
- return pprint.pformat(self.to_dict())
131
-
132
- def __repr__(self):
133
- """For `print` and `pprint`"""
134
- return self.to_str()
135
-
136
- def __eq__(self, other):
137
- """Returns true if both objects are equal"""
138
- if not isinstance(other, V1RunArtifacts):
139
- return False
140
-
141
- return self.to_dict() == other.to_dict()
142
-
143
- def __ne__(self, other):
144
- """Returns true if both objects are not equal"""
145
- if not isinstance(other, V1RunArtifacts):
146
- return True
147
-
148
- return self.to_dict() != other.to_dict()
31
+ artifacts: Optional[conlist(V1RunArtifact)] = None
32
+ __properties = ["artifacts"]
33
+
34
+ class Config:
35
+ allow_population_by_field_name = True
36
+ validate_assignment = True
37
+
38
+ def to_str(self) -> str:
39
+ """Returns the string representation of the model using alias"""
40
+ return pprint.pformat(self.dict(by_alias=True))
41
+
42
+ def to_json(self) -> str:
43
+ """Returns the JSON representation of the model using alias"""
44
+ return json.dumps(self.to_dict())
45
+
46
+ @classmethod
47
+ def from_json(cls, json_str: str) -> V1RunArtifacts:
48
+ """Create an instance of V1RunArtifacts from a JSON string"""
49
+ return cls.from_dict(json.loads(json_str))
50
+
51
+ def to_dict(self):
52
+ """Returns the dictionary representation of the model using alias"""
53
+ _dict = self.dict(by_alias=True,
54
+ exclude={
55
+ },
56
+ exclude_none=True)
57
+ # override the default output from pydantic by calling `to_dict()` of each item in artifacts (list)
58
+ _items = []
59
+ if self.artifacts:
60
+ for _item in self.artifacts:
61
+ if _item:
62
+ _items.append(_item.to_dict())
63
+ _dict['artifacts'] = _items
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> V1RunArtifacts:
68
+ """Create an instance of V1RunArtifacts from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if type(obj) is not dict:
73
+ return V1RunArtifacts.parse_obj(obj)
74
+
75
+ _obj = V1RunArtifacts.parse_obj({
76
+ "artifacts": [V1RunArtifact.from_dict(_item) for _item in obj.get("artifacts")] if obj.get("artifacts") is not None else None
77
+ })
78
+ return _obj
79
+